How to send AT commands to the router modem? AT commands modem At commands modem huawei for hyperterminal.

AT commands for 4G modem are a set of short text strings intended for control and represent command operations to change a parameter.

Modems are controlled using AT commands through Windows HyperTerminal programs (built into Windows XP), Huawei HyperTerminal (command terminal for Huawei modems and not only) or other alternative terminal programs.

How to enter AT commands into a 4G modem

In order to connect the program for entering commands, you need to have a PC or laptop with the installed Windows operating system at hand, a modem that must be unlocked or changed its settings, a cable connecting the modem and the PC (with data transfer function) After you have installed HyperTerminal, connect the modem to the PC with a cable. The program should see the device, indicating the COM port of the USB connection.

Now our 4G modem is ready to change its basic parameters and settings. But on some devices, AT commands may be ignored and not accepted. Why, we will describe it in the next chapter.

Why 4G-modem "does not see" AT-commands

Developers and manufacturing firms did not sit idly by all this time when the Internet community successfully allowed access to the hidden settings of 3G modems. Some newer models of LTE modems block AT commands. However, this is not so difficult to overcome with a few manipulations.

How to make the modem understand commands

In order for your USB modem to be able to accept AT commands, you need to change the firmware to a modified or old one (with support for entering commands). But the developers did not stop there either: sometimes when you unlock the input of AT commands, they become completely useless until you do not put the device in a certain mode (for example, in Factory Mode)

Huawei E3372 - MTS 827F / 829F - MegaFon M150-2 can be switched to Factory Mode by command AT ^ SFM \u003d 1

In its work, any modem uses a certain set of procedures or specific commands that have been universal since 1977 and have not changed since that time, but only supplemented with the advent of new communication standards. Using the commands, you can configure the modem, unlock it, check its operability and for other purposes.

The history of the appearance of AT commands

AT command is an abbreviation of the English word attention, which was proposed by Hayes when developing its own Smartmodem 300 baud modem. The use of a short set of text commands in a special format was so successful that it became the standard for other manufacturers. This standard is described in a special document from the International Telephony and Telegraphy Association and has been issued several times with additions and explanations.

With the advent of the GSM communication standard, manufacturers did not abandon such a successful solution. A standard for AT commands was developed, which describes the operation of modems in the GSM07.05 and GSM07.07 modes. Many manufacturers of communications equipment can use their own developed AT commands, but these commands only expand the capabilities of standard commands when it is necessary to use specific functions.

Connecting to a modem and entering commands

In order to be able to control the modem through commands, you need to connect to it. Connection can be made in several ways:

  • through a Windows utility called "Hyperterminal";
  • through the terminal for operating systems of the * nix family;
  • using special programs provided by modem manufacturers, for example, "My Huawei Terminal" or "Huawei Modem Terminal" for Huawei modems;
  • through third-party programs such as Terminal or PuTTY.

To connect the terminal shell to the modem, you need to know which port is used by the modem and what is the data exchange rate on the port. For Windows operating systems, such information can be obtained as follows:

  • right-click on the "My Computer" shortcut and select properties;
  • a new window will open in which you need to click the "Device Manager" button;
  • find the required modem in the list of installed devices and display its properties;
  • the "Modem" tab will display the necessary information, such as the COM port and the operating speed.

This information should be remembered or written down. For USB modems, the connection via the COM port will be virtual, through the emulator, but this will not affect the connection.

Next, you need to run the terminal emulator program and connect to the modem using the already known parameters. It should be noted that the Hyperterminal program is only present in Windows XP or earlier. In older versions, for example, in Vista or Seven, you will need to download it from the Internet. After a successful connection to the modem, a notification will appear in the invitation line. Modem AT commands are entered only when the modem is in terminal mode or off-line mode. Entry is as follows:

  • Each command must be preceded by the AT prefix, as if it tells the modem that the command will go next.
  • The prefix is \u200b\u200bfollowed by the connecting symbol "+", "&" or "^".
  • At the end, the command itself is entered with parameters.
  • Input is completed by pressing the "Enter" button on the keyboard or "Send" in the terminal window.

