In this article, we will look at how you can unlock a Huawei modem using AT commands, as well as how in general you can interact with the modem using them. For example, let's take the popular this moment 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 look at how to do this.

Entering AT commands into a Huawei modem using PuTTy

After the modem is installed, additional devices should appear in Device Manager:

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

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

net stop "MegaFon Internet Service"

taskkill /f /im MegaFonInternet.exe

We configure Putty as follows and click the “Connection” button:

How to find out modem IMEI and firmware version using AT commands?

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

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 modem firmware version is 21.436.05.00.209. possible on our service. In response, you will receive an unlock code and the code requested when flashing the modem. For a given IMEI, we will receive the following response:

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

That. The unlock code for our modem is 72033153. Enter it and check the blocking status.

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

To do this, we will give the command AT^CARDLOCK="72033153", after which we will check the locking status using AT^CARDLOCK? :

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

How to enter AT command into modem using DC Unlocker?

The most in a simple way is the use of software DC Unlocker as a terminal program. Download latest version DC Unlocker Client at the following link. Don’t press any buttons on it (we don’t need to unlock, connect to the server, or anything else), just click on the button with a magnifying glass for the client to identify your modem:

In the figure, this button is marked with the number 1. Pay attention to DC Unlocker log (log This is all the information in the window, it displays your modem model, firmware version, etc.) and the number of remaining attempts to enter the unlock code. If there are no more 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="nck code", where nck code is the unlock code you received. After the modem responds 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 are used COM port modem (if you have the Internet connection program that comes with the modem open, you must close it), or even better, end all “unnecessary” processes related to the modem through the task manager.

What should I do if DC Unlocker does not detect the modem and 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, because during operation it uses the COM port of the modem. It also wouldn’t 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 in this case, there is one trick. Download official firmware under your modem (this can be done on the operator’s website or on any of the many mobile forums on the Internet, for example 4pda and others) and run the flasher (DC Unlocker must be closed at this time). Get 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 asks you for the Flash code, the modem has already been detected on the COM port, close the flasher and run DC Unlocker. The COM port should be visible and the modem will be detected.


Using the HyperTerminal program, two computers can exchange data via telephone network. You can also directly connect two computers with a cable and exchange data through it and create a small local network. To start the program, open the Start menu and call the HyperTerminal command from under the Communications menu. A dialog box for creating a new connection will appear on the screen. First, you need to enter a name for the new connection and set an icon for it.

Next, set the connection type. In this case, by default, a connection is offered through the com port of the computer; it is also possible to connect through a parallel port or a connection via the TCP/IP protocol. After setting the connection type, click OK. A dialog for setting connection parameters will appear on the screen. For the com port, you must specify the baud rate, number of data bits, parity check and flow control type. After all the data has been specified, click the Apply button for it to take effect, then click OK.

Sending a file

To send a file using the HyperTerminal application, follow these steps: Open the transfer menu item and from it call the send file command. An additional dialog will appear on the screen, in which you need to specify the file to transfer. In this case, its name can be entered from the keyboard or using the browse button, and a file opening dialog will be displayed on the screen, in which select the file to transfer and click the open button. After that, click the send button. The file transfer will begin, and the system will display service information about the transfer process.

Receiving a file

To accept a file, follow these steps: Open the transfer menu item and from it call the command to accept the file. An additional dialog will appear on the screen, in which you need to specify the directory in which the resulting file will be placed. Then click the accept button and the file will begin receiving.



To launch it, select Start ->Programs -> Accessories -> Communications -> HyperTerminal. The Create a New Connection Wizard will immediately start and prompt you to specify a connection name. Enter any name, click "OK".

The next step is to select the COM port through which you want to establish a connection. In order to determine the number of this port, you need to open the device manager, for example, through Start -> Settings -> Control Panel -> System -> Hardware -> Device Manager. In the "Ports (COM and LPT)" branch there should be an entry about the USB device - Kernelchip COM-USB. In this case (in the figure below), the virtual port was assigned number 9 (COM9).

Select COM9 from the list (this is the port number that Windows allocated for the module). Click "OK".

Next, the wizard will prompt you to change the port settings. Here it is necessary to make an important note - parameters such as speed, number of data bits, parity bits and other settings do not have any meaning for the module, because the data is actually transferred over the USB bus. You can safely leave all settings as default. Click "OK".

