Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

add cookie support as required by latest s/w#4

Open
jonbartlett wants to merge 1 commit intotrick77:masterfrom
jonbartlett:cookies
Open

add cookie support as required by latest s/w#4
jonbartlett wants to merge 1 commit intotrick77:masterfrom
jonbartlett:cookies

Conversation

@jonbartlett
Copy link

The HiLink s/w now require the sessionID to be passed with each api request. This is the issue reported in #3

The following PR works on:

Huawei E3372 LTE Modem
Hardware version: CL2E3372HM
Software version: 22.315.01.00.74
Web UI version: 17.100.14.00.74

Signal strength reporting has also changed and this is not working. Further investigation needed.

Code changes based on:
https://trick77.com/query-status-information-huaweis-hilink-3g-lte-modems/#comment-13770

@jonbartlett
Copy link
Author

jonbartlett commented Aug 3, 2017

With regards to "Signal Strength", this is no-longer retured from "/api/monitoring/status":

$ curl -s -X GET http://192.168.8.1/api/monitoring/status -H "Cookie: SessionID=kfTrKwuV3KbAvBPIojFeJDPd2NqDOm4DnHtzEEEPTEV/eVolHKq34qI14PBC5oP34nJnsYF71tbytW3rugElShk3l47fBLZdRiWat2OiIi8j3UJAAo7ady82iDfuVKgG"
<?xml version="1.0" encoding="UTF-8"?>
<response>
<ConnectionStatus>901</ConnectionStatus>
<WifiConnectionStatus></WifiConnectionStatus>
**<SignalStrength></SignalStrength>**
<SignalIcon>4</SignalIcon>
<CurrentNetworkType>19</CurrentNetworkType>
<CurrentServiceDomain>3</CurrentServiceDomain>
<RoamingStatus>0</RoamingStatus>
<BatteryStatus></BatteryStatus>
<BatteryLevel></BatteryLevel>
<BatteryPercent></BatteryPercent>
<simlockStatus>0</simlockStatus>
<WanIPAddress>10.6.6.25</WanIPAddress>
<WanIPv6Address></WanIPv6Address>
<PrimaryDns>198.142.0.51</PrimaryDns>
<SecondaryDns>211.29.132.12</SecondaryDns>
<PrimaryIPv6Dns></PrimaryIPv6Dns>
<SecondaryIPv6Dns></SecondaryIPv6Dns>
<CurrentWifiUser></CurrentWifiUser>
<TotalWifiUser></TotalWifiUser>
<currenttotalwifiuser>0</currenttotalwifiuser>
<ServiceStatus>2</ServiceStatus>
<SimStatus>1</SimStatus>
<WifiStatus></WifiStatus>
<CurrentNetworkTypeEx>101</CurrentNetworkTypeEx>
<maxsignal>5</maxsignal>
<wifiindooronly>-1</wifiindooronly>
<wififrequence>0</wififrequence>
<classify>hilink</classify>
<flymode>0</flymode>
<cellroam>0</cellroam>
<ltecastatus>0</ltecastatus>
</response>

Possibly modify to use "api/device/signal" which gives more detailed signal information:

$ curl -s -X GET http://192.168.8.1/api/device/signal -H "Cookie: SessionID=SYoUHwtYXKQPJDtnT47WmvfV03qbGJJljWSgheV47+JRRX1RXu6YgOXkDnU60ClDt0h2AqV602afVecLOePbAfd3ik/fhIBaWfDq16zLv8kJsyq7vL/IXL+OW5Q7fHVl"
<?xml version="1.0" encoding="UTF-8"?>
<response>
<pci>144</pci>
<sc></sc>
<cell_id>37830929</cell_id>
<rsrq>-10dB</rsrq>
<rsrp>-93dBm</rsrp>
<rssi>-63dBm</rssi>
<sinr>19dB</sinr>
<rscp></rscp>
<ecio></ecio>
<mode>7</mode>
<psatt>1</psatt>
<bandwidth>20M</bandwidth>
<band>40</band>
</response>

@creolis
Copy link

creolis commented Jul 10, 2018

I would <3 to see this PR merged ..

@jonbartlett
Copy link
Author

I would <3 to see this PR merged ..

Yeah would be good. Just jumped back into using this modem and would like to pull the stats.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants