Make GPRS
Connection (AT Commands)
1.
Example using Wavecom WipSoft modems
Green: optional
* Only enter the next command if the previous command receives a
positive reply from the modem (e.g. OK)
AT+CFUN=1 //
reset modem functionality
AT+WOPEN=1 //
only for first time using WIP command set
AT+CMEE=1
// CME error mode – print out numeric error codes
AT+COPS=0
// Set auto mode first (needed for resetting SIM)
AT+COPS=3,2 // Set APN format to numeric
AT+COPS=1,2,”(netid)”
//manal select APN using numeric format, netid e.g. 45020
AT+CGATT=0
// network detach
AT+CGATT=1
//network attach
AT+WIPCFG=1
// start IP stack
AT+WIPBR=1,6
// open GPRS bearer
AT+WIPBR=2,6,11,”(apnserv)”
// set APN name apnserv e.g. “peoples.net”
AT+WIPBR=4,6,0
// start GPRS bearer
AT+WIPBR=3,6,15
// Read obtained Dynamic IP
AT+WIPCREATE=2,1,(tcpserv),(tcpport)
// Create GPRS socket tcppport e.g. 7001, tcpserv e.g. 202.168.138.2
AT+WIPDATA=2,1,2
// switch to data mode to receive data streams
2.
Example using Wavecom eDSoft modems
AT+CFUN=1 //
reset modem functionality
AT+CMEE=1 //
CME error mode – print out numeric error codes
AT+COPS=0
// Set auto mode first (needed for resetting SIM)
AT+COPS=3,2 //
Set APN format to numeric
AT+COPS=1,2,netid
//Manal select APN1 using numeric format
AT+COPS?
// Get current APN
AT+CGATT=0 //
Network detach
AT+CGATT=1
//Network attach
AT#GPRSMODE=1
// GPRS configuration
AT#DLEMODE=0
// No specific process is needed on ETX characters
AT#APNSERV=”(apnserv)”
// Set APN name apnserv e.g. “peoples.net”
AT#CONNECTIONSTART
// Establish connection
3.
Example using Telit modems
AT+CMEE=2
// CME error mode – print out text error messages instead of numeric codes
AT#PKTSZ=30
// Data packet size
AT#DSTO=20
AT#SKTTO=200
//# socket inactivity timeout (second)
AT#SKTCT=20
// TCP connection timeout
AT+COPS=3,2 //
Set APN format to numeric
AT+CGATT=1
// Network attach
AT#GPRS=1
// Establish GPRS
AT+COPS?
// Get current APN
AT+CGDCONT=1,”IP”,
“(apnserv)”, “0.0.0.0″,0,0 // set APN name apnserv e.g. “peoples.net”
AT#SKTD=0,(tcpport),(tcpserv),255
// Establish connection tcppport e.g. 7001, tcpserv e.g. 202.168.138.2
No comments:
Post a Comment