In the window that opens, go to the "Options" tab and click on the "ASCII Options..." button.

Check the boxes as shown below. Pay attention to the first checkbox. The module's command syntax requires that all commands end with a carriage return and a feed forward. new line. Click "OK".

All settings are completed. You can start working. First, let's send the module the most simple command$KE – verification command. Type the text $KE and press Enter. In response, we receive the line #OK - this means that the module is operational and ready for use.

Which program to use (HyperTerminal or KeTerm) is your choice. However, KeTrem has a number of advantages over HyperTerminal. KeTerm does not require any settings and is ready to use right away. Further, it has separate command input and response output areas, allowing you to use commands entered earlier. One of the most important fundamental differences between the programs is the mechanism for sending commands to the module - HyperTerminal sends each newly entered character to the port (carriage return and line feed characters are sent by pressing Enter), KeTerm sends the entire command by pressing the Enter key. Therefore, if you made an inaccuracy in the syntax of a command using HyperTerminal, it is no longer possible to correct the command. KeTerm, on the other hand, allows you to edit a command before it is sent to the module.


AT commands are the main method of interacting with the modem itself.

On the PC, these commands are sent via special program"Terminal", which is installed on a PC, laptop.

In GTX series routers, these operations are performed via the console (more information in the article:)

1. Checking the presence of a modem in the router devices

Before connecting to the modem, you need to make sure that the modem is visible in the router ports; this is done in the System -> Ports menu

If there is a device in the list usb with numbering ( usb1 ,usb2 etc.) this means the modem is visible and you can open the console to connect.

If the modem is not in the list (mostly these are routers with lte1 interface), then this modem must be switched to another operating mode.

2. Switching the modem to PPP mode for display in router devices

To switch the modem to another mode, in the System -> Ports menu, press the Firmware button

In the window that appears, set the Ignore DirectIP Modem item and click OK

After this, reboot the router System -> Reboot

After the reboot, the modem will be visible in the System -> Ports list as a device usb1

3. Connect to the modem and check the response to the AT command

To connect to the modem you need to open the router console New Terminal

To connect to the modem, run the command:

/system serial-terminal usb1 channel = 1

Note:

For different modems, parameter channel can be different, it is any channel other than the data transmission channel (Data Channel).

Basically, each modem has only two ports available for sending AT commands. Therefore, one of them is used for data, and the second for all other operations.

Moreover, if the port is busy, access to it will be available only after it is freed.

You can check which modem is used in your router model by reading the article:

There you can also find out which ports to use for connection.

After entering the command, the terminal window will change slightly.

If you need the HyperTerminal program in Windows 7, then I dare to disappoint you: it is no longer there. For some reason the developers Microsoft stopped including this wonderful utility in their OS (Vista, Server 2008/R2, Windows 7). Probably one of the reasons for this decision is the fact that the COM ports on modern computers are practically absent, and if they are, they are covered with a thick layer of dust...

Let us recall that HyperTerminal is an application that allows you to emulate the operation of a terminal when interacting with remote devices via a serial bus (RS-232), dial-up or TCP/IP protocol (the latter is rather rare, it is preferable to use telnet). Various things are usually configured via the console COM port network hardware, such as routers, modems, switches, PBX, etc.

So how do you work with COM ports and devices on them in Windows 7, when you need the functionality of the good old hyperterminal?

We use the standard HyperTerminal from Windows XP

To return HyperTerminal to Windows 7, simply copy the files of this program from Windows XP. We will need the following files:

  • C:\Program Files\Windows NT\hypertrm.exe
  • C:\WINODWS\system32\hypertrm.dll
  • C:\WINODWS\Help\hypertrm.chm
  • C:\Windows\Help\hyperterm.hlp

Copy them to a separate directory in Windows 7, after which you can launch the hyperterminal in Windows 7 by opening the hypertrm.exe file with explicit admin rights (Run as administrator with the right mouse button).

For those lucky ones who have already completely migrated to Windows 7 and who have no XP left in their possession, I am publishing all the necessary files in the archive.

Download hyperterminal for windows 7 : (215 Kb)

Putty as an analogue of hyperterminal

If you want to radically get rid of the outdated hyperterminal, you will have to look for its analogues for Windows 7.

Of the most convenient analogue options, I see the Putty utility (especially since it is included in the arsenal of almost any administrator). All you need to do to get Putty to work with a local COM port is the following setup.