Home / News / Modems: subtleties, tricks, secrets. What are AT commands for? What is at modem

Modems: subtleties, tricks, secrets. What are AT commands for? What is at modem

How to enter commands through Hyper Terminal

Features of AT commands for Huawei E1750

Supported AT commands for switching modes

The following commands work:




AT^U2DIAG=268 for E1750 (device in modem
CD-ROM Card Reader)
AT^U2DIAG=276 for E1750 (device in network mode)
CD-ROM Card Reader)
AT^U2DIAG=256 (device in Card Reader modem mode),
can be used
like a regular USB flash drive, refusing to install
modem drivers

But this command doesn't work:

AT^U2DIAG=255 (device in modem CD-ROM
card reader)

More commands to turn on / off
HSDPA, HSPA, HSPA , WCDMA modes

At^hspa=0 - wcdma
at^hspa=1 - hsdpa
at^hspa=2 - hspa
at^hspa=3 - hspa
at^hspa=4 say the speed is going up.

You can use commands

AT^HSDPA=1 HSDPA mode
AT^HSDPA=0 disabled
AT^HSUPA=1 HSUPA mode
AT^HSUPA=0 disabled

Tested on Huawei E1750, E1550, E1820 modems
Basically it should work for everyone.
support entering commands through the hyperterminal.

On the Huawei E1750 modem, enable / disable
these commands: ("AT^HSPA=1"; "AT^HSUPA=0")
improves communication stability.

You can also enter through DC-Unlocker. After
modem definitions in the window with information about
device (just below the strip) enter the desired
command and press ENTER. should appear
confirmation of the completed operation.
Switching the modem. Everything.

To enter commands, you need to connect to
modem via Hyperterminal: On XP C:\Program Files\Windows NT\Hyperterminal (should be disconnected from the Internet) For Vista and Windows7 you will have to download it
1. Launch the terminal
2. The "Connection Description" window appears. In the "Name" field, write something as the name of the connection and click OK. If the window does not appear automatically, select File - New Connection from the menu.
3. In the "Connection" window, select Connect via: Huawei .... and click OK
4. In the next "Connection" window, click the Change ... button and get into the "Properties of your_connection_name" window
5. On the "Parameters" tab, click ASCII Options -> Display entered characters on the screen, click OK twice.
6.Click Cancel
7. Enter the AT command and press ENTER, the modem should reply "OK"
8. Enter the command you need and press ENTER again, "OK" should come. Everything.

AT^U2DIAG=0 (device in modem only mode)
AT^U2DIAG=1 (device in CD-ROM modem mode)
AT^U2DIAG=255 (device in CD-ROM Card Reader modem mode) - not supported by Huawei E1750
AT^U2DIAG=256 (device is in Card Reader modem, you can use
like a regular USB flash drive, refusing to install modem drivers)

Helps with exhausted attempts to enter the NCK code
from the computer keyboard.
AT^CARDLOCK=""

AT^SYSCFG=2,2,3ffffff,0,2 (enable 2G,3G)

6. Press ENTER
7. Then click Disconnect and distort the modem. You can also enter commands like this: In the modem properties: Start-Control Panel-and modem-Modems-Select your modem-Properties-Add. communication parameters-Add. initialization commands and write the desired command.

Same way commands can be entered using the program. Just type an AT command in the log window and press ENTER. It is worth noting that the modem after the introduction of the AT ^ U2DIAG=0 command (device in modem only mode) works more stable and faster. Here's another one good program by Alexander S. Shokin. Terminal program for direct work with Huawei wireless modems, as well as (limitedly) with any other modems. How to enter these programs.

If the modem does not accept the command: AT^U2DIAG=255 (device in CD-ROM Card Reader modem mode) which happens very often, try typing: AT^U2DIAG=1 (device in CD-ROM modem mode) helps


Another useful command: AT CFUN=1 will reboot the modem with subsequent re-registration in the operator's network without juggling the modem.
Be careful with the commands AT^U2DIAG=4, AT^U2DIAG=5, AT^U2DIAG=6, they can put your modem into "only LAN card". If, nevertheless, the modem switched to the network card mode and does not want to go back, .

