N11 V2
AT Command Manual
Copyright © Neoway Technology Co., Ltd
60
>
OK
+TCPSEND:0,21
through socket 0.The command ends
with \r if no data length is contained.
The data length should not exceed
4096 bytes.
Remarks
Ensure that the TCP link is set up before sending TCP data.
The
AT+IPSTATUS
command is recommended to check the buffer size
before sending data.
The command supports only char type data if the
AT+DATAFORMAT
command is not used to set the sending format.
7.3 Receiving TCP Data: +TCPRECV
Description
To receive TCP data
Format
+TCPRECV:<n>,<length>,<data><CR>
Parameter
<n>: Socket 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. 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.
+TCPRECV:
0,10,31323334353637383930
10-byte of data is received on socket 0.
The data is 31323334353637383930 in
ASCII format.
Remarks
N/A
7.4 Closing TCP Link: +TCPCLOSE
Description
To close a TCP link
Format
AT+TCPCLOSE=<n><CR>
Parameter
<n>: Socket number, ranging from 0 to 4