Home > Module > AT Command Operations

AT Command Operations

There are four types of AT command operations:

  • Test operation. A test operation is used to check whether a certain AT command is supported by the GSM/GPRS modem or mobile phone.

  • Set operation. A set operation is used to change the settings used by the GSM/GPRS modem or mobile phone for certain tasks.

  • Read operation. A read operation is used to retrieve the current settings used by the GSM/GPRS modem or mobile phone for certain tasks.

  • Execution operation. An execution operation is used to perform an action or retrieve information/status about the GSM/GPRS modem or mobile phone.

  • The command syntax for performing an operation will be described in detail in the following sections.

A test operation is used to check whether a certain AT command is supported by the GSM/GPRS modem or mobile phone. All extended AT commands support the test operation. The syntax is:


command=?


where command is an AT command. When an AT command is used in the above syntax to perform a test operation, it is called a test command.

Here is an example. The AT command +CGMI (command name in text: Request Manufacturer Identification) is used to get the manufacturer name of the GSM/GPRS modem or mobile phone. To test whether +CGMI is supported, you can make use of the test command “+CGMI=?”. The complete command line that should be entered is:


AT+CGMI=?


If the GSM/GPRS modem or mobile phone supports the AT command +CGMI, the result code “OK” will be returned, like this:


AT+CGMI=?

OK


If the GSM/GPRS modem or mobile phone does not support the AT command +CGMI, the result code “ERROR” will be returned, like this:


AT+CGMI=?

ERROR


In the above example, the AT command +CGMI does not have any parameters. If the AT command to be tested has parameter(s), the parameter value(s) supported by the GSM/GPRS modem or mobile phone may be printed additionally. Below is an example that illustrates the format of the response. +COMMAND1 is a fictitious AT command that has four parameters.


AT+COMMAND1=?

+COMMAND1: (0,1),(0-10),(0,1,5-10),(“GSM”,”UCS2″)

OK


The supported values of each of the four parameters are enclosed in parentheses. Commas are used to delimit the parentheses and the values inside parentheses. A hyphen is used to indicate a range of values. The values inside parentheses can be of the string type.

In the above example, the response of the test command “+COMMAND1=?” provides us the following information:

  • (0,1). The first parameter accepts either 0 or 1.

  • (0-10). The second parameter accepts any integer between 0 and 10.

  • (0,1,5-10). The third parameter accepts 0, 1 or any integer between 5 and 10.

  • (“GSM”,”UCS2″). The fourth parameter accepts either the string “GSM” or “UCS2″.

To a few AT commands, the test operation does not return the parameter values supported. Instead, it returns the values that are allowed to appear in the information response of the AT command. An example is the +CBC AT command (command name in text: Battery Charge). The +CBC command is used to retrieve the connection status and charge level of the battery of the mobile device. Two values are returned in the information response of the +CBC AT command. The format is:


+CBC: connection_status,charge_level


For example, if the battery is placed in the mobile device with no charger connected and the charge level is 80%, the result of the execution of the +CBC AT command will be:


AT+CBC

+CBC: 0,80

OK


If you run the test command “+CBC=?”, all the supported values that are allowed to appear in the connection status field and charge level field will be provided. With my Nokia 6021, the result is:


AT+CBC=?

+CBC: (0,1),(0-100)

OK


“(0,1)” means the connection status field in the information response of the +CBC AT command can contain either 0 or 1, while “(0-100)” means the charge level field can contain any integer between 0 and 100.

Related posts:

  1. Introduction to AT Commands AT commands are instructions used to control a modem. AT is the abbreviation of ATtention. Every command line starts with “AT” or “at”. That’s why modem commands are called AT commands. Many of the commands that are used to control wired dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return [...]...
  2. Which is Better: Mobile Phone or GSM/GPRS Modem? UNMJ4ZZZS4U3 In general, a GSM/GPRS modem is recommended for use with a computer to send and receive messages. This is because some mobile phones have certain limitations comparing to GSM/GPRS modems. Some of the limitations are described below: Some mobile phone models (example: Ericsson R380) cannot be used with a computer to receive concatenated SMS messages.What is a [...]...
  3. Introduction to GSM/GPRS Modems A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like a dial-up modem. The main difference between them is that a dial-up modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves. A GSM modem can [...]...
  4. SIM300C/340C GSM/GPRS Modem Product Name: SIM300C/340C The SIM300C/340C is a complete Tri-Band/Quad-Band GSM/GPRS solution in a compact plug-in module with DIP board-to-board connector, which can be used in M2M applications such as telemetry, telematics and other M2M mobile data communication systems. • DIP type board-to-board connector suit for vehicle application • Customized MMI and keypad/LCD support • An embedded Powerful TCP/IP [...]...
  5. What is an SMS Gateway? One problem of SMS messaging is that SMSCs developed by different companies use their own communication protocol and most of these protocols are proprietary. For example, Nokia has an SMSC protocol called CIMD whereas another SMSC vendor, CMG, has an SMSC protocol called EMI. We cannot connect two SMSCs if they do not support a [...]...
  6. What is a GPRS Modem? A GPRS modem is a GSM modem that additionally supports the GPRS technology for data transmission. GPRS stands for General Packet Radio Service. It is a packet-switched technology that is an extension of GSM. (GSM is a circuit-switched technology.) A key advantage of GPRS over GSM is that GPRS has a higher data transmission speed. GPRS [...]...
  7. SIM508/548 GSM/GPRS/GPS Modem SIM508/548 module is a Tri-Band/Quad-Band GSM/GPRS-enabled module that is also equipped with AGPS technology. The compact design of the SIM508/548 makes it easy to integrate GSM/GPRS & GPS as an all-in-one solution. You will save significantly both time and cost for the integration of additional hardware components. The combination of both technologies can fit almost [...]...
  8. GSTAR GS-94 GPS Module GSTAR GS-94 GPS module compatable UBLOK 4S 5S ,GS-94 is a compact, high performance, and  low power consumption GPS engine board. GS-94 uses MTK MT3318 chipset which can track up  to 32 satellites at a time and perform fast TTFF and excellent signal sensitivity. It is suitable for portable electronic devices such as automotive [...]...
  9. Holux M-89 GPS Module Product Name: Holux M-89 GPS Module Overview M-89 is an ultra miniature 25.4 x 25.4 x 3 mm GPS engine board designed by low power consumption MTK GPS solution. It provides superior sensitivity up to -159dBm and fast Time-To-First-Fix in navigation application. The stable performance of M-89 is your best choice to be embedded in your portable [...]...
  1. April 28th, 2010 at 04:19 | #1

    :razz:

  1. No trackbacks yet.
icon_wink.gif icon_neutral.gif icon_mad.gif icon_twisted.gif icon_smile.gif icon_eek.gif icon_sad.gif icon_rolleyes.gif icon_razz.gif icon_redface.gif icon_surprised.gif icon_mrgreen.gif icon_lol.gif icon_idea.gif icon_biggrin.gif icon_evil.gif icon_cry.gif icon_cool.gif icon_arrow.gif icon_confused.gif icon_question.gif icon_exclaim.gif 

Switch to our mobile site