
Neo_WM620 WCDMA Module AT Command Set
Copyright © Neoway Technology Co., Ltd
65
9.13
Reading Buffered TCP/UDP Data:
+IPNETREAD
Description
To read buffered data received through TCP/UDP link
Format
AT+IPNETREAD=<n>[,<len>]<CR>
Parameter
<n>: Socket number, ranging from 0 to 5
<len>: Length of data to be read, ranging from 1 to 1024.
Return
Value
+IPNETREAD:<n>,<len>
<n>: Socket number, ranging from 0 to 5
<len>: The length of data that are read actually, ranging from 0 to 1024
Example
AT+TCPSETUP=0,58.60.184.213,10405,1
OK
+TCPSETUP:0,OK
+IPURCREAD:0
AT+IPNETREAD=0,1024
+IPNETREAD:0,10
1234567890
OK
Link is set up on socket 0 and the
receiving mode is manual reading.
Socket 0 receives data.
Read data received and buffered by
socket 0.
Read 10-byte data.
Data content
+IPURCREAD:0
AT+IPNETREAD=0,5
+IPNETREAD:0,5
12345
OK
AT+IPNETREAD=0,5
+IPNETREAD:0,5
67890
OK
Socket 0 receives data.
The socket receives a 10-byte data
packet, which is read twice (5-byte each
time).
Read 5-byte data for the first time.
Read 5-byte data for the second time.
+IPURCREAD:0
AT+IPNETREAD=0
+IPNETREAD:0,10
1234567890
OK
Socket 0 receives data.
The default length is 1024.
Read 10-byte data.
Data content
AT+IPNETREAD=0,1024
+IPNETREAD:0,0
OK
No data in the buffer of socket 0.
AT+IPNETREAD=0,1025
ERROR
The command is incorrect because the
length is invalid.
AT+IPNETREAD=1,10
ERROR
The command is executed incorrectly.
The link is not set up or the receiving
mode is not manual reading.