More AT commands for code entry

AT^CARDUNLOCK="nck md5 hash" Reset attempts to 10

AT^CARDLOCK="nck code" Unlock

AT^CARDLOCK? Check blocking and number of attempts
in response, the modem will issue
CARDLOCK: A,B,0
A -> 2- means that there is no symlock, 1-if the modem is locked
B -> number of remaining unlock attempts. New modem = 10

^SETPORT:A: BLUE TOOTH
^SETPORT:A1: CDROM
^SETPORT:A2: SD
^SETPORT:1: 3G MODEM
^SETPORT:2: 3G PCUI
^SETPORT:3: 3G DIAG
^SETPORT:5: 3G GPS
^SETPORT:10: 4G MODEM
^SETPORT:12: 4G PCUI
^SETPORT:13: 4G DIAG
^SETPORT:14: 4G GPS
^SETPORT:16: NCM

AT^SETPORT? - display of the current port configuration (for the Megafon M150-1 modem)

Modem modes

^SETPORT:"A1,A2;12,16,A1,A2" - NCM (Network Card Mode) enabled (default)
^SETPORT:"A1,A2;1,2,3" - 3G modem only mode enabled
^SETPORT:"A1,A2;10,12,13" - 4G modem only mode is enabled

AT^CHIPTEMP? - displaying the temperature of the HiSilicon Balong 710 modem chip
^CHIPTEMP: 446,446,65535,34,65535
^CHIPTEMP: 588,588,65535,45,65535

AT commands for Huawei e3372 modem

At^setport="a1,a2;10,12,16,a1,a2" - factory mode, all AT ports, network card, CD, card reader are visible.

At^setport="ff;10,12,16,a2" - mode without switching. Convenient for use in routers. After connecting, the modem immediately appears as 2 AT ports, a network card and a card reader.

At^setport="FF;10,12,16,5,A,A1,A2" - composition with all devices included in the modem. Convenient for those who need to have access to modem consoles.

AT^SYSCFGEX="00",3FFFFFFF,1,2,800C5, - register in all possible networks and bands
AT^SYSCFGEX="0302",400000,1,2,800C5, - register in the LTE network, if LTE is not available, then in 3G (the modem will not register in 2G networks). For LTE, all bands are available, for 3G - only the 2100 band.

The most used at commands when working with Huawei modems

ATI - output information about the modem
AT CFUN=1 - reboot the modem without poking in the port
AT CGMI - information about the modem manufacturer
AT CGMR - firmware version information
AT CIMI - information about the IMSI number of the SIM card
AT CGSN - modem IMEI information
AT^HWVER - information about the modem hardware version
AT CSQ - radio signal strength
AT^CMDL - get a list of all commands
AT CGMM or AT GMM - model name
AT COPS - information about the current operator
AT^U2DIAG? - current mode.
AT^GETPORTMODE - list of all devices in the modem
AT^VERSION? - information about the modem firmware version
AT CLAC in the response will be a list of supported commands

Enable or disable 2G and 3G modes:

AT^SYSCFG=13,1,3ffffff,0,0 – 2G only mode
AT^SYSCFG=2,1,3ffffff,0,0 – 2G preferred mode
AT^SYSCFG=14,2,3fffffff,0,1 – 3G only mode
AT^SYSCFG=2,2,3ffffff,0,1 – 3G preferred mode
AT^SYSCFG=2,2,3fffff ff,0,2 – enable 2G and 3G mode

Enable or disable WCDMA, HSDPA, HSPA , HSPA modes:

AT^HSDPA=1 – HSDPA mode enabled
AT^HSDPA=0 – HSDPA mode disabled
AT^HSUPA=1 – HSUPA mode enabled
AT^HSUPA=0 – HSUPA mode disabled
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 – GPRS/EDGE only mode
AT^SYSCFG=14,2,3FFFFFFF,2,4 – 3G/WCDMA only mode
AT^SYSCFG=2,1,3FFFFFFF,2,4 – preferred GPRS/EDGE mode
AT^SYSCFG=2,2,3FFFFFFF,2,4 – 3G/WCDMA preferred mode

