Huawei is a leading brand all over the world among ZTE, Micromax, Sierra, Alcatel etc. Huawei keeps launching new modems in the market with some intervals with the help of network provider. Hence, we are updating here some cool Huawei modem AT commands which will help you to diagnosis the Huawei modem. If you have stuck somewhere then these at commands will be very helpful to you.
Useful At Commands for Huawei Modem

1. Unlocking Commands

AT^CARDLOCK

Usage :

-> AT^CARDLOCK? give information like this :
^CARDLOCK: 1,10,0 ………… locked,10 is your lock counter
^CARDLOCK: 2,10,0 ………… unlocked

-> AT^CARDLOCK=”xxxxxxxx”
where xxxxxxxx is unlock code generated by your IMEI…

-> AT^CARDLOCK=md5 hash of your IMEI unlock code
i.e.

 

If your unlock code is 99999999 then its MD5 hash reset code will be
ef775988943825d2871e1cfa75473ec0

and your command will be as below :
AT^CARDLOCK=”ef775988943825d2871e1cfa75473ec0″

2. Diagnostic AT Commands

AT^U2DIAG

Usage :

AT^U2DIAG=code : where code is specific number of command set given below :
AT^U2DIAG=0   : Modem Mode
AT^U2DIAG=1   : Modem and CD-Rom Mode
AT^U2DIAG=255   : Modem+CD-Rom+Card-Reader Modem+ Factory  Defaults Setting
AT^U2DIAG=256   : Modem+Card-Reader Mode
AT^U2DIAG=257   : Disable Application Port
AT^U2DIAG=276    : Reset to factory Defaults

3. Voice AT-Commands

AT^CVOICE

Usage :

AT^CVOICE=? : Gives Status of your modems voice
AT^CVOICE=0 : Enable Voice
AT^CVOICE=1 : Disable Voice

4. other AT-Commands

ATI : Gives Manufacture Information of Modem
AT^CGMR : Gives firmware version of Modem
AT^CGSN : Gives IMEI of Modem
AT^CIMI : Gives IMSI of Modem

Update:

AT ^ CFUN = 1 : restart the modem
AT ^ CGMI : a modem manufacturer information (you will receive Huawei)
AT ^ CGMR : information about the firmware version
AT ^ CIMI : information about the IMSI number of the SIM card
AT ^ CGSN : information about IMEI modem
AT ^ HWVER : information about the version of the modem hardware
AT ^ CSQ : view the signal strength
AT ^ CMDL : get a list of all the commands AT + CGMM or the AT + GMM – ask for the name of the model AT + COPS – information about the current operator

AT ^ U2DIAG : The current mode.
AT ^ GETPORTMODE : a list of all devices in the modem
AT ^ VERSION? – Information about the version of the modem firmware
AT ^ CLAC in response to a list of supported commands

 Enable / disable mode 2G and 3G:

AT ^ Syscfg = 13,1,3fffffff, 0,0 : only 2G mode
AT ^ Syscfg = 2,1,3fffffff, 0,0 : preferred 2G mode
AT ^ Syscfg = 14,2,3fffffff, 0.1 : only 3G mode
AT ^ Syscfg = 2,2,3fffffff, 0.1 : preferred mode 3G
AT ^ Syscfg = AT 2,2,3fffff ff, 0.2 : switching mode 2G and 3G

Enable / disable mode WCDMA, HSDPA, HSPA +, HSPA:

AT ^ HSDPA = 1 – HSDPA enabled
AT ^ HSDPA = 0 – HSDPA mode is off
AT ^ HSUPA = 1 – HSUPA enabled
AT ^ HSUPA = 0 – HSUPA mode off AT ^ HSPA = 0 – WCDMA mode
AT ^ HSPA = 1 – HSDPA mode
AT ^ HSPA = 2 – HSPA mode
AT ^ HSPA = 3 : HSPA mode

AT ^ syscfg = 13,1,3FFFFFFF, 2,4 – only mode GPRS / EDGE
AT ^ Syscfg = 14,2,3FFFFFFF, 2,4 – only mode 3G / WCDMA
AT ^ Syscfg = 2,1,3FFFFFFF, 2,4 – preferred mode GPRS / EDGE
AT ^ Syscfg = AT 2,2,3FFFFFFF, 2,4 – preferred mode 3G / WCDMA

AT-commands for the Huawei E171 modem firmware v21, E352, E353, E367 and E398:

AT ^ setPort = A1, A2,1,2,3,7 : set configuration for default

AT ^ setPort = A1, A2,1,2,3,7 : device in the “modem + network card

AT ^ GETPORTMODE : Displays the current active mode

Command for Huawei E1750:

AT ^ U2DIAG = 0 : device in modem mode only

AT ^ U2DIAG = 1 : device in modem mode + CD-ROM drive

AT ^ U2DIAG = 6 : the device in only NIC mode

AT ^ U2DIAG = 268 : the device in modem + CD-ROM + card Reader mode

AT ^ U2DIAG = 276 : device mode network card + CD-ROM + card Reader

