An Introduction to AT Commands

The following guide runs down some of the more common commands used when interfacing with a modem and establishing a connection to the cellular network.
Engineering
Ben Forgan
January 1, 1970

Attention Commands or, more commonly referred to as, AT commands are the method in which one communicates to modems. The following guide runs down some of the more common commands used when interfacing with a modem and establishing a connection to the cellular network.

Who is this for? (

AT commands are a necessary part of troubleshooting cellular hardware. Since our customers use a wide range of Hologram Compatible Hardware, it behooves us to discuss AT commands in the abstract, because there are so many out there.First things first: is there a library available for your board? If so, use thatWe have some libraries in our Hologram education github and are always looking for more

When are they used? (why learn about AT commands?)

Using AT commands are required in two situations:

  • You're building custom hardware and looking to interact with a modem directly
  • You're utilizing off the shelf hardware and there either is not a library or it's not workin

How are they used? (talking about serial)

Variable size of messageMore diverse than a register set like in i2c or SPI commsThis also allows the SDK to communicate over the abstracted interfaceIf talking from a computer, will need something like a USB -> serial

Hardware specific commands vs common

Each manufacturer covers a subset of the entire amount of commands available. Each hare

3 types of commands

There are 3 types of AT commands in our common set These characters are operators for AT commands.

  • a question mark (?) the read function which queries the current state of the command. So, for example, AT+CFUN? Lets you know what functionality the modem is on.
  • an equals sign(=) the set command and, as the name suggests, sets the command on the right of the symbol to the value on the left of the symbol. AT+CFUN=1 changes the functionality to mode 1.
  • both (=?) the test command which shows you the different options you have to set that command to. Using it on AT+CFUN will show you all the different functionality modes the modem has while using =? on AT+COPS shows you which networks are in reach of the modem.

Some of our common commands

To begin, use your favorite terminal program (Teraterm, Putty, GTKTerm, etc.), to establish a serial connection to your Modem. (Insert link to sending AT commands to a nova)CommandFunctionSample ResponseATAttention - This Command is used to check communications with the modemOKATIModule NumberSARA-U201-03B-00AT+CGMIManufacturer Specific Identityu-bloxAT+CGMMManufacturer Specific Model IndentitySARA-U201AT+GMMManufacturer Specific Model IndentitySARA-U201AT+CSQCheck Signal Strength+CSQ: 13,3AT+CCIDCheck the SIM ID+CCID: 1234567890123456789AT+CPIN?Check the SIM PIN+CPIN: READYAT+CFUN?Determine what functionality the Modem is on+CFUN: 1,0AT+CREG?Network Registration Status+CREG: 0,5AT+CGREG?GPRS Network Registration Status+CGREG: 0,5AT+CGDCONT?Read PDP context's parameters (APN)+CGDCONT: 1,"IP","hologram","0.0.0.0",0,0AT+CGDCONT=1,"IP","hologram"Set the APN to hologramOKAT+CGACT?PDP conext+CGACT: 1,0AT+COPS?Network Registration Status+COPS: 1,2,"310260",2AT+COPS=?Networks in reach+COPS: (1,"AT&T","AT&T","310410",2),(2,"T-Mobile","T-Mobile","310260",2),,(0-6),(0-2)

Get started with Hologram today

  • Talk to an IoT expert
  • Receive a free SIM
  • Customize your plan