// See if the SIM900 is ready
AT
OK
// SIM card inserted and unlocked?
AT+CPIN?
+CPIN: READY
OK
// Is the SIM card registered?
AT+CREG?
+CREG: 0,5
OK
// Is GPRS attached?
AT+CGATT?
+CGATT: 1
OK
// Check signal strength - should be 9 or higher
AT+CSQ
+CSQ: 20,0
OK
// Set connection type to GPRS
AT+SAPBR=3,1,“Contype”,“GPRS”
OK
// Set the APN - this will depend on your network/service provider
AT+SAPBR=3,1,“APN”,“CMNET”
OK
// Enable GPRS - this will take a moment or two
AT+SAPBR=1,1
OK
// Check to see if connection is correct and get your IP address
AT+SAPBR=2,1
+SAPBR: 1,1,“10.79.223.61”
OK
///////////////////////////////////////////////////////////////