AT ^ U2DIAG = 256 : the device into the modem mode + card Reader can be used as a normal USB flash drive, giving up the modem

AT ^ syscfg = 14,2,3fffffff, 1,2 : only 3G

AT ^ syscfg = 13,1,3fffffff, 1,2 : Only GSM

AT ^ syscfg = 2,2,3fffffff, 1,2 : 3G preferred

AT-command for Huawei E1820 (E182E):

AT ^ SYSCFG = 13,2,3fffffff, 1,2 : only the GSM
AT ^ syscfg = 2,1,3fffffff, 1,2 : GSM preferred
AT ^ syscfg = 14,2,3fffffff, 1,2 : only WCDMA
AT ^ syscfg = 2,2,3fffffff, 1,2 : preferred WCDMA

AT-commands for the Huawei E3131 modem:

AT ^ SETPORT = “A1, A2; 1,16,3,2, A1, A2” : Set default configuration
AT ^ SETPORT = “A1, A2; 1,2,3,16, A1, A2″ : mode for a modem with Android 4.0 (may work)
AT ^ setPort = A2; 1,3,2 : device in the” modem only ”
AT ^ SetPort = FF; 1,2 : device in the “modem + user interface”)
AT ^ setPort = A2; 2.16 : device in the “NIC” mode

AT-commands for Huawei E3131Hilink:

http://192.168.1.1/html/switchProjectMode.html
AT ^ U2DIAG = 0 : modem mode with com ports
AT ^ U2DIAG = 119 : returns to the original mode

AT commands for Huawei E303 HiLink:

http://192.168.1.1/html/switchProjectMode.html
AT ^ U2DIAG = 374 : modem mode with com ports
AT ^ U2DIAG = 375 : returns to the original mode

AT commands for Huawei E3272:

AT ^ SetPort = A2; 62,61,76 : restore default setting for MTS 824F of Russia
AT ^ SETPORT = “A1, A2 ; 10,12,16, A1, A2” : restore default setting for the Megaphone M100-4

AT commands for Huawei E3372:

at ^ SetPort = “2,2,3FFFFFFF, 1,2” : the default setting for MTS 827F

AT commands for Huawei E3276:

AT ^ SETPORT = “A1; 10,12,13,14,16 , A1, A2” : Includes all COM ports
AT ^ SETPORT = “A1, A2 ; 12,16, A1, A2” : Default setting
at ^ setPort = “A1; 10,12” : only mode modem

AT commands for Huawei E3531:

AT ^ SETPORT = “A1, A2 ; 1,16,3,2, A1, A2” : The default setting for MTS 423S
AT ^ FHVER : shows information about the firmware version

AT commands for huawei modems with LTE (E392, E398):

AT ^ SYSCFGEX = “03”, 3fffffff, 2,4,7fffffffffffffff ,, : only LTE mode

Here the first value of this command stands as follows:

00 – Automatic mode is selected by default (in the order of priorities of the queue: 4G> 3G> 2G)
01 – GSM GPRS (2G)
02 – WCDMA (3G)
03 – LTE (4G)
99 – Leave the current settings unchanged

You can also choose the order of their priority, in descending order, for example: the AT ^ SYSCFGEX = “0302”, 3fffffff, 2,4,7fffffffffffffff ,, In this case, the modem will attempt to connect to the LTE network first, and then to the 3G network, but work 2G networks. or an option: aT ^ SYSCFGEX = “030201”, 3fffffff, 2,4,7fffffffffffffff ,, this is equivalent to AT ^ SYSCFGEX = “00”, 3fffffff, 2,4,7fffffffffffffff ,,

Note: I will suggets you to not play with commands.

9 COMMENTS

  1. Hi and thank you for the info above, I hope you can help with my problem: Do you have any idea on how to disable virtual CD-ROM on the Huawei E3531s – my router won’t recognize the modem, it just see it as usb disk. My E1552 works fine though, so I’m thinking that the probleme is that the E3531 is recognized as cd-rom first and then modem. I would have used putty and the AT^U2DIAG=0 command, but the modem doesn’t seem to have an COM port.

    Hope you can help:)

    JBJ

  2. Hi I am using E3276 with Raspberry pi (Rasbian OS), my application is to connect to internet automatically thru sakis3g, i have written code to get connection automatically whenever the connection is down, which is working fine now. But the problem is, it continuously works for few days (2 days) and then the dongle is not getting connection to internet at all (it says ‘Failed to Connect’). The solution i tried which is working fine is, manually i remove the dongle from raspberry pi and then connecting it to laptop (Windows OS) and used to browse once in laptop and then connecting it to raspberry pi, then it works thru my automated code, that involved sakis3g. This scenario continuous as i said for few days and then…. I tried once a solution that passing AT+CFUN=1,1 (Modem Reset Command) at the instance of getting Failed to Connect Prompt. It was working. So i incorporated the same command in my code before getting connection thru sakis3g. It was also working. I was very hope that i have solved the issue. But again the problem comes with the same scenario. Pl help me to get out of this issue. Many Thanks.

Leave a Reply