Contact Us

Showing results for 
Search instead for 
Did you mean: 
Community Manager
Community Manager

AT Command sequence for proper network connection / disconnection

What are AT Commands?

According to, AT Commands are instructions used to control a modem. AT is the abbreviation of ATtention. Every command line starts with "AT" or "at".


AT command sequence for proper network connection

When configuring a new device, you need to configure the AT command sequence to fit with your use-case. 

To avoid incorrect device configuration, SAP Digital Interconnect recommend that you implement the following AT command sequence to connect and disconnect properly from/to the mobile network:


1.     AT+CSQ

Measure the signal quality

2.     AT+CREG=1

Enable network registration

3.     AT+CREG?

Return the current state of the network registration: Attach/Detach

4.     AT+CGATT=1

Attach the terminal to GPRS service

5.     AT+CGATT?

Return the current state of GPRS service: Attach/Detach

6.     AT+CGDCONT=1,"IP","em"

Define PDP Context

7.     AT+CSQ

Measure signal quality

8.     AT+CGACT=1

Activate a PDP context

9.     AT+CGDCONT?

Return the current state of the PDP context

10.  AT+CGACT=0

Deactivate a PDP context


Note: Please check the manual from your module vendor for the exact AT command to use.


Shahzad Ismail
Community Manager – SAP Digital Interconnect
Tags (1)
0 Kudos