GPRS

From ElectroDragon
Jump to: navigation, search

GPRS

  • Basic check
Category CMD return Note
quick AT+CPIN? +CPIN:READY, OK
quick AT+CSQ CSQ:20,0 signal quality
quick AT+CREG? +CREG:0,1, OK register network?
quick AT+CGATT?, AT+CGATT=1 +CGATT:1, OK serivce status, attach or disattach GPRS service
quick AT+CSTT="CMNET" OK Set apn, no user and pass
gprs AT+CIICR OK bring up wireless connection, GPRS or CSD
gprs AT+CIFSR 10.78.245.128 check IP address
gprs AT+CIPSTART="TCP","www.baidu.com","80" OK, CONNECT OK start the connection
gprs AT+CIPSEND > hello SEND OK send data
gprs AT+CIPCLOSE=1 OK close current TCP/UDP connection
gprs AT+CIPSTATUS check module current connection status
gprs AT+CIPSHUT close mobile scene
Command Description Return Result
AT+CGCLASS support type B and CC, - -
AT+CGDCONT set PDP, e.g. AT+CGDCONT=1,"IP","CMNET", sign 1, internet protocol (IP) and connecting port CMNET - -
AT+CIPCSGP set CSD or GPRS link mode, AT+CIPCSGP=1,"CMNET", set GPRS link and connecting port CMNET - -
AT+CLPORT set TCP local port, AT+CLPORT="TCP","8888", port at 8888 - -

General command steps

  • AT+CGCLASS="B"
  • AT+CGDCONT=1,"IP","CMNET"
  • AT+CGATT=1
  • AT+CIPCSGP=1,"CMNET"
  • AT+CLPORT="TCP","2000" or AT+CLPORT="UDP","3000"
  • AT+CIPSTART="TCP","180.120.52.222","8086" or AT+CIPSTART="UDP","180.120.52.222","8086"
  • AT+CIPSEND
  • >
  • AT+CIPCLOSE=1
  • AT+CIPSHUT

General commands steps 2

  • AT+CGDCONT=1,"IP","CMNET" //Set APN
  • AT+CSQ //Query the quality of the network signal. The first parameter is the maximum network signal quality of 31. The larger the value, the stronger the network signal.
  • AT+CREG? //Query the network registration status, where the second parameter is 1 to indicate that the registration has been successful.
  • AT+CIPMODE=1 //Set TCP/IP mode
  • AT+CSOCKSETPN=1 //Select TCP/IP application mode
  • AT+CIPMODE=0 //Select TCP/IP application mode
  • AT+NETOPEN //on mode
  • AT+CIPOPEN=0,"TCP","113.81.233.65",2317 //Set the TCP, IP and port numbers to establish a TCP/IP connection
  • AT+CIPSEND=0,9, //Send 9 characters for the specified data, return > to start sending 9 characters.
  • AT+CIPCLOSE=0, //Close the TCP connection
  • AT+NETCLOSE, //Close the network

Working with internet domain, and receive data

  • AT+CIPMUX=0 // single link mode
  • AT+CIPRXGET=1 // manually get data, set at 0 to automatically retrieve and display data.
  • AT+CIPQRCLOSE=1 // speed up remote disconnection?
  • AT+CIPMODE=0 // not transparent TCPIP mode
  • AT+CIPSTART=”TCP”,”yixin1111.eicp.net”,8080
  • AT+CIPSEND
  • >