EasyManua.ls Logo

Neoway M590E - Sending UDP Data: +UDPSEND

Neoway M590E
65 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Neo_M590E V1 GPRS Module AT Command Set
Copyright © Neoway Technology Co., Ltd
32
Format
AT+UDPSETUP=<n>,<ip>,<port><CR>
Parameter
<n>:Socket number, ranging from 0 to 5
<ip>: Destination IP address, in
xx.xx.xx.xx
format or domain name format
(www.XXXX.com)
<port>: Destination port ID in decimal ASCII code
Return Value
See the Example.
Example
AT+UDPSETUP=1,220.199.66.56,7000
OK
+UDPSETUP:1,OK
The connection to 220.199.66.560.7000 is
successfully set up on socket 1.
AT+UDPSETUP=1,192.168.20.6,7000
OK
+UDPSETUP:1,FAIL
Failed to set up the connection to
192.168.20.6,7000 on socket 1 because
socket 1 is unavailable.
AT+UDPSETUP=0,201.128.20.6,7000
+UDPSETUP:Error 1
A TCP/UDP connection has been set up
on socket 0.
AT+UDPSETUP=201.128.20.6,7000
+UDPSETUP:Error 2
The command format is incorrect.
Remarks
Use the
AT+XIIC=1
command to set up a PPP connection before running this
command.
The local address of UDP varies with PPP connections.
3.7 Sending UDP Data: +UDPSEND
Description
To send UDP data
The module will returns > after this command is sent. Send UDP data 50 ms to 100 ms
later.
Format
AT+UDPSEND=<n>,<length><CR>
Parameter
<n>: Socket number, ranging from
0
to
5
. A UDP connection is established on the socket.
<length>: The length of the data to be sent, ranging from 1 to 2000, unit: byte.
Return Value
If the AT command is input in correct format, the module returns >.
If the command is input in incorrect format, the module returns
<CR><LF>+UDPSEND:Error<CR><LF>
.
After entering the command, input the data to be sent until the module returns >.
If the UDP data is sent successfully, the module returns
<CR><LF>+UDPSEND:<n>,<length><CR><LF>
.
<length>
indicates the length
of data already sent.
Example
AT+UDPSEND=0,10
>1234567890
OK
10-byte data is successfully sent through
socket 0.

Table of Contents

Related product manuals