To check if the modem accepts commands and if there is any reaction to the input, you just need to send it "AT" without parameters. The following lines should appear in the terminal window (depending on the modem, they may differ, but the general principle of output does not change):

Status / Recieve: OK

If the output is approximately in this format, then you can work with the modem by entering commands. If an error was made in any command, the modem will report this with the appropriate status.

Setting up a Huawei modem using Hyperterminal

AT commands for huawei modem are based on common standards and differ only depending on the modem model. Those. some modems may have commands that are not available on others. Setting up the modem is necessary in some cases, for example, when used in conjunction with routers, when there is a conflict of equipment operation with each other, or to unlock a modem purchased from an operator and working only with its SIM cards.

When a modem is connected to a computer, the modem is defined as three devices: the modem itself, a CD-ROM drive (virtual), and a memory card (not for all modems). For more comfortable work, you can turn off the emulation of CD-Rom and Flash-cards. Step-by-step instructions on how to do this:

  1. We start the program "Hyperterminal".
  2. The program will prompt you to enter a new connection name and icon at startup. Any convenient name is entered.
  3. If you are not automatically prompted to create a new connection, then this is done through the "File" menu.
  4. The next step is to select the connection parameters: port number and port speed.
  5. After connecting the terminal to the device, turn on work only in modem mode with the command:
    • AT ^ U2DIAG \u003d 0 for Huawei modems of the E1550 and E1750 series;
    • AT ^ SETPORT \u003d "A1; 1,2" for E367, E352, E392, E353 and E171 series modems;
    • AT ^ SETPORT \u003d "A1; 1,2,3" for E369, E3131 modems;
  6. In order for the modem to reboot without having to disconnect it from the computer, execute the command AT ^ CFUN \u003d 1.

The device will now only work in modem mode, which will eliminate many of the problems of sharing with routers.

Very often it becomes necessary to "untie" the modem from working only with a specific operator or to unblock it. For this, there is also a direct possibility by performing Modem AT commands... The commands to unlock are as follows:

  • AT ^ CARDUNLOCK \u003d "nck md5 hash" to reset connection attempts to 10;
  • AT ^ CARDLOCK \u003d "nck code" to unlock the operator. This code can be calculated using a special calculator based on IMEI;

AT ^ CARDLOCK command? checks the lock status. In response to a request with this command, the modem will display information in the CARDLOCK format: A, B, 0, where A is the lock status in binary format (1 - there is a lock, 0 - there is no lock), B is the number of remaining attempts to unlock (for a new modem, this number of attempts is 10).

Basic AT commands and commands for Huawei modems

In practice, the following commands are very often used, which are informational, control or configuration commands:

  • ATI - the command displays complete information about the modem.
  • AT ^ CFUN \u003d 1 is a very useful command for practice that allows you to apply settings and reboot the modem without disconnecting it from the computer. After the device is rebooted, it will initialize and re-register in the network. The rest of the parameters for this command are as follows:
    • 0 - power saving mode or standby mode;
    • 1 - online mode;
    • 4 - offline mode;
    • 6 - device reset;
    • 7 - turn off the radio module.
  • AT ^ CLAC is an equally useful command that displays all AT commands supported by the modem on the terminal screen, and AT ^ CMDL informs about all AT commands.
  • AT ^ VERSION? - shows the firmware version of the modem.
  • AT ^ GETPORTMODE - gives information about all devices present in the modem, such as a virtual optical drive, storage device, modem, network card, etc.
  • AT ^ U2DIAG? - shows the currently set mode in which the device is operating.
  • AT + CGMI - displays information about the modem manufacturer, for example, huawei.
  • AT + CGMR - shows the firmware version of the modem.
  • AT + CIMI - gives information on the SIM card, namely its IMSI number.
  • AT + CGSN - you can see the IMEI of the modem.
  • AT ^ HWVER - shows information about the "iron" stuffing of the modem, shows its revision.
  • AT + CSQ - informs about the current level of the received signal from the operator.
  • AT + CGMM or AT + GMM - gives information about the model name of the modem.

