While Huawei provides status information for its HiLink modems via a web page, this is hardly useful when using the modem on a headless Linux server. I just published a small Python-based command-line tool on Github which displays some useful information about the modem’s status.
root@wopr~#: python ./hstatus.py Huawei E3372 LTE Modem (IMEI: 121032526613216) Hardware version: CL1D3271AM Ver.A Software version: 22.286.53.01.161 Web UI version: 16.100.05.00.03-Mod1.4 Serial: L8FDW11512114431 MAC address (modem): 00:0D:87:12:1C:1D Connection status: Connected Network type: UMTS (3G) Signal level: ▁▃▄▆█ Roaming: Enabled Modem WAN IP address: 10.197.75.231 Public IP address: 18.104.22.168 DNS IP addresses: 22.214.171.124, 126.96.36.199 Network operator: Swisscom Connected for: 03:15:15 (hh:mm:ss) Downloaded: 615.17 KB Uploaded: 258.69 KB Total downloaded: 14.69 MB Total uploaded: 1.34 MB Unread SMS: 1
The tool has been tested on a Huawei E3276 and a E3372 modem. For the newer E3372 modem I had to add some code to supply a RequestVerificationToken in the HTTP header.
Feel free to send a pull request on Github with your own tweaks!
The repository is available here: github.com/trick77/huawei-hilink-status