WM620 AT
Command Manual
Copyright © Neoway Technology Co., Ltd
90
9.13 Querying TCP/UDP Connection Status: +IPSTATUS
Description
To query the TCP/UDP connection status
Format
AT+IPSTATUS=<n><CR>
Parameter
<n>: Socket number, ranging from 0 to 5
Return Value
+IPSTATUS:<n>,< status>,<type>:
<n>: Socket number, ranging from 0 to 5
<status>: Connection status, value: CONNECT, DISCONNECT, or LISTENING
<type>: Connection type, TCP, UDP, SVR, UDPSVR
Example
AT+IPSTATUS=0
+IPSTATUS:0,CONNECT,TCP
OK
A TCP connection has been set up
on socket 0.
AT+IPSTATUS=2
+IPSTATUS:2,DISCONNECT
OK
Socket 2 has been closed and no
connection has been set up on it.
AT+IPSTATUS=1
+IPSTATUS:1,CONNECT,UDP
OK
A UDP connection has been set up
on socket 1.
AT+IPSTATUS=2
+IPSTATUS:2,LISTENING,SVR
OK
TCP service listening has been
enabled on socket 2.
Remarks
N/A
9.14 Reading Buffered TCP/UDP Data: +IPNETREAD
Description
To read buffered data received through TCP/UDP connection
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