Commands required to unlock the modem (modem unlock)

AT^CARDLOCK="NCK Code" – code entry and unlock
AT^CARDUNLOCK="MD5 NCK Code" - reset attempts to enter a code
AT^CARDLOCK? – checking modem blocking and code entry attempts
For example, the modem's response is CARDLOCK: A,B,0, if A=2 the modem is unlocked, A=1 the modem is locked - SimLock, if A=3 there are two options either you have used up all 10 attempts to enter the code, or you have customized firmware in your modem , B - the number of remaining attempts to enter the unlock code (default 10 times))

Changing modem mode
AT^U2DIAG= change modem mode CD ROM, Flash, PC UI, NDIS

AT commands for Huawei E171 modems with firmware v21.156.00.00.143, E352, E353, E367, E398, etc.

AT^SETPORT="A1,A2,1,2,3,7,A1,A2" (Set default configuration)
AT^SETPORT="A1,A2,1,2,3,7" (device in modem network card)
AT^SETPORT="A1,A2;1,2,3,A2" (device in "Modem Card Reader" mode)
AT^SETPORT="A1,A2;1,2,3" (device in "modem only" mode)
AT^SETPORT="A1,2,7" (device in "network CD-ROM" mode)
AT^SETPORT="A1,A2,2,7" (device in network card mode) - for Windows 7
AT^SETPORT="A1;1,2" (device in modem user interface")
AT^SETPORT? ( current configuration modem)
AT^GETPORTMODE (Display current active mode)
AT^SETPORT="A1,A2,1,2,3,7,A1,A2,4,5,6,A,B,D,E" (Reset default settings)

Default network mode settings for Huawei E352
at^hspa?
^HSPA: 2
AT^SETPORT?
A1,A2;1,2,3,7,A1,A2
AT^SYSCFG?
^SYSCFG:2,2,3FFFFFFF,1,2

Network mode settings for Huawei E352b with firmware 21.158.23.00.209
AT^SETPORT?
A1,A2;1,16,3,2,A1,A2

AT commands for Huawei E1750 modem
AT commands switching modes huawei E1750
AT^U2DIAG=0 (device in modem only mode)
AT^U2DIAG=1 (device in CD-ROM modem mode)
AT^U2DIAG=6 (device in network card only mode)
AT^U2DIAG=268 for E1750 (device modem CD-ROM Card Reader)
AT^U2DIAG=276 for E1750 (device in network card mode CD-ROM Card Reader)
AT^U2DIAG=256 (the device is in Card Reader modem mode, can be used as a regular flash drive)
AT commands switching network modes huawei E1750
AT^SYSCFG=14,2,3fffffff,1,2 (3G only)
AT^SYSCFG=13,1,3ffffff,1,2 (GSM only)
AT^SYSCFG=2,2,3ffffff,1,2 (3G Priority)

AT commands for switching network modes for Huawei E1820 (E182E) modem
AT^SYSCFG=13,2,3ffffff,1,2 - GSM only
AT^SYSCFG=2,1,3ffffff,1,2 - predominantly GSM
AT^SYSCFG=14,2,3fffffff,1,2 - WCDMA only
AT^SYSCFG=2,2,3ffffff,1,2 - mainly WCDMA

AT commands for 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" - (modem for Android 4.0 (sometimes works))
AT^SETPORT="A1,A2;1,16,3,2" - (device in modem network card)
AT^SETPORT="A1,A2;1,3,2,A2" - (device in "Modem Card Reader" mode)
AT^SETPORT="A1,A2;1,3,2" - (device in "modem only" mode)
AT^SETPORT="FF;1,2" (device in modem user interface)
AT^SETPORT="A1,A2;2,16" - (device in network card mode)
AT^SETPORT="A1,A2;2,16,A1" - (device in "network CD-ROM" mode)

AT commands for Huawei E3131Hilink modem
Here's the link
AT^U2DIAG=0 Switch modem from Hilink mode to com port mode
AT^U2DIAG=119 Return to original mode

AT commands for Huawei E303 HiLink modem
Here's the link
AT^U2DIAG=374 Switch modem from Hilink mode to com port mode
AT^U2DIAG=375 Return to original mode

AT commands for Huawei E3272 modem
AT^SETPORT="A1,A2;62,61,76,A1,A2" - Default setting for MTS 824F.
AT^SETPORT="A1,A2;10,12,16,A1,A2" - Default setting for Megaphone M100-4.

AT commands for Huawei E3372 modem
AT^SETPORT="A1,A2;A1,A2" - Default setting for MTS 827F.
AT^SYSCFG="2,2,3FFFFFFF,1,2" - Default setting for MTS 827F.

AT commands for Huawei E3276 modem
AT^SETPORT="A1;10,12,13,14,16,A1,A2" - Includes all COM port s.
AT^SETPORT="A1,A2;12,16,A1,A2" - Default setting.
AT^SETPORT=”A1;10,12” - modem only mode
AT^SYSCFGEX? - default value
^SYSCFGEX:"00",3FFFFFFF,1,2,800C5
AT^SYSCFGEX=?
^SYSCFGEX: ("00","01","02","03"),((2000000400380,"GSM900/GSM1800/WCDMA900/WCDMA2100"),(2a80000,"GSM850/GSM1900/AWS/WCDMA1900"), (3fffffff,"All bands")),(0-2),(0-4),((800c5,"LTE_B1/LTE_B3/LTE_B7/LTE_B8/LTE_B20"),(7fffffffffffffff,"All bands"))
AT^FHVER - shows information about firmware version and HW version (^FHVER:"E3276s-210 21.260.05.00.143,CH2E3276SM Ver.B")

AT commands for Huawei E3531 modem
AT^SETPORT="A1,A2;1,16,3,2,A1,A2" - Default setting for MTS 423S.
AT^FHVER - - shows information about firmware version and hardware version (^FHVER:"E3531s-1EA 21.318.15.00.143,CH1E3531SM Ver.A")

AT commands for switching modes in Huawei modems with LTE (E392, E398)
If the mode is only LTE, turning off all the others, enter the AT command:
AT^SYSCFGEX="03",3fffffff,2,4,7fffffffffffffff,
The first value is deciphered as follows:
00 - Auto mode first come first served: 4G > 3G > 2G
01 - GSM GPRS(2G)
02 - WCDMA(3G)
03 - LTE(4G)
99 - Current settings unchanged.

As previously stated, dTo start communicating with a newly baked module, you must send the "AT" command. Then it will automatically adjust the port speed and return "OK". Now that the speed is set, you need to fix it so that you do not perform this action every time you turn it on. The following commands are used to configure the port:

AT+IPR=19200- port speed setting.

You can set the following values: 0, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
0 - autoselect, this value is the default.

You can also set the transfer mode:

AT+ICF=3.3

First number - data bits/parity/stop bits
1. 8/0/2
2. 8/1/1
3. 8/0/1, is the default.
4. 7/0/2
5. 7/1/1
6. 7/0/1
The second number is even
0 - odd
1 - even
3 - no

After configuration, these parameters will be saved in the non-volatile memory of the module, so next time you will not have to do these actions.

AT+GMM- module identifier.

The module will return the manufacturer and model in response: "SIMCOM_SIM900D"

AT+GOI- shorter module identifier.

Only "SIM900D" comes in response

AT+GMR- firmware version.

It may come in handy if you want to upload a different firmware version to the module.

AT+GSV- it includes all three previous commands.

Returns the manufacturer of the module, its model and firmware version.



AT+GSN- will return the IMEI of the module.

It can be useful when you need to accurately identify the module. IMEI is also duplicated on the label pasted on the module, and they must match.

The next step is to set the real time clock of the module. To do this, issue the following command:

AT+CCLK="yy/mm/dd,hh:mm:ss+zz"

where are they in order « year/month/date, hour:minutes:seconds+timezone» The data must be sent with leading zeros, that is, for example, if we have "4" for the month, then "04" should be sent.

You can get back the current time and date by sending the same command, only with the "?" sign:

AT+CCLK? - read the time from the module


ATE0- echo mode
0 - disabled
1 - enabled. It is by default.

ATV0- module response format.
1 - full text response with echo (if enabled). It is by default.
0 - return only the response code.
In the first case, OK, ERROR, etc. will always be returned, and in the second, result codes will be returned. So instead of OK it will return 0, and instead of ERROR 4.

AT+CMEE=0- error information level. Can be from 0 to 2.
0 - disabled. It will just write ERROR.
1 - error code. Will return a numeric error code.
2 - error description. He will write what exactly he does not like in the team.
To work with the module through the terminal, it is more convenient to use the ATV1, ATE1 AT+CMEE=2 modes, to communicate with the microcontroller it is better to use ATV0, ATE0 and AT+CMEE=0 - this way it will be easier to process the received responses.

These settings are not saved after the module is reloaded, so these commands must be included in the program code.

Now let's look at information about the GSM network. For example, you can find out the quality of the signal.

AT+CSQ- information about signal quality.
The module will return two numbers +CSQ: 17.0
17 - signal level. It can be in the range 0..31 or 99. The more the better, but 99 means none.
0 - coefficient of communication errors (so-called RXQUAL). It can be from 0 to 7, the lower the number, the better the quality of the connection.


AT+COPS?- information about the operator in whose network the module is registered.
You can also make a request in the form AT+COPS=? After a sufficiently long search, the module will display a list of found networks.


Well, now the commands that allow you to use cellular communication by appointment.

ATD1234567890;- dialing a number.

The module will call the specified number and return one of the options

BUSY - number is busy
NO DIALTONE - no signal on the line

NO CARRIER - no network or other problem (for example, no money in the account)
NA ANSWER - no answer
CONNECT - there is a contact!

If the number is saved, for example, on the SIM card, and SIM card is selected as the phone book (usually, as it is by default), then there is a command to call it ATD>1;. The numeric value specifies the number of the card cell where the called number is stored.


AT+CLIP=1- enable identification of incoming call number

If you send a command from 0, the caller ID will be disabled and the module will send only the "RING" message instead of the caller's number.

ATA- pick up the phone.


ATH0- break all connections. It can take the values ​​0..5, indicating which types of connection should be broken.

ATS0=0- with this command, you can set how many beeps will pass before the handset is automatically lifted. 0 - only manually, by default.

AT+GSMBUSY=1- barring all incoming calls.
1, - bar all incoming calls
0, - allow incoming
The result of this command is not stored in memory and must be repeated at each power-up.

It is better to send a request to #100#, since the message is sent to *100# in hexadecimal format:


AT+CMIC=0.15– command for setting the microphone sensitivity. The sensitivity is determined by the numeric value that comes after the = symbol. It is used very often in alarm systems - for audio monitoring of a protected room. By experimenting with this value, you can achieve the audibility of the slightest rustle.

When receiving an SMS, the module will report this by sending a message to the terminal"+CMTI:"SM",3" . Where 3 means the number of the received message.

To read SMS, you can use the command AT+CMGR=3.0 (3 is the number of the message we want to read, 0 is to change the status of the message to read)

In response, the module will send information about who sent the message and at what time. "REC UNREAD" means that the message has the status of unread.


AT+CMGDA="DEL ALL" command will delete all messages

It is also possible to delete only a certain type of messages:

"DEL READ" - read
"DEL UNREAD" - unread
"DEL SENT" - sent
"DEL UNSENT" - not sent
"DEL INBOX" - received
"DEL ALL" - all messages

AT command is used to control some of the modem's functions. Commands can be entered special programs, it's much easier than the built-in Windows XP hyperterminal. To do this, you can use the following programs: or Before using these programs, you must close all other programs that can use the modem. For Huawei modems, you need to connect to the COM port " 3G PC UI Interface", for modems ZTE MF on the COM port "ZTE Proprietary USB Modem". How to use, look at the pictures, everything is quite simple. If there are several commands, first enter one - click Enter, then the next and again press Enter.

Download:

My Huawei Terminal (Huawei modem terminal)


Huawei Terminal- a terminal program for direct work with Huawei wireless modems, as well as (limitedly) with any other modems.

We launch. Select in the window HUAWEI Mobile Connect - 3G PC UI Interface Click To plug (Connect)

To be sure that you are really connected, type the command AT and click send: If in response from the modem OK. So you did everything right and everything is ready to work with the modem.

AT^CARDLOCK="NCK Code", where NC Code 43963141 AT^CARDLOCK="43963141". Paste the command AT^CARDLOCK="43963141" and press the button ENTER keyboard.

Download:


DC unlock client the first program in the World that began to specialize in unlocking wireless 2G \ 3G \ 4G modems of the USB \ PCMCIA form factor. With time the lineup began to expand mobile phones, smartphones, WiFi routers.

Downloading the program DC unlock client and install it. Then we launch.
1. Next, change the language to Russian. Click Options and choose Russian

2. We choose the manufacturer of the modem or router in our case, this is Huawei. Click on Lupu as shown in the picture and reading information will go. Attention! the native program from the modem must be closed). After reading the information you will see SIM lock status - Blocked

