WM620 AT
Command Manual
Copyright © Neoway Technology Co., Ltd
95
9.18 Setting Local UDP Port: +UDPPORT
Description
To set the local UDP port
Format
AT+UDPPORT=<n>,<port><CR>
Parameter
<n>: Socket number, ranging from 0 to 5
<port>: Port ID, ranging from 1024 to 65535
Return Value
N/A
Example
AT+UDPPORT=2,5500
OK
Set the locate UDP port of socket 2
to 5500.
AT+UDPPORT=1,1023
+CME ERROR: 3
The port number is incorrect.
AT+UDPPORT=1,1026
+UDPPORT:ERROR, USED
The port has been occupied by
other sockets and the socket is
opened.
AT+UDPPORT=0,1026
+UDPPORT:ERROR, OPENED
The socket has been opened and
does not allow new port number.
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
dynamically every time the UDP connection is set up.
9.19 Setting Socket Timeout Parameter: +SSTP
Description
To obtain the port ID of the socket on the module
Format
AT+GETPORT=<socket>
Parameter
<socket>: socket ID
Return Value
+GETPORT:<n>,<typet> <port>
<n>: socket ID
<typet>: Connection type
<port>: Port ID
Example
AT+GETPORT=0
+GETPORT:0,TCP,42299
Return the port ID of socket
0.