Tcp/Ip; Tcp Data Transfer Example; Tcp Raw Data Transfer Example (Online Data Mode) - Motorola G24 Guide Developer's Manual

At commands
Hide thumbs Also See for G24 Guide:
Table of Contents

Advertisement

TCP/IP

TCP Data Transfer Example

AT+MIPCALL=1,"orange","test","test"
OK
+MIPCALL: 172.17.242.86
AT+MIPOPEN=1,1222,"123.245.213.012",1234,0 //Opening socket 1 using TCP protocol, from port 1222,
targeting 123.245.213.012 port 1234
OK
+MIPOPEN: 1,1
AT+MIPOPEN?
OK)
+MIPOPEN: 2 3 4
+MIPSETS=1,340
+MIPSETS: 0
OK
AT+MIPSETS?
+MIPSETS: 1 340
OK
AT+MIPSEND=1,"444444"
+MIPSEND: 1,1497
OK
Note:
AT+MIPSEND?
+MIPSEND: 1 1497
OK
+MIPPUSH=1
+MIPPUSH: 0
+MIPCLOSE=1
+MIPCLOSE: 1
OK
+MIPCALL=0
OK

TCP Raw Data Transfer Example (Online Data Mode)

// create a wireless link:
AT+MIPCALL=1,"internetg"
OK
+MIPCALL: 172.17.242.86
// open a socket in Online Data Mode:
AT+MIPODM=1,1204,"123.245.213.12",1205,0
OK
+MIPODM: 1,1
December 31, 2007
//Terminal checking the status of socket to be opened (socket 1 opened
//Asking the G24 to accumulate 340 bytes on socket 1 prior to sending
//Sent coded "DDD" string
//Free storage in the accumulating buffer
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.
//Checking the size remaining (optional)
//Terminal asks G24 to flush the buffer in socket 1
//Terminal closes the socket
//Terminal hangs up the link
AT Commands Reference Manual
Chapter 4: Using the Commands
4-29

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents