[GH-ISSUE #25] Provide more information for Huawei E3372 via AT commands #18

Closed
opened 2026-03-04 11:57:36 +03:00 by kerem · 7 comments
Owner

Originally created by @patrakov on GitHub (Oct 16, 2022).
Original GitHub issue: https://github.com/4IceG/luci-app-3ginfo-lite/issues/25

Huawei E3372 reflashed to stick mode is already supported and has its own 3ginfo-addon file:

Bus 001 Device 003: ID 12d1:1506 HUAWEI_MOBILE HUAWEI_MOBILE

Currently, it is missing the display of IMEI, IMSI, ICCID, TAC, and the active band.

It can provide IMEI either as a part of its response to ATI, or as a response to AT+GSN.

# sms_tool -d /dev/ttyUSB1 at 'AT+GSN'
AT+GSN
861XXXXXXXXXXXX

# sms_tool -d /dev/ttyUSB1 at 'ATI'
ATI
Manufacturer: huawei
Model: E3372
Revision: 21.200.07.00.00
IMEI: 861XXXXXXXXXXXX
+GCAP: +CGSM,+DS,+ES

Regarding IMSI:

# sms_tool -d /dev/ttyUSB1 at 'AT+CIMI'
AT+CIMI
51566XXXXXXXXXX

Regarding ICCID:

# sms_tool -d /dev/ttyUSB1 at 'AT^ICCID?'
AT^ICCID?
^ICCID: 896XXXXXXXXXXXXXXXXX

I could not find how to request TAC.

There is no dedicated command to display the band used, but there is AT^HFREQINFO? which displays frequency information which can be a (more detailed) substitute. I could not find any documentation specific to E3372, but http://download-c.huawei.com/download/downloadCenter?downloadId=100630 contains this command.

# sms_tool -d /dev/ttyUSB1 at 'AT^HFREQINFO?'
AT^HFREQINFO?
^HFREQINFO:0,6,1,425,21525,15000,18425,19625,15000

...which means: no unsolicited reporting, LTE mode, LTE band 1, downlink frequency point (EARFCN) 425, downlink frequency 2152.5 MHz, downlink bandwidth 15 MHz, uplink frequency point (EARFCN) 18425, downlink frequency 1962.5 MHz, downlink bandwidth 15 MHz.

Originally created by @patrakov on GitHub (Oct 16, 2022). Original GitHub issue: https://github.com/4IceG/luci-app-3ginfo-lite/issues/25 Huawei E3372 reflashed to stick mode is already supported and has its own 3ginfo-addon file: ``` Bus 001 Device 003: ID 12d1:1506 HUAWEI_MOBILE HUAWEI_MOBILE ``` Currently, it is missing the display of IMEI, IMSI, ICCID, TAC, and the active band. It can provide IMEI either as a part of its response to `ATI`, or as a response to `AT+GSN`. ``` # sms_tool -d /dev/ttyUSB1 at 'AT+GSN' AT+GSN 861XXXXXXXXXXXX # sms_tool -d /dev/ttyUSB1 at 'ATI' ATI Manufacturer: huawei Model: E3372 Revision: 21.200.07.00.00 IMEI: 861XXXXXXXXXXXX +GCAP: +CGSM,+DS,+ES ``` Regarding IMSI: ``` # sms_tool -d /dev/ttyUSB1 at 'AT+CIMI' AT+CIMI 51566XXXXXXXXXX ``` Regarding ICCID: ``` # sms_tool -d /dev/ttyUSB1 at 'AT^ICCID?' AT^ICCID? ^ICCID: 896XXXXXXXXXXXXXXXXX ``` I could not find how to request TAC. There is no dedicated command to display the band used, but there is `AT^HFREQINFO?` which displays frequency information which can be a (more detailed) substitute. I could not find any documentation specific to E3372, but http://download-c.huawei.com/download/downloadCenter?downloadId=100630 contains this command. ``` # sms_tool -d /dev/ttyUSB1 at 'AT^HFREQINFO?' AT^HFREQINFO? ^HFREQINFO:0,6,1,425,21525,15000,18425,19625,15000 ``` ...which means: no unsolicited reporting, LTE mode, LTE band 1, downlink frequency point (EARFCN) 425, downlink frequency 2152.5 MHz, downlink bandwidth 15 MHz, uplink frequency point (EARFCN) 18425, downlink frequency 1962.5 MHz, downlink bandwidth 15 MHz.
kerem closed this issue 2026-03-04 11:57:36 +03:00
Author
Owner

@4IceG commented on GitHub (Oct 16, 2022):

Ok, I'll add this when I have some free time for the week. TAC will probably double with LAC if it can't be read.

<!-- gh-comment-id:1280003609 --> @4IceG commented on GitHub (Oct 16, 2022): Ok, I'll add this when I have some free time for the week. TAC will probably double with LAC if it can't be read.
Author
Owner

@patrakov commented on GitHub (Oct 16, 2022):

LAC is actually retrieved successfully, but TAC is missing.

<!-- gh-comment-id:1280028536 --> @patrakov commented on GitHub (Oct 16, 2022): LAC is actually retrieved successfully, but TAC is missing.
Author
Owner

@patrakov commented on GitHub (Oct 20, 2022):

I have tried the latest release, it works. Now it says:

Primary band | PCI & EARFCN	B1 (2100 MHz) DL: @15 MHz UL: @15 MHz | - 425

So PCI is missing. I have tried the commands from the PDF that might return it, but they all fail (because the PDF is for a different Huawei modem), so well, it is not obtainable.

All other information that I requested is correctly reported.

<!-- gh-comment-id:1285264433 --> @patrakov commented on GitHub (Oct 20, 2022): I have tried the latest release, it works. Now it says: ``` Primary band | PCI & EARFCN B1 (2100 MHz) DL: @15 MHz UL: @15 MHz | - 425 ``` So PCI is missing. I have tried the commands from the PDF that might return it, but they all fail (because the PDF is for a different Huawei modem), so well, it is not obtainable. All other information that I requested is correctly reported.
Author
Owner

@patrakov commented on GitHub (Oct 20, 2022):

Oops, the chip temperature is missing.

# sms_tool -d /dev/ttyUSB1 at "AT^CHIPTEMP?"
AT^CHIPTEMP?
^CHIPTEMP: 473,473,65535,35,65535

I have manually copy-pasted the awk command, and it prints the correct temperature. So the bug must be not in the parsing of the AT command response, but in how it is propagated to the json.

<!-- gh-comment-id:1285290008 --> @patrakov commented on GitHub (Oct 20, 2022): Oops, the chip temperature is missing. ``` # sms_tool -d /dev/ttyUSB1 at "AT^CHIPTEMP?" AT^CHIPTEMP? ^CHIPTEMP: 473,473,65535,35,65535 ``` I have manually copy-pasted the awk command, and it prints the correct temperature. So the bug must be not in the parsing of the AT command response, but in how it is propagated to the json.
Author
Owner

@patrakov commented on GitHub (Oct 20, 2022):

The problem is due to the inappropriate reuse of the $O variable:

O=$(sms_tool -d $DEVICE at "at^chiptemp?;^hcsq?")                                                                                                       
...
O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs)                                  
...
T=$(echo "$O" | awk ...)   # of course it won't find the temperature in the AT+CIMI response
<!-- gh-comment-id:1285303825 --> @patrakov commented on GitHub (Oct 20, 2022): The problem is due to the inappropriate reuse of the `$O` variable: ``` O=$(sms_tool -d $DEVICE at "at^chiptemp?;^hcsq?") ... O=$(sms_tool -d $DEVICE at "AT+CIMI" | xargs) ... T=$(echo "$O" | awk ...) # of course it won't find the temperature in the AT+CIMI response ```
Author
Owner

@4IceG commented on GitHub (Oct 20, 2022):

Ok thanks for the tests. I'll fix it tomorrow.

Can't find a command for reading PCI so left blank.

<!-- gh-comment-id:1285329807 --> @4IceG commented on GitHub (Oct 20, 2022): Ok thanks for the tests. I'll fix it tomorrow. Can't find a command for reading PCI so left blank.
Author
Owner

@4IceG commented on GitHub (Oct 21, 2022):

It should be OK.

<!-- gh-comment-id:1286922353 --> @4IceG commented on GitHub (Oct 21, 2022): It should be OK.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/luci-app-3ginfo-lite#18
No description provided.