In order to get information about all available operators, you need to enter the AT + COPS? Command. Information will be displayed in the following format:

  • Modem operation mode for operator selection: 0 - automatic, 1 - manual, 4 - automatically, if the manual connection failed.
  • Operator format can be displayed in long or short mode, or in network operator number mode.
  • Network availability information: 0 - unrecognized network, 1 - available network, 2 - current or connected network, 3 - network unavailable or blocked.

This is far from complete information about AT commands of modems and options for their use, you can find out in more detail by reading the specification or contacting the modem manufacturer specifically to be sure which commands and with which parameters are used in the modem.

To enter commands, you need to connect to the modem via HyperTerminal:

On XP C: \\ Program Files \\ Windows NT \\ Hyperterminal (The modem must be disconnected from the Internet).

For Vista and Windows7 you'll have to download it.

We connect the modem to the computer. We go to the "device manager". For those who do not know how to go there, you need to pr. Book. mouse click on "My Computer", select "Properties" and in the window that opens, on the left will be "Device Manager":

Select the "Modem" tab. And we remember the information: port number, port speed for the modem:

Download the HyperTerminal program (the file is available for download from our server). Launch and enter any name. Click "OK":

We select the port number that we remember. Click "OK" and in the window that opens, enter the speed that we also remembered:

HyperTerminal setup:

File\u003e Properties\u003e go to the Settings tab\u003e click "ASCIISetup"\u003e and check the boxes next to "Sendlineendswithlinefeeds" and "Echo typed characters locally".

In the window, enter the commands: ate1. We are waiting for an "OK" answer. Enter the command at ^ u2diag \u003d 0. After answering "OK" you can close HyperTerminal and remove the modem from the computer.

All. Modem switched to "Modem only" mode

Additional commands:

  • AT ^ U2DIAG \u003d 0 (device in modem only mode)
  • AT ^ U2DIAG \u003d 1 (device in modem + CD-ROM mode)
  • AT ^ U2DIAG \u003d 255 (device in modem + CD-ROM + Card Reader mode) - not supported by Huawei E1750
  • AT ^ U2DIAG \u003d 256 (device in modem + Card Reader mode, can be used as a regular USB flash drive, refusing to install modem drivers)

AT commands for Huawei E367, E352, E392, E353 and E171 modems with firmware 21.156.00.00.143:

  • AT ^ SETPORT? - Display of the current configuration
  • AT ^ GETPORTMODE - Displays the currently active mode
  • AT ^ SETPORT \u003d "A1, A2; 1,2,3,7, A1, A2" - Set default configuration
  • AT ^ SETPORT \u003d "A1, A2; 1,2,3,7" - Disable CD + SD
  • AT ^ SETPORT \u003d "A1, A2; 1,2,3, A2" - Disables NDIS and CDROM - only modem and flash drive remain
  • AT ^ SETPORT \u003d "A1, A2; 1,2,3" - "modem only" mode
  • AT ^ SETPORT \u003d "A1; 1,2" - Disables everything except the modem and service interface
  • AT ^ SETPORT \u003d "A1; 2.7" - CD + NDIS
  • AT ^ SETPORT \u003d "A1, A2; 1,2,3,7, A1, A2,4,5,6, A, B, D, E" - default reset

If you do not have time, the ability to independently configure the modem, there is an opportunity to purchase

In this article, we will look at how you can unlock a Huawei modem using AT commands, and how, in general, you can interact with a modem using them. As an example, let's take the currently popular model - Huawei E3272 ... As we wrote earlier, you can interact with the modem using AT commands through special terminal programs, for example HyperTerminal, PuTTy, Huawei Modem Terminal, etc. Let's see how to do this.

Entering AT commands into a Huawei modem using PuTTy

After the modem is installed in the device manager, additional devices should appear:

