OptWare on HiLink modems | Linux extension



Rep: (1818)
OptWare on HiLink modems - Discussion


Useful links:


Post has been editedstp101 - 11.08.17, 16:54
Reason for editing: Sending SMS using Entware



Rep: (51)
Good evening.
I want to configure sending sms through a script. E3372s modem in HiLink.

* ilya-fedin Let me ask you a couple of questions?
Since there is some understatement in this topic, do I understand correctly that I first need to put dropbear (SSH / SCP-server) on the modem?
My firmware now costs 22.300.09.00.00, and your web interface is 17.100.17.00.143-Mod1.20
The modem now responds to ssh and telnet, if you log in as root without a password, but hereuname I can’t do it. only busybox uname .
Well, probably, the most important question, maybe I first need to upgrade to something? How old is my firmware? Maybe because of this, uname does not work for me?

And, in fact, is Entware itself already installed on top of dropbear, or can it be installed immediately on fresh firmware?

memory
Attached Image


but the installation of entware 3.x for me ends with errors like this:
entware
Attached Image


Post has been edited[HC] HUNTER - 07.12.18, 11:21



Rep: (51)
in general, according to the advice found aboveOptWare on HiLink modems (Post sedarmill # 61176332)something was installed, the directory / opt / bin / was filled with files.
however, I can’t install anything else ...
or is there nothing more in the repository, and continue to work with your hands? otherwise I would like to have access through SCP, but WinSCP cannot read the contents of the directory, says -la says nothing.
Attached Image



... delivered curl by simply adding it to install.sh from entware. curl delivered.
since he doesn’t want to start anything without explicitly indicating / opt / bin, he somehow rewrote the script for sending sms in such a terrible form, but it works!
SMS script
#! / bin / sh

i = "192.168.42.129"

r = `/ opt / bin / curl -s -X GET http: // $ i / api / webserver / SesTokInfo`
c = `/ opt / bin / echo" $ r "| / opt / bin / grep SessionID = | / opt / bin / cut -b 10-147`
t = `/ opt / bin / echo" $ r "| / opt / bin / grep TokInfo | / opt / bin / cut -b 10-41`
p = "$ 2"
s = "$ 1"
l = $ {# s}

/ opt / bin / curl -v http: // $ i / api / sms / send-sms \
-H "Cookie: $ c" \
-H "__RequestVerificationToken: $ t" \
-H "Content-Type: application / x-www-form-urlencoded; charset = UTF-8" \
-H "Accept: * / *" \
-H "Referer: http: //$i/html/smsinbox.html" \
-H 'X-Requested-With: XMLHttpRequest' \
-H "Connection: keep-alive" \
-H "Origin: http: // $ i" \
--data "<? xml version = '1.0' encoding = 'UTF-8'?><request><Index>-1</ Index><Phones><Phone>$ p</ Phone></ Phones><Sca></ Sca><Content>$ s</ Content><Length>$ l</ Length><Reserved>1</ Reserved><Date>-1</ Date></ request>"


but the script exhaust comes with error 100005. The same thing, if you run the script from, say, a router, the same error:
error sending sms
#
# / opt / bin / sms_send "test" +79107100000
>POST / api / sms / send-sms HTTP / 1.1
>Host: 192.168.42.129
>User-Agent: curl / 7.57.0
>Cookie: SessionID = FFrRNSXU3ODnfyP + 4nRvfhT97PiM17xrnIazaStQpY2 + I9P7boNYqZCTvbI9FZS8vrFF6TRVOBRhHylW4alDLcVczDy + lKFY5x5Z9WB QKKBKKGKGKK
>__RequestVerificationToken: oLaKC7LBCATrPzVl0J5n2MvACBTU9J4C
>Content-Type: application / x-www-form-urlencoded; charset = utf-8
>Accept: * / *
>Referer: http://192.168.42.129/html/smsinbox.html
>X-Requested-With: XMLHttpRequest
>Connection: keep-alive
>Origin: http://192.168.42.129
>Content-Length: 207
>
<HTTP / 1.1 200 OK
<Date: Thu, 01 Jan 1970 00:00:00 GMT
<Server: mini_httpd / 1.19 19dec2003
<Connection: close
<X-Download-Options: noopen
<X-Frame-Options: deny
<X-XSS-Protection: 1; mode = block
<Strict-Transport-Security: max-age = 31536000; includeSubdomains
<Cache-control: no-cache
<Content-Type: text / html
<Content-Length: 101
<__RequestVerificationToken: DLQqXHkxJjPc12XigR8pBzUYZR2fkzh1
<
<? xml version = "1.0" encoding = "UTF-8"?>
<error>
<code>100005</ code>
<message></ message>
</ error>
#


What is the error 100005 and how to overcome it?

Post has been edited[HC] HUNTER - 07.12.18, 14:13



Rep: (51)
everything worked ... SMS began to be sent!
did not work due<Date>-1</ Date>

added to the body of the script
time = $ (date + "% Y-% m-% d% T")
and further in the team, respectively ...</ Reserved><Date>$ time</ Date></ request>"

Now my script looks like this:
#! / bin / sh

i = "$ 3"

r = `curl -s -X GET http: // $ i / api / webserver / SesTokInfo`
c = `echo" $ r "| grep SessionID = | cut -b 10-147`
t = `echo" $ r "| grep TokInfo | cut -b 10-41`
p = "$ 2"
s = "$ 1"
l = $ {# s}
time = $ (date + "% Y-% m-% d% T")

curl -v http: // $ i / api / sms / send-sms \
-H "Cookie: $ c" \
-H "__RequestVerificationToken: $ t" \
-H "Content-Type: application / x-www-form-urlencoded; charset = UTF-8" \
--data "<? xml version = '1.0' encoding = 'UTF-8'?><request><Index>-1</ Index><Phones><Phone>$ p</ Phone></ Phones><Sca></ Sca><Content>$ s</ Content><Length>$ l</ Length><Reserved>1</ Reserved><Date>$ time</ Date></ request>"


launch accordingly: ... / script "sms body" + 7number 192.168.8.1

Post has been edited[HC] HUNTER - 07.12.18, 15:41



Rep: (1)
Sawn up for USSD, someone may need it.
instructionhere
the script is this:

#! / bin / sh
i = `ifconfig br0 | grep 'inet addr' | sed -r 's /.* inet addr: (\ S *). * / \ 1 / g``
r = `curl -s -X GET http: // $ i / api / webserver / SesTokInfo`
c = `echo" $ r "| grep SessionID = | cut -b 10-147`
t = `echo" $ r "| grep TokInfo | cut -b 10-41`
u = "$ 1"
a = `curl -X POST http: // $ i / api / ussd / send -H" Cookie: $ c "-H" __RequestVerificationToken: $ t "-H" Content-Type: application / x-www-form- urlencoded; charset = UTF-8 "--data"<? xml version = '1.0' encoding = 'UTF-8'?><request>
<content>$ u</ content>
<timeout>4</ timeout>
</ request>"`
sleep 4

a = `curl -s -X GET http: // $ i / api / ussd / get -H" Cookie: $ c "-H" __RequestVerificationToken: $ t "-H" Content-Type: application / x-www- form-urlencoded; charset = UTF-8 "`
a = `echo" $ a "| grep content | cut -b 10-41`
echo $ a

call
ussd number



Rep: (9)
Colleagues, I would be grateful if you poke your nose, how to raise the PPTP client? ppp and pptpd are installed.



Rep: (1)
* Ivn78,

Looked here?



Rep: (9)
* moroz-60,
Watched. But there, binaries were specially built for firmware. And when installing pptpd from Entware, where can I find mtpd? Maybe I'm dumb, sorry



Rep: (3)
Comrades, there is a trap in the form of Iota in the modem - well, P2P traffic is already completely blocked, proxies in clients (amul or torrents) do not help already, when I open the link (the arch Linux axis) to the router, I can access the modem and, unfortunately, therefore How to properly mask P2P traffic on a modem or run open directly on it? Moped e3372s, firmware 22.300.09.00.00.00 with adb and telnet. Now I have a network "modem router with open-wifi distribution", have Winfon.



Rep: (0)
How to run TOR on OptWare is possible in more detail, many will be interested
Thanks in advance!

Post has been editedgiper100 - 30.04.19, 16:03



Rep: (327)
* giper100,
Just like not on OptWare, it is almost no different in this regard. But the RAM for Tor will be enough only on devices Balong Hi6932 V7R22 (E5785 / E5885).



Rep: (20)
ValdikSS @ 04.30.19, 20:50*
But the RAM for Tor is enough only on devices Balong Hi6932 V7R22 (E5785 / E5885)
On the 3372h modem, I started it by connecting a swap partition on an sd card.
For two years, two SD-shki flew, I do not bother anymore.



Rep: (0)
* ilya-fedin
Hello, is it possible to fix TTL on the e8372 modem without changing the firmware?
Software Version: 21.210.03.00.778
Web Interface Version: 17.100.08.01.778



Rep: (2)
to you in this thread:Huawei E8372 (MTS 8211F) - Discussion
namely, in the first link of the first message (header) of the topicHuawei E8372 (MTS 8211F) - Discussion (Post dr_esin # 71423107)
I’ll add on my own that without flashing you can’t change ttl, etc.
In the topic on your modem, everything is described in detail which firmware can be flashed, which are not needed, links to modified firmware and web interfaces, what sequence of actions and what to look for.



Rep: (0)
Good day forum users, modem e3272 with firmware
E3272S_Update_22.491.03.00.00_ADB_TLN_02. Installed the Samba + Transmission assembly, do I need to delete the old assembly before installing the OptWare_SSH assembly? And I also understand that SSH can replace Telnet in terms of portability, for example, you will not need to connect drivers to flash Imei? Thank you in advance for your help.

Post has been editedDDimetrus - 29.07.19, 00:59


Full version    

Help     rules

Now: 09/12/19, 05:26