3. Next, we need to run the command AT^CARDLOCK="NCK Code", where NC Code is the unlock code you purchased from us. For example code 12860791 then our command will look like this AT^CARDLOCK="12860791". Paste the command AT^CARDLOCK="12860791" at the bottom of the read information and press the button ENTER keyboard.

4. After clicking on ENTER the code will be entered into our device and a message will appear OK

5. Click again on Lupu to reread the information. And you'll see where SIM lock status- inscription Unlocked

That's all. Our device has been successfully unlocked.


AT^CARDLOCK="NCK Code"– Entering the unlocking code (8-digit number). NC Code is the unlock code. Command example AT^CARDLOCK="12345678"


Download:


Also in this program you can see other parameters of the modem.

AT commands are designed to control modems. In fact, these are strings of characters that begin with the letters AT and end with carriage returns. However, in the initialization line, closing elements are generated automatically. AT command characters can be either uppercase or lowercase. Spaces can be placed between individual commands.

Additional features

In addition to performing basic actions related to switching modem modes, AT commands can control the S-registers of a communication device. They contain a variety of service information that is necessary to ensure the modem's performance. For example, the S-register can store constants that determine the timeout, the types of protocols used, the levels of input and output signals, and so on. The number of registers is determined by the modem developer, sometimes their total number is several hundred. However, it is assumed that the first 13 such nodes retain the designation determined by the manufacturer. Despite the fact that each user can modify and read the contents of S-registers at his own discretion, one should not forget that there is a very complex relationship between data in various nodes of the system. So an arbitrary change in any registers can lead to the fact that in the future it will be impossible to use standard programs for working on the Internet.

