WM620 AT
Command Manual
Copyright © Neoway Technology Co., Ltd
85
Return Value
See the Example.
Example
AT+TCPSEND=0,1
>1
OK
+TCPSEND:0,1
1-byte data is successfully sent
through socket 0.
AT+TCPSEND=0,10
>665A4E0A597D554AFF01
OK
+TCPSEND:0,10
Hexadecimal
ASCII
data
is
successfully sent through socket 0.
Select HEX when sending data.
AT+TCPSEND=0,1
+TCPSEND: SOCKET ID OPEN FAILED
1-byte data fails to be sent via socket
0 because the connection is not
established.
AT+TCPSEND=0,4097
+TCPSEND: DATA LENGTH ERROR
4097-byte data fails to be sent via
socket 0 because data length exceeds
the limit.
AT+TCPSEND=0,10
>
+TCPSEND:Error!TimeOut
10 seconds timed out. No data is input.
The module returns ERROR.
AT+TCPSEND=0,1
+TCPSEND:ERROR
No TCP connection is set up on socket
0, but some connection of other type
might have been set up.
Remarks
Ensure that the TCP connection has been set up before sending TCP data.
If the command format is incorrect, the module will also returns
+TCPSEND:ERROR
.
9.7 Receiving TCP Data: +TCPRECV
Description
To receive TCP data
Format
+TCPRECV:<n>,<length>,<data><CR>
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>
.