Skip to main content
All CollectionsGetting startedBasic connectivity tests
How to ping your modem using AT commands
How to ping your modem using AT commands

After network attachment, you can check the data connection by performing a ping with your modem. This is an effective way to debug issues.

Jason Godfrey avatar
Written by Jason Godfrey
Updated over a month ago

This article requires knowledge of connecting to your device's cellular module/modem. Please refer to the user manual or visit the manufacturer's website for specific instructions.

Introduction

Checking the data connection after a successful network attachment can help debug issues with connectivity.

While there is no standard, uniform ping test AT command, the steps are relatively simple and follow a similar pattern across IoT modems. In this guide, we’ll go through how to ping Google’s primary DNS server (the server with the IP 8.8.8.8) with these modems:

  • Quectel's BG96

  • SIMCom's SIM7070G

  • Thales PLS62-W

  • Telit LE910C1​

The overall structure for pinging 8.8.8.8 with any of the modems is:

  1. Set the APN to "onomondo" (all lower-case).

  2. Attach to the network.

  3. Establish a data connection.

  4. Ping 8.8.8.8.

Note: You will most likely be able to use the same approach for each of the manufacturers' other modems, but there might be slight variations. In case you encounter any issues, please consult the documentation, your supplier, or the manufacturer themselves.

No matter which modem you are using, the Traffic Monitor on the SIM should display the following result:

Sending a ping


Quectel BG96

  1. Set the APN​

    Issue AT+CGDCONT=1,"IP","onomondo". This defines the PDP context.

    AT+CGDCONT=1,"IP","onomondo"
    OK

  2. Attach to the network

    Check the connection with AT+COPS?.

    AT+COPS? 
    +COPS: 0,0,”T-Mobile USA”,7
    OK

    The modem might already have connected to the network when it was booted up. If this isn't the case then do the following:

    • Issue AT+COPS=0. This will set the modem into automatic network selection.

    • Wait for AT+CEREG? or AT+CGREG? to return x,5 (registered to a roaming network).

  3. Establish a data connection

    Issue AT+QIACT=1,1. This activates the PDP context.

    AT+QIACT=1,1
    OK


  4. Ping 8.8.8.8

    Issue AT+QPING=1,"8.8.8.8",5,5.

    This pings 8.8.8.8 five times with a timeout of five seconds​.


SIMCom SIM7070G

  1. Set the APN​

    Issue AT+CGDCONT=1,"IP","onomondo". This defines the PDP context.

    AT+CGDCONT=1,"IP","onomondo"
    OK

  2. Attach to the network

    Check the connection with AT+COPS?.

    AT+COPS? 
    +COPS: 0,0,”T-Mobile USA”,7
    OK

    The modem might already have connected to the network when it was booted up. If this isn't the case then do the following:

    • Issue AT+COPS=0. This will set the modem into automatic network selection.

    • Wait for AT+CEREG? or AT+CGREG? to return x,5 (registered to a roaming network).

  3. Establish a data connection

    Issue AT+CNACT=0,1. This activates the PDP context.

  4. Ping 8.8.8.8

    • Select PDP context ID for pinging AT+SNPDPID=0.

    • Issue AT+SNPING4=”8.8.8.8″,5,16,5000.

    This pings 8.8.8.8 five times with a timeout of five seconds.


Thales PLS62-W

  1. Set the APN​

    Issue AT+CGDCONT=1,"IP","onomondo". This defines the PDP context.

    AT+CGDCONT=1,"IP","onomondo" 
    OK

  2. Attach to the network

    Check the connection with AT+COPS?.

    AT+COPS? 
    +COPS: 0,0,”T-Mobile USA”,7
    OK

    The modem might already have connected to the network when it was booted up. If this isn't the case then do the following:

    • Issue AT+COPS=0. This will set the modem into automatic network selection.

    • Wait for AT+CEREG? or AT+CGREG? to return x,5 (registered to a roaming network).

  3. Establish a data connection

    • Issue AT^SICA=1,1. This activates the PDP context.

    • Get the IP of your device with AT+CGPADDR=1. This is not optional.

  4. Ping 8.8.8.8

    Issue AT^SISX=Ping,1,”8.8.8.8″,5,5000.

    This pings 8.8.8.8 five times with a timeout of five seconds.


Telit LE910C1

  1. Set the APN

    Issue AT+CGDCONT=1,"IP","onomondo". This defines the PDP context.

    AT+CGDCONT=1,"IP","onomondo" 
    OK​

  2. Attach to the network

    Check the connection with AT+COPS?.

    AT+COPS? 
    +COPS: 0,0,”T-Mobile USA”,7
    OK

    The modem might already have connected to the network when it was booted up. If this isn't the case then do the following:

    • Issue AT+COPS=0. This will set the modem into automatic network selection.

    • Wait for AT+CEREG? or AT+CGREG? to return x,5 (registered to a roaming network).

  3. Establish a data connection

    Issue AT#SGACT=1,1. This activates the PDP context.

  4. Ping 8.8.8.8

    Issue AT#PING="8.8.8.8",5

    This pings 8.8.8.8 five times with a timeout of five seconds.

Did this answer your question?