yeah that is really progress, i have already tried still getting that error.
I tried online base64 decode and encode, password encoded by a node is correct, I don't know why the modem is rejecting. maybe need mode digging into Huwaei LTE API.
I spent a lot of time developing a flow similar to the one which you are trying, and I also had a similar response.
Have you considered adapting the code which I posted above?
I have already looked at your code, Huawei is using a very different strategy to provide WebUI for their LTE modem. as far I can understand you are accessing a direct webpage for login. on the other hand Huawei provide API to client-side. for example for accessing current statistics i send a get request to api/monitoring/traffic-statistics/r/nConnection
and modem replies with data.on newer version of huawei devices you have to loged into modem to access these API.
Hi there,
I have done it finally, guess what? I don't need to log in to get data of my interest. the flow you provided to extract session id and token I make a second HTTP request to
http://192.168.1.1/api/monitoring/traffic-statistics/r/nConnection
http://192.168.1.1/api/monitoring/status
and here is the output
{"response":{"CurrentConnectTime":["3570"],
"CurrentUpload":["7470469"],
"CurrentDownload":["25712745"],"
CurrentDownloadRate":["92"],"
CurrentUploadRate":["1059"],"
TotalUpload":["14956663649"],"
TotalDownload":["248347829410"],"
TotalConnectTime":["5357112"],
"showtraffic":["1"]}}
{"ConnectionStatus":["901"],
"WifiConnectionStatus":["902"],
"SignalStrength":[""],
"SignalIcon":["4"],
"CurrentNetworkType":["19"],
"CurrentServiceDomain":["3"],
"RoamingStatus":["0"],
"BatteryStatus":["0"],
"BatteryLevel":["2"],
"BatteryPercent":["50"],
"simlockStatus":["0"],
"PrimaryDns":["10.177.88.32"],
"SecondaryDns":["202.69.12.151"],
"PrimaryIPv6Dns":[""],
"SecondaryIPv6Dns":[""],
"CurrentWifiUser":["2"],
"TotalWifiUser":["16"],
"currenttotalwifiuser":["16"],
"ServiceStatus":["2"],
"SimStatus":["1"],
"WifiStatus":["1"],
"CurrentNetworkTypeEx":["101"],
"WanPolicy":["2"],
"maxsignal":["5"],
"wifiindooronly":["0"],
"wififrequence":["0"],
"classify":["mobile-wifi"],
"flymode":["0"],"
cellroam":["1"],
"ltecastatus":["0"]}
Thank you so much I could not have done without you. Now I can peacefully send this data to InfluxDB and display it on grafana, from there I can get notifications about anything going wrong.
Nice .. im glad you found a solution .. all the best with the rest of the project
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.