Neo_M660 AT Command Set
Copyright © Neoway Technology Co., Ltd
52
9.9 Receiving UDP Data: +UDPRECV
Description
To receive UDP data
Format
+UDPRECV:<n>,<length>,<data><CR>
Parameter
<n>: Link number, ranging from
0
to
4
<length>: The length of the data received
<data>: The data received
Add
0x0d 0x0a
to the end of the data.
You can identify the end based on <
length
>.
Return
Value
See the Example.
Example
+UDPRECV: 0,10,1234567890
10-byte data is successfully received on
link 0. The data is 1234567890.
Remarks
N/A
9.10 Closing UDP Connection: +UDPCLOSE
Description
To close the UDP connection
Format
AT+UDPCLOSE=<n><CR>
Parameter
<n>: Link number, ranging from 0 to 4
Return
Value
If
<n>
is illegal, the module returns: +UDPCLOSE: ERROR.
Otherwise, the module returns
+UDPCLOSE:<n>,OK
.
Example
AT+UDPCLOSE=1
+UDPCLOSE: 1,OK
The TCP connection on link 1 is closed
successfully.
AT+UDPCLOSE=5
+UDPCLOSE: ERROR
Link number error
Remarks
N/A
9.11 Querying TCP/UDP Link Status: +IPSTATUS
Description
To query the TCP/UDP link status
Format
AT+IPSTATUS=<n><CR>
AT+IPSTATUS<CR>
Parameter
<n>: Link number, ranging from 0 to 4
Return
Value
AT+IPSTATUS=<n><CR> (Non-transparent transmission mode)
+IPSTATUS:<n>,<CONNECT or DISCONNECT>,<TCP or UDP>, <send-buffer-size>
<CONNECT or DISCONNECT>: Link status, value: CONNECT or DISCONNECT
<TCP or UDP>: Link type, value: TCP or UDP
<send-buffer-size>: The size of the available send buffer on the module, in decimal