EasyManua.ls Logo

Neoway M590E - Receiving TCP Data: +TCPRECV; Closing TCP Connection: +TCPCLOSE; Setting up UDP Connection: +UDPSETUP

Neoway M590E
65 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Neo_M590E V1 GPRS Module AT Command Set
Copyright © Neoway Technology Co., Ltd
31
Remarks
Ensure that the TCP connection has been set up before sending TCP data.
It is recommended that you use the
AT+IPSTATUS
command to check the buffer
size before sending data.
Network congestion can result in sending failure.
Before > is 0x0d, 0x0a.
3.4 Receiving TCP Data: +TCPRECV
Description
To receive TCP data
Format
+TCPRECV:<n>,<length>,<data><CR><LF>
Parameter
<n>:Socket number, ranging from
0
to
5
<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
+TCPRECV: 0,10,1234567890
10-byte data is successfully received on
socket 0. The data is
1234567890
.
Remarks
N/A
3.5 Closing TCP Connection: +TCPCLOSE
Description
To close a TCP connection
Format
AT+TCPCLOSE=<n><CR>
Parameter
<n>: Socket number, ranging from 0 to 5
Return Value
See the Example.
Example
AT+TCPCLOSE=1
+TCPCLOSE: 1,OK
Close the TCP connection.
The TCP connection on socket 1 is closed
successfully.
AT+TCPCLOSE=5
+TCPCLOSE:ERROR
Socket number error
+TCPCLOSE:0,Link Closed
The TCP link is closed.
The server sends TCP connection closing command or
the network encounters abnormality or weak signals.
Remarks
N/A
3.6 Setting Up UDP Connection: +UDPSETUP
Description
To set up a UDP connection

Table of Contents

Related product manuals