When meeting the mention of โ3gpp at what are commands for Androidโ in technical documentation or on forums, users often get confused due to the abundance of abbreviations. In fact, we are talking about the fundamental interaction protocol between the smartphone software and its radio module. The abbreviation AT stands for Attention and is a command language that has been used to control modems since their inception.
Standard 3GPP (3rd Generation Partnership Project) defines specifications for mobile networks, including GSM, UMTS, LTE and 5G. When these two concepts are combined, the result is a set of instructions that allow the Android system to make direct requests to the cellular chip. These are not just hidden codes for unlocking functions, but a deep diagnostic tool that allows engineers and advanced users to access signal parameters, IMEI and network registration status.
Device owners can encounter these commands both in automatic system operation and during manual diagnostics through the engineering menu or special terminal applications. Understanding the principles of operation AT+CSQ or AT+CGMI makes it possible to accurately determine the cause of a network loss or low Internet speed, without relying on guesswork. Next, we will examine in detail the structure of these commands and how to use them safely.
Architecture of interaction between Android and modem
A modern smartphone is a complex ecosystem, where the operating system Android acts as a control center, and the base station (modem) operates as an independent device with its own processor. Communication between them is carried out through a serial interface, where commands are transmitted in the form of text strings. The protocol 3GPP TS 27.007 regulates the syntax of these messages, providing universality for different chip manufacturers, such as Qualcomm, MediaTek or Exynos.
When you enter a command into the terminal, the RIL driver (Radio Interface Layer) intercepts the request and translates it into a language understandable to the radio microcontroller. The response comes in the form of code OK or ERROR, accompanied by a payload, for example, signal strength or firmware version. This mechanism is critical for the operation of all communication functions, from regular calling to data transmission via LTE.
โ ๏ธ Attention: Direct interference with the operation of RIL through third-party applications with root access may cause the radio module to freeze. If the module stops responding to AT commands, the device will lose communication with the network until a complete reboot or flashing.
Developers use this channel not only for debugging, but also to implement functions that are not visible in the standard interface. For example, switching between network modes or forced registration on a specific tower is often performed precisely by sending specific AT-strings. Understanding this architecture helps you understand why some settings are not available in the regular settings menu.
To view logs of AT command exchanges in real time, you can use the logcat utility with a filter by the RIL tag, but this requires a connected computer and debugging via USB.
The main types of commands and their syntax
All commands of the 3GPP standard are divided into several categories depending on their purpose and execution format. Basic syntax always starts with a prefix ATfollowed by the specific command code. There are basic commands, such as A (answer a call) or H (end a call), which are a legacy of older modems, and extended commands starting with the character +.
Extended commands AT+ form the basis of modern module control. They allow you to request information (Read), set parameters (Write) or perform actions (Execute). For example, the command AT+CMGF=1 switches the mode of working with SMS to text format, and AT+CPIN? requests the status of entering the SIM card PIN code.
- ๐ก Commands call controls: allows you to initiate, receive and end voice calls, as well as manage conference calls.
- ๐ถ Network commands: used to search for available operators, check signal strength and select network type (2G/3G/4G).
- ๐พ Memory management commands: give access to reading, writing and deleting SMS messages directly in the memory of the SIM card or phone.
- โ๏ธ System commands: provide information about the manufacturer (
AT+CGMI), model (AT+CGMM) and software version of the modem.
It is important to distinguish between execution commands and commands reading. An execute command (without a question mark) typically starts an action, while a read command (with a question mark at the end) returns the current value of the parameter. To change the setting, a recording format is used, where the command name is followed by an equal sign and a new value.
Diagnostics of signal quality and network condition
One โโof the most popular functions for users and technicians is the ability to obtain accurate data on the quality of the radio signal. The standard โsticksโ scale in the status bar is often inaccurate or delayed. Using the command AT+CSQ (Command Signal Quality) you can get a numerical value of the signal level and bit error quality.
The modem's response to this request usually looks like +CSQ: 20,99. The first number represents the signal strength (RSSI) ranging from 0 to 31, with 31 representing -51 dBm or greater (excellent signal) and 0 representing no signal (< -113 dBm). The second number indicates the signal quality (BER), where 99 often means โunknownโ or โnot applicableโ for modern digital networks.
AT+CSQ+CSQ: 15,0
OK
In addition to signal strength, it is critical to know which network the device is registered to. The command AT+CREG? returns the registration status in the home network or roaming. The value 1 means successful registration in the home network, 5 in roaming, and 0 signals that the search for a network is ongoing or it has not been found.
โ ๏ธ Attention: RSSI values may vary depending on the manufacturer chipset. Some modems use their own scale, so check the data with the technical documentation of the specific device before interpreting the results.
For more detailed analysis, LTE and 5G networks use commands from the AT+CESQfamily, which provide information about the carrier signal strength (RSRP) and signal-to-noise ratio (RSRQ). These parameters are much more accurate indicators of the actual data transfer rate than the outdated RSSI.
A low RSSI level (less than 10) with a high level of interference may indicate a malfunction of the antenna path or damage to the antenna cable inside the smartphone case.
SIM card management and device identification
Each the mobile device has a unique identifier, which is necessary to work in the cellular network. Command AT+CGSN (or its equivalent ATI3 on some chips) allows you to request the IMEI (International Mobile Equipment Identity) of the device directly from the modem, bypassing the Android interface. This is useful for verifying the authenticity of the phone or restoring a lost number.
Working with the SIM card itself is also regulated by a set of AT commands. Using AT+CPIN? you can check whether a PIN code is required. If the card is blocked, the answer will be +CPIN: SIM PIN. To unlock, use the command AT+CPIN="1234", where the correct code is indicated in quotes. An error in entering the code several times in a row can lead to the card being blocked with the PUK code.
| Command | Description | An example response |
|---|---|---|
AT+CGMI |
Request for the name of the modem manufacturer | QUALCOMM INCORPORATED |
AT+CGMM |
Request for the model modem | MDM9655 |
AT+CGMR |
Requesting a software revision | M8994F-2.0.4 |
AT+CCID |
Reading the SIM card identifier (ICCID) | 89701012345678901234 |
It is also possible to manage the phone book stored on the SIM card. The commands AT+CPBR (read) and AT+CPBW (write) allow you to manipulate contacts directly. However, in the era of synchronization with Google and iCloud cloud accounts, the use of these commands has become less relevant for ordinary users, remaining a tool for specific data migration tasks.
Hidden IMEI function
In some regions and on some firmware, the AT+CGSN command can return not one, but several IMEIs, corresponding to different SIM card slots in dual-SIM cards devices.
Manufacturer-specific codes and engineering menus
In addition to the standardized 3GPP commands, each major chipset manufacturer implements its own AT protocol extensions. These commands often begin with vendor-specific prefixes, such as AT+Q for Quectel or AT^ for Huawei. In smartphones based on MediaTek popular commands are AT+EMID to access the engineering mode.
Access to these functions on Android is often carried out not through direct text input, but through special USSD codes or hidden menus called through dialing. The code ##4636## is standard for most pure Android devices and opens a testing menu, where some functions are implemented through background sending of AT commands.
- ๐ง MediaTek: Uses a wide range of commands to control the radio part, often available through the Engineer Mode application.
- ๐ฑ Samsung: Has a closed set of service codes starting with
#0or#9900which activate hidden equipment tests. - ๐ Xiaomi: Provides access to the CIT menu (Calibration and Test), which also uses internal AT queries to test sensors and communication modules.
The use of non-standard commands requires special care, since they may not be documented publicly. An incorrect parameter in the vendor-specific command may result in the antenna calibration data being reset, which will require a visit to the service center for repair.
โ ๏ธ Note: Interfaces and available codes may change with Android or firmware version updates. What worked on Android 10 may be blocked or changed on Android 14 for security reasons.
โ๏ธ Check before entering commands
Security and access restrictions in new versions of Android
With the release of new versions of the operating system, Google is tightening security policies, limiting direct access of applications to modem ports. Starting with Android 10 and especially Android 12-14, access to sending arbitrary AT commands to third-party applications without system privileges is almost closed. This is done to prevent spyware and unauthorized interception of SMS.
Now, to fully work with AT commands, root access or running commands through the ADB debugging bridge (Android Debug Bridge) from a computer are often required. The command adb shell service call or the use of special utilities in terminal emulation mode allows you to bypass some restrictions, but only for authorized users.
In addition, telecom operators can block the execution of certain commands at the network level or firmware provided by the operator (carrier firmware). For example, commands to change the network mode from LTE to 2G may be disabled to ensure quality of service and compliance with regulatory licensing requirements.
Modern Android limitations make it impossible to use simple terminal applications to send AT commands without granting special permissions through ADB or obtaining root access.
Frequently asked questions (FAQ)
Is it possible to improve signal reception using AT commands?
There is no direct way to โamplifyโ the signal programmatically, since this is a physical parameter. However, using commands, you can force the phone to switch to another frequency band (Band Locking), which in your area may be less congested or have better penetration, which will subjectively improve the quality of communication.
Is it safe to change IMEI through AT commands?
No, this is illegal in most countries of the world and can lead to blocking of the device by the telecom operator. In addition, incorrect writing to the protected memory area of the modem can permanently disable the radio module (โbrickedโ in terms of communication).
Why does the AT command return the ERROR error?
The error can occur for several reasons: incorrect command syntax, lack of support for this function in your modem, the SIM card is not inserted or blocked, or The application does not have the necessary permissions to access the equipment.
How do I know if my phone supports AT commands?
All phones with a cellular module support a basic set of AT commands of the 3GPP standard, as this is a mandatory requirement for working in GSM/UMTS/LTE networks. The only question is how you can send these commands: through the engineering menu, ADB or special applications.