What are AT Commands?
According to Codeproject.com, 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."
AT command sequence for proper network connection:
Please check the manual from your module vendor for the exact AT command to use.
When configuring a new device, you need to configure the AT command sequence to fit with your use-case.
To avoid any wrong configuration in the device, we recommend you to implement the following AT command sequence to connect and disconnect properly from/to the mobile network:
- AT+CSQ [ To measure the signal quality ]
- AT+CREG=1 [ To enable network registration ]
- AT+CREG? [ To return the current state of the network registration : Attach/Detach ]
- AT+CGATT=1 [ to attach the terminal to GPRS service ]
- AT+CGATT? [ To return the current state of GPRS service : Attach/Detach ]
- AT+CGDCONT=1,"IP","em" [ To define PDP Context ]
- AT+CSQ [ to measure signal quality ]
- AT+CGACT=1 [ To activate a PDP context ]
- AT+CGDCONT? [ To return the current state of the PDP context]
- AT+CGACT=0 [ To deactivate a PDP context ]