In the Modems section - Huawei Mobile Connect - Modem, in the Ports (COM and LPT) section - HUAWEI Mobile Connect - PC UI Interfac (COM5) (you may have a different port number, remember it, because it is through it that we will connect to a modem to enter AT commands) and in the Network adapters section - HUAWEI Mobile Connect - Network Card. As you can see, the modem is detected both on the COM port and as an NDIS network adapter. Now we launch PuTTy and set up a connection to the COM port. Please note that all processes that occupy the COM port of the modem must be closed when we connect to the modem using PuTTy. In this case, these are MegaFonInternet.exe and MegaFonInternetService.exe. We go into the task manager and complete these processes:

You can also do this from the console (Win + R -\u003e cmd -\u003e Ok) using the sequence of commands:

net stop "MegaFon Internet Service"

taskkill / f / im MegaFonInternet.exe

Set up Putty as follows and click the "Connection" button:

How can I find out the IMEI of the modem and the firmware version using AT commands?

Modem IMEI and firmware version can be found using ATI command, or AT + CGSN. Let's enter these two commands sequentially into the modem and see its answer:

ATI + CGSN Manufacturer: huawei Model: E3272 Revision: 21.436.05.00.209 IMEI: 867503013090647 + GCAP: + CGSM, + DS, + ES 867503013090647 OK

As you can see, the IMEI of the modem in this case is 867503013090647, the firmware version of the modem is 21.436.05.00.209. can be on our service. In response, you will receive an unlock code and a code requested when flashing the modem. For this IMEI, we will receive the following in response:

IMEI: 867503013090647 201 Algo Unlock Code: 72033153 Flash Code: 34262301

So the unlock code for our modem is 72033153. Let's enter it and check the lock status.

How to enter the unlock code into the modem using the AT command?

To do this, give the command AT ^ CARDLOCK \u003d "72033153", then check the lock status using AT ^ CARDLOCK? :

As you can see, the modem answered ^ CARDLOCK 2,10,0 - which means that it is unlocked and can now be used by SIM cards of any operators. Now we will look at how to do the same through DC Unlocker.

How to enter AT command into modem using DC Unlocker?

The easiest way is to use software DC Unlocker as a terminal program. Download the latest version DC Unlocker Client at the following link. Do not press any buttons in it (neither unlock, nor connect to the server, nor anything else we need), just click on the button with the magnifying glass in order for the client to identify your modem:

In the figure, this button is marked with number 1. Please note dC Unlocker log (log this is all the information in the window, it displays the model of your modem, firmware version, etc.) and the number of remaining attempts to enter the unlock code. If there are no attempts to enter the code, then it will no longer be possible to unlock the modem with the code. Enter the command below in the same window AT ^ CARDLOCK \u003d "nck code", where nck code is the unlock code you received. After the modem answers Ok, it will be unlocked.

Before using DC Unlocker as a terminal client, you must also make sure, as we did in the case of PuTTy, that none of the processes and services uses the COM port of the modem (if you have the program for connecting to the Internet that comes with the modem - it must be closed), or even better, terminate all the "extra" processes related to the modem through the task manager.

What to do if DC Unlocker does not detect the modem, does not see the COM port?

