Usage Examples for AT Command Debugging

Last revision 2026/01/15

This article demonstrates practical examples of using AT commands for debugging with the SIM808 expansion shield and Arduino UNO, covering phone calls, SMS, TCP communication, GPS orientation, and low power mode with detailed hardware and software setup instructions.

Hardware Preparation

Software Preparation

Steps

  1. Plug your SIM card on the SIM808 expansion shield and plug the expansion shield on Arduino UNO, meanwhile don't forget to connect an external power source.
  2. Dial the function switch to None, download a sample code Blink to make sure the serial port is not occupied.
  3. Press the Boot power button and wait for the SIM card registering a network properly, the Net indicator led flashes slowly (3s once).
  4. Slide the function switch to USB_DBG, then we can communicate directly with SIM808 chip through the serial port assistant.

AT Command Examples

Make a Phone Call

TEL0097 Make a Phone Call

Send AT in the serial port assistant, if it returns OK, it means that serial communication has been established. Follow the Figure, enter AT commands, you should get the same content.

Answer the Phone and Hang Up

TEL0097 Answer the phone and Hang up

Send SMS

TEL0097_Send_Message

Read SMS

TEL0097_Read_Message

TCP Communication

TEL0097_TCP

GPS Orientation

Note: The GPS antenna must be placed outside before it can obtain a stable GPS location data output.

Send AT + CGSN PWR = 1 command (Open the GPS power)

Send AT + CGNSTST = 1 command (Receive GPS data from the serial port)

TEL0097_GPS_debug

If the GPS antenna has been placed outside, you should get the right data soon.

When you want to pause GPS data output, you can sent **AT+CGNSTST=0** command to pause GPS data output.

When you want to turn off GPS function, you can send AT + CGNSPWR = 0 command to turn off the GPS power. Send AT + CPOWD = 1 to shut down the SIM808 chip.

Minimum Functionality Mode (Low Power Consumption)

  • AT+CFUN= =0,1,4
    1. AT + CFUN = 0: Minimum functionality mode. In this mode, you can still continue to use the serial port, but the AT command with RF and SIM card features will be disable.
    2. AT + CFUN = 1: Full-function mode (default).
    3. AT + CFUN = 4: Airplane mode. In this mode, you can still continue to use the serial port, but the AT command with RF and SIM card features will be disable.

More features please refer to AT commands

Was this article helpful?

TOP