Basic AT commands that are most commonly used in modems

1. L0-L3 - means speaker volume. The numbers correspond to the minimum, low, medium and maximum level.

2. In - means a request for data from the modem's ROM, where n corresponds to the number of the first command.

3. M0-M3 - the state of the speaker, where:

0 - disabled device;

1 - the speaker is turned on from “hooking up” and until the moment when the connection is established;

2 - the device is always off;

3 - the speaker turns on only after pressing the last digit in the number, and turns off after the communication session is established.

4. P and T - corresponds to the use of pulse (PULSE) and tone (TONE) dialing.

5. S - work with modem registers. SO? matches the SO site content request. SO=1 means assigning one status to this register.

6. Z - implies that the content of all nodes is set to the initial level.

7. &F - corresponds to the restoration of information in the S-registers of the modem from the read-only memory device. This data is written by the modem manufacturer and cannot be changed by the user.

8. &W - means writing the contents of all registers to a special non-volatile memory in order to save the user's settings.

AT commands for GSM modems

According to the GSM 07.07 standards, the control for determining the "context" must have the following form: +CGDCONT=[[, [,[,[,[,[,[,…[,pdN]]]]]]]]]. Let's look at what this entry means (AT command):

1. cid is the context identifier. Always an integer with a "+" sign. Its maximum value is determined by the device model.

2. PDP_type - means protocol type.

3. APN - the name of the access point, set by the mobile operator.

4. d_comp means PDP data compression, where 0 is off, 1 is on.

5. h_comp - corresponds to PDP header compression, where 0 - off, 1 - on.

6. pd1 …pdN - implies string parameters specific to this type of protocol.