![Neoway M590E Manual Download Page 39](http://html1.mh-extra.com/html/neoway/m590e/m590e_manual_1667872039.webp)
Neo_M590E V1 GPRS Module AT Command Set
Copyright © Neoway Technology Co., Ltd
34
3.10
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
<CR><LF>+IPSTATUS:<n>,<CONNECT or DISCONNECT>,<TCP or UDP>,
<send-buffer-size><CR><LF>
<CONNECT or DISCONNECT>:Socket status, value: CONNECT or DISCONNECT
<TCP or UDP>:Connection type, value: TCP or UDP
<send-buffer-size>:The size of the available send buffer on the module, in decimal ASCII
mode, unit: byte
Example
AT+IPSTATUS=0
+IPSTATUS:0,CONNECT,TCP,2047
A TCP connection has been set up on
socket 0 and the buffer size is 2047 bytes.
AT+IPSTATUS=1
+IPSTATUS:1,DISCONNECT
No TCP or UDP connection is set up on
socket 1.
AT+IPSTATU
ERROR
The AT command is not complete.
AT+IPSTATUS=7
+IPSTATUS:Error 1
The socket number in the command is
incorrect.
AT+IPSTATU=1
ERROR
The command format is incorrect. An "S"
is omitted.
Remarks
N/A
3.11
Setting Local UDP Port: +UDPLPORT
Description
To set the local UDP port
Format
AT+UDPLPORT=<socket>,<port><CR>
Parameter
<socket>: Socket ID, ranging from 0 to 5
<port>: Port ID, ranging from 1 to 65535
Return Value
See the Example.
Example
AT+UDPLPORT=0,6800
OK
Set the local port ID of socket 0 to 6800.
AT+UDPLPORT=0,0
OK
The local port ID of socket 0 is allocated by default.
The first UDP port is 4096 while the second is 4097.
Remarks
This command should have been executed before the
AT+UDPSETUP
command is
executed.
If you do not use this command, the local port ID will be allocated by default, that is,
the first one is 4096, the second one is 4097, …