CAI JINYONG
2018-3-30
CHONGHAN CH-D3 WIRELESS DTU USER MANUAL
页
13
Note: TCP Server must use always online function, please put jumper to the
pin of watch dog, and refer follow chapters for detail.
4.2.
UDP Transmit
4.2.1.
UDP Always Online
at+istyp=1<cr>
// UDP protocol
at+ihsrv=ip:port<cr>
// set opposite IP and port
at+ipars<cr>
// parameters save
at+i!snmd<cr>
// switch to Serial NET mode
4.2.2.
UDP Trigger Online
at+istyp=1<cr>
// UDP protocol
at+ihsrv=ip:port<cr>
// set opposite IP and port
at+iiato=n<cr>
// n=Integer, the DTU will
offline when the connect no
data transport in (n) seconds
at+itup=1<cr>
// set it to trigger up mode,
refer chapter 8 for detail
at+ipars<cr>
// parameters save
at+i!snmd<cr>
// switch to Serial NET mode
Note: changes to Serial Net mode, the AT command don’t have "!"
4.2.3.
UDP Step by Step
at+isudp:ip,port:lport<cr>
// establish a UDP connection by
command. Send data to
ip&port, receive data from
lport
I/(000)
// 000 is handle of the
connection
at+issnd%:000,n:*******
// send a stream (******) to
connect 000, length is (n),
at+isrcv: 000<cr>
// receive data from connection
000
at+iscls: 000<cr>
// close the connection 000
5.
Common Function
5.1.
Ping
at+ipds1=220.192.32.103<cr>
// setting primary destination
at+ipds2=220.192.0.130<cr>
// setting backup destination,
when first destination reply
time out
at+ipds1=www.sina.com<cr>
// setting primary destination
at+ipds2=www.21cn.com<cr>
// setting backup destination,