
Chapter 6 – Examples of Application
Multi-Tech Systems, Inc. IP Connectivity AT Commands for GPRS-F4 Wireless Modems (PN S000437C) 33
Chapter 6 – Examples of Application
TCP Socket
TCP Server 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 (<login>)
OK
AT+WIPBR=2,6,1,"passwd" //set password (<password>)
OK
AT+WIPBR=4,6,0 //start GPRS bearer
OK
AT+WIPCREATE=3,1,80,5,9 // create the server on port 80, idx=1
OK //TCP Server can spawn up to 5 TCP clients.
//Assigned indexes are from 5 to 9.
+WIPACCEPT: 1,5 //unsolicited: the server accepted
//connection; resulting TCP client
//on index 5
AT+WIPDATA=2,5,1 //exchange data on socket index 5
CONNECT
... //read, write
+++ //switch to AT mode
OK
AT+WIPCLOSE=2,5 //close the TCP client socket index 5
OK
Comentarios a estos manuales