
Chapter 6 – Examples of Application
Multi-Tech Systems, Inc. IP Connectivity AT Commands for GPRS-F4 Wireless Modems (PN S000437C) 35
TCP Client Socket
TCP Client Socket Using GPRS Bearer
AT+WIPCFG=1 //start IP stack
OK
AT+WIPBR=1,6 //open GPRS bearer
OK
AT+WIPBR=2,6,11,"APN name" //set APN name of GPRS bearer
OK
AT+WIPBR=2,6,0,"user name" //set user name
OK
AT+WIPBR=2,6,1,"passwd" //set password
OK
AT+WIPBR=4,6,0 //start GPRS bearer
OK
AT+WIPCREATE=2,1,”ip addr”,80 //create the TCP client on port 80, idx=1
OK
+WIPREADY: 2,1 //unsolicited: the server accepted
//connection; resulting TCP client index 5
AT+WIPDATA=2,1,1 //exchange data on socket idx 1:
CONNECT
... //read, write
+++ //switch to AT mode
OK
AT+WIPCLOSE=2,1 //close the TCP client socket index 1
OK
Comentarios a estos manuales