14.03.2015 Views

AT Commands Reference Manual - wireless netcontrol GmbH

AT Commands Reference Manual - wireless netcontrol GmbH

AT Commands Reference Manual - wireless netcontrol GmbH

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 4: Using the <strong>Commands</strong><br />

When the module sends +MIPXOFF unsolicited indication, it rejects all data, received after that,<br />

so the user should wait for +MIPXON indication in order to continue data sending.<br />

Intermodule Communication Example<br />

Following is an example of a basic TCP/IP communication between two H24 modules.<br />

Module A - client<br />

Module B - server<br />

Network<br />

TERMINAL<br />

TERMINAL<br />

serial<br />

MODULE<br />

MODULE<br />

serial<br />

Setup the PDP context<br />

Setup the PDP context<br />

<strong>AT</strong>+CGDCONT=1,"IP","apn","0.0.0.0",0,0<br />

<strong>AT</strong>+CGDCONT=1,"IP","apn","0.0.0.0",0,0<br />

OK<br />

OK<br />

Create MIP Call (activate PDP context)<br />

Create MIP Call (activate PDP context)<br />

<strong>AT</strong>+MIPCALL=1,1,1<br />

<strong>AT</strong>+MIPCALL=1,1,1<br />

OK<br />

OK<br />

+MIPCALL: 1,1,"172.16.157.52 "+MIPCALL: 1,1,"172.16.80.103"<br />

Open TCP listen socket (firstly)<br />

Open TCP active socket (secondly)<br />

<strong>AT</strong>+MIPOPEN=1,1,1010,"0.0.0.0",0,0<br />

<strong>AT</strong>+MIPOPEN=1,1,1020,"172.16.80.103",1010,0 OK<br />

OK<br />

+MIPOPEN: 1,1,1 +MIPOPEN: 1,1,1,"172.16.80.103",1020<br />

Write data to the socket<br />

<strong>AT</strong>+MIPSEND=1,"48656C6C6F"<br />

OK<br />

+MIPSEND: 1,0,1367<br />

Send the socket data to remote side<br />

<strong>AT</strong>+MIPPUSH=1<br />

OK<br />

+MIPPUSH: 1,0<br />

Receive data from remote side<br />

+MIPRTCP: 1,0,48656C6C6F<br />

Close the socket<br />

<strong>AT</strong>+MIPCLOSE=1<br />

OK<br />

+MIPCLOSE: 1,0 +MIPST<strong>AT</strong>: 1,4<br />

April 15, 2010 H24 - <strong>AT</strong> <strong>Commands</strong> <strong>Reference</strong> <strong>Manual</strong> 4-33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!