Chapter 6 - Application Examples; Tcp Socket - Multitech MTMMC-G-F4 Reference Manual

Wireless gprs-f4 modems with ip connectivity
Hide thumbs Also See for MTMMC-G-F4:
Table of Contents

Advertisement

Chapter 6 – Application Examples

TCP Socket

TCP Server Socket
Using GPRS Bearer
AT+WOPEN=1
OK
AT+WIPCFG=1
OK
AT+WIPBR=1,6
OK
AT+WIPBR=2,6,11,"APN name"
OK
AT+WIPBR=2,6,0,"user name"
OK
AT+WIPBR=2,6,1,"passwd"
OK
AT+WIPBR=4,6,0
OK
AT+WIPCREATE=3,1,80,5,8
OK
+WIPACCEPT: 1,5
AT+WIPDATA=2,5,1
CONNECT
...
+++
OK
AT+WIPCLOSE=2,5
OK
Multi-Tech Systems, Inc. IP Connectivity AT Commands for GPRS-F4 Wireless Modems (PN S000437E)
Chapter 6 – Application Examples
//open TCP/IP stack
//start IP stack
//open GPRS bearer
//set APN name of GPRS bearer
//set user name (<login>)
//set password (<password>)
//start GPRS bearer
//create the server on port 80, idx=1. The server
//is listening for connection request on port
//80. Spawned sockets will be given the index 5,
//6, 7 and 8. It will accept connection request
//until it has no more sockets left.
//unsolicted: the server accepted a connection
//resulting TCP client on idx 5
//exchange data on socket index 5
//read, write
//switch to AT mode
//close the TCP client socket index 5
45

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mtcba-g-f4Mtsmc-g-f4

Table of Contents