PIONEERPOS G24-LC manual TCP Data Transfer Example, Multi-point Data Transfer Example

Models: G24-LC G24-L

1 444
Download 444 pages 51.67 Kb
Page 397
Image 397

Chapter 4: Using the Commands

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?

//Terminal checking the status of socket to be opened (socket 1 opened

OK)

 

+MIPOPEN: 2 3 4

 

+MIPSETS=1,340

//Asking the G24-L to accumulate 340 bytes on socket 1 prior to

sending

 

+MIPSETS: 0

 

OK

 

AT+MIPSETS?

 

+MIPSETS: 1 340

 

OK

 

AT+MIPSEND=1,"444444"

//Sent coded "DDD" string

+MIPSEND: 1,1497

//Free storage in the accumulating buffer

OK

 

Note: 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.

AT+MIPSEND?

//Checking the size remaining (optional)

+MIPSEND: 1 1497

 

OK

 

+MIPPUSH=1

//Terminal asks G24-L to flush the buffer in socket 1

+MIPPUSH: 0

 

+MIPCLOSE=1

//Terminal closes the socket

+MIPCLOSE: 1

 

OK

 

+MIPCALL=0

//Terminal hangs up the link

OK

 

Multi-point Data Transfer Example

AT+MIPCALL=1,"orange","test","test"

OK

+MIPCALL: 172.17.242.86 AT+MIPOPEN=1,1001,"172.17.238.44",1001,0

OK +MIPOPEN: 1,1 AT+MIPOPEN=2,1111,"172.17.238.44",1111,0

OK +MIPOPEN: 2,1

April 15, 2008

G24-L AT Commands Reference Manual

4-29

Page 397
Image 397
PIONEERPOS G24-LC manual TCP Data Transfer Example, Multi-point Data Transfer Example