Make sure that the software that comes with the modem for Internet access (for example, Connect Manager or Megafon Internet, etc.) is closed. during operation, it uses the COM port of the modem. It also does not hurt to go to the task manager and stop all processes related to this software. Then run DC Unlocker again and try to identify the modem again. If the COM port is not visible even in this case, there is one trick. Download the official firmware for your modem (this can be done on the operator's website or, on any of the many mobile forums on the network, for example w3bsit3-dns.com and others) and run the flasher (DC Unlocker must be closed at this time). Go to the step where the flasher will ask you for the Flash code for flashing. Don't enter it! At the moment when the flasher asked you for the Flash code - the modem was already detected on the COM port, close the flasher and run DC Unlocker. The COM port should be visible and the modem will be detected.

How To Use Hyperterminal

Hyper Terminal is a special Windows XP application that allows you to connect to a remote computer over dial-up telephone lines using a modem or null-modem connection, and is also used as the main Telnet client in a Windows environment. Hyper Terminal can also be used to connect to remote services and message boards (BBS). In order to call the Hyper Terminal for execution, you must execute the following commands: Start-\u003e All Programs-\u003e Standard-\u003e Communication-\u003e Hyper Terminal (Start-\u003e All Programs-\u003e Accessories-\u003e Connections-\u003e Hyper Terminal). At the first start of the Hyper Terminal program, the user is prompted to pre-configure the remote connection. To do this, in the Name field of the Connection Description window that opens, enter an arbitrary name for the connection being created, and in the menu below, select one of the suggested icons for it. In the next window, entitled Connect to, enter the details of the telephone number with which you plan to connect. To do this, select your country of residence in the Country / region menu, enter the PBX code in the Area code field, which will be used to connect, in the Phone number field, enter the telephone number to connect to remote node, and in the Connect using menu, select the device through which the connection will be made. By default, this menu offers the modem installed in your system, but you can specify any port on your computer as an external device. In the next window, you need to select your location. This selection determines whether the country code and area code will be used when dialing, and whether the dialing mode is selected - tone or pulse. TIP If your modem automatically switches to tone mode when you try to dial a number, open the location settings window, in the My Location menu, click on the Dialing properties button, in the Phone and modem options window that opens select the current location, click the Edit button and in the General tab of the Edit location window that opens, set the Dial using switch to Pulse. You can now dial the far site by clicking the Dial button. When the basic Hyper Terminal connection is already configured, you can create another connection using the New connection item on the File command menu. Changing the parameters of an existing connection To change the parameters of the current connection, use the Properties item of the File command menu. In the Connect to tab, if necessary, change the country and region of your residence, city code, telephone number of the remote node, and the device through which the connection is made. You can disable the use of country and area codes when dialing a number by clearing the Use country / region code and area code check box. If you select the Redial on busy checkbox, the program will automatically dial to the remote node when the dialed number is busy. To configure the application settings for this connection, go to the Settings tab. The Function arrow, and ctrl keys act as switch allows you to configure the processing mode for pressing the function keys, Ctrl key and cursor control keys by the Hyper Terminal program: if this switch is set to the Terminal keys position, pressing the function keys will be recorded and transmitted to a remote computer; in the Windows keys position, keystrokes will only be processed by the operating system of the local computer. By using the Backspace key sends switch, you can configure the shortcut codes that will be sent to the remote computer when the Backspace key is pressed. The Emulation menu prompts you to select the standard of the terminal program that will be emulated when the Hyper Terminal connection is established, and the proposed list contains several options for emulating the most common Telnet clients. In the Backscroll buffer lines field, you can specify the number of lines that will be displayed in the terminal window while working with the remote computer. Finally, by clicking the ASCII Setup button, you can configure how ASCII characters are displayed in the terminal window. In particular, if you want a line feed to be automatically performed in the Hyper Terminal window after each command you send to a remote computer (this function is implemented by automatically adding a carriage return character CR and a line feed code to the end of each ASCII sequence sent to the remote computer) - LF), select the Send line ends width line feeds check box in the ASCII Setup window. To enable the same function not only for the data sent, but also for the received data, select the same checkbox in the Append line feeds to incoming line ends (ASCII) field located at the bottom of the window. Below you can adjust the time interval in milliseconds for displaying characters in the terminal window by checking the Echo typed characters locally checkbox and typing the appropriate values \u200b\u200bin the Line delay and Characters delay fields. Sometimes, for the correct display of 8-bit data received from a remote computer, it is necessary to convert them to the 7-bit ASCII standard. To enable this mode, select the Force incoming data to 7-bit ASCII check box. If you want to automatically wrap lines that exceed the geometric width of the program window in the Hyper Terminal working window, check the Wrap lines that exceed terminal width check box. Connecting to a Remote Computer Having created and configured a new connection, you can establish a connection with a remote computer by connecting to it using the Hyper Terminal program. To do this: open the connection you created earlier by running the sequence of commands Start-\u003e All Programs-\u003e Accessories-\u003e Communication-\u003e Hyper Terminal (Start-\u003e All Programs-\u003e Accessories-\u003e Connections-\u003e Hyper Terminal), and in the appeared sub- from the menu select the connection corresponding to the remote computer with which you want to establish a connection; as another option, open the Hyper Terminal window and, by clicking the Open button in the program toolbar, select the required connection in the window that appears. This window can also be called up by clicking on the Open item in the File command menu; if necessary, configure the connection parameters by clicking the Properties button in the opened connection window; switch the program to dialing mode by pressing the Dial button. Hyper Terminal will dial the number specified in the connection settings, and if the remote computer is ready, the connection will be established; if the connection you have established requires mandatory authentication, at the request of the remote computer, enter your account name and password in the terminal window. If the information is displayed incorrectly in the terminal window when typing Russian text, set a different font to display the data on the screen using the Font item in the View command menu. If the connection is broken, you can resume it by simply clicking the Call button in the program toolbar. File Transfer Hyper Terminal provides two separate mechanisms for transferring files to a remote computer. Sending a text file containing only any ASCII or Windows-encoded character set does not require special measures to ensure the accuracy of the information transfer, since corruption of one or more characters during the data reception process will not have any serious consequences. To transfer a simple text file to a remote computer, establish a connection, then select the Send text file item in the Transfer command menu, then select the file to be sent in the dialog box that opens (see the section “ Open File Dialog Box ”in Chapter 9). Authorize the file transfer session by pressing the Enter key. The request to receive the file you are transferring will be displayed in the terminal window of the remote computer as a message in the current connection window. The file will be transmitted as a stream of characters translated in real time, which the receiving party must redirect to a log file, which in turn is saved to disk. In order for a text file to be sent to a remote computer in the form of a file, it is better to proceed in the manner described below, which is suitable for sending files of any type to a remote computer. After the connection is established, call the Send File command from the Transfer command menu or click the corresponding button in the Hyper Terminal toolbar. The Send File dialog box will appear on the screen, in the upper field of which you should enter the path and name of the file to be sent, or find it manually using the Browse button, and in the menu below, select the protocol with which the file will be sent ... NOTE A protocol is a set of specifications by which data is exchanged between remote computers. Each of the protocols used by the Hyper Terminal program has its own properties and characteristics. The properties and capabilities of the data transfer protocols supported by the Hyper Terminal program are listed in Table. 14.2. Table 14.2. Properties of data transfer protocols supported by Hyper Terminal

Features of AT commands for Huawei E1750 Supported AT commands for switching modes The following commands work: AT ^ U2DIAG \u003d 0 (device in modem only mode) AT ^ U2DIAG \u003d 1 (device in modem + CD-ROM mode) AT ^ U2DIAG \u003d 6 (device in modem network card only mode) AT ^ U2DIAG \u003d 268 for E1750 (device in modem + CD-ROM + Card Reader mode) AT ^ U2DIAG \u003d 276 for E1750 (device in network card + CD-ROM + Card Reader mode) AT ^ U2DIAG \u003d 256 (device in modem + Card Reader mode), can be used like a regular USB flash drive ...

Most KernelChip modules (Ke-USB24A, Ke-USB24R, Ke-GSM, Ke-Box) are defined as virtual on Windows / Linux OS.

Sometimes you need to enable modem only mode. This requires the Hyper terminal program built into the Windows XP operating system.


AT Commands Huawei Modem for Hyperterminal - Unlock, flash 3G-4G USB modems, phones, smartphones and tablets.

  • The Hyper Terminal program is a special Windows XP application that allows you to do this in the Name field of the Description window that opens.
  • To enter commands, you need to connect to the modem via Hyperterminal: On XP C: \\ Program Files \\ Windows NT \\ Hyperterminal (The modem must be.
  • If you need the HyperTerminal program in Windows 7, then I dare to disappoint you: it (the latter is rather rare, it is preferable to use telnet). How to uninstall updates correctly in Windows 7/8.