
Chapter 6 – Examples of Application
Multi-Tech Systems, Inc. IP Connectivity AT Commands for GPRS-F4 Wireless Modems (PN S000437C) 34
TCP Server Socket Using GSM Bearer
AT+WIPCFG=1 //start IP stack
OK
AT+WIPBR=1,5 //open GSM bearer
OK
AT+WIPBR=2,5,2,"Phone number" //set phone number for GSM bearer
OK
AT+WIPBR=2,5,0,"user name" //set user name
OK
AT+WIPBR=2,5,1,"passwd" //set password
OK
AT+WIPBR=4,5,0 //start GSM 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
//index 5
AT+WIPDATA=2,5,1 //exchange data on socket idx 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