Tcp/Ip; Tcp Data Transfer Example - Motorola g20 Developer's Manual

At commands
Hide thumbs Also See for g20:
Table of Contents

Advertisement

5.9

TCP/IP

5.9.1

TCP Data Transfer Example

at+mipcall=1,"orange","test","test"
OK
+MIPCALL: 172.17.242.86
at+MIPOPEN=1,1222,"123.343.444.332",1234,0
OK
+MIPOPEN: 1,1
at+MIPOPEN?
+MIPOPEN: 2 3 4
+MIPSETS=1,340
+MIPSETS: 0
OK
at+mipsets?
+MIPSETS: 1 340
OK
at+mipsend=1,"444444"
+MIPSEND: 1,1497
OK
This step can be repeated several times until the buffer is full or until the amount of data reaches 340 bytes and
data pushed into the stack.
Note
at+MIPSEND?
+MIPSEND: 1 1497
OK
+MIPPUSH=1
+MIPPUSH: 0
98-08901C68-O
//Opening socket 1 using TCP protocol, from port 1222,
targeting 123.343.444.332 port 1234
//Terminal checking the status of socket to be opened
(socket 1 opened OK)
//Asking the g20 to accumulate 340 bytes on socket 1 prior to sending
//Sent coded "DDD" string
//Free storage in the accumulating buffer
//Checking the size remaining (optional)
//Terminal asks g20 to flush the buffer in socket 1
Using the Commands
283

Advertisement

Table of Contents
loading

Table of Contents