User guide

Redpine Signals, Inc. Proprietary and Confidential. Page 44
R
R
S
S
9
9
1
1
1
1
0
0
-
-
N
N
-
-
1
1
1
1
-
-
2
2
2
2
/
/
2
2
4
4
/
/
2
2
8
8
S
S
o
o
f
f
t
t
w
w
a
a
r
r
e
e
P
P
r
r
o
o
g
g
r
r
a
a
m
m
m
m
i
i
n
n
g
g
R
R
e
e
f
f
e
e
r
r
e
e
n
n
c
c
e
e
M
M
a
a
n
n
u
u
a
a
l
l
V
V
e
e
r
r
s
s
i
i
o
o
n
n
4
4
.
.
1
1
5
5
lport Local Port on the RS9110-N-11-2X module (allowed range 1024 to
49151)
Response
Result Code
Description
OK<sock_handle>
Upon successfully opening and
connecting the TCP socket to the
Host port, a socket handle is
returned. OK is returned as
ASCII, while <sock_handle> in
hexadecimal. The socket handle
would be followed after OK.
Socket handle is a 1 byte value,
ranging from 1 onwards. Hence,
the first socket opened will have a
socket handle of 1.
ERROR<Error code>
Failure
Example 1
at+rsi_tcp=192.168.40.10,8000,1234\r\n
………………………………………………………………….
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x74 0x63 0x70 0x3D 0x31 0x39 0x32
0x2E 0x31 0x36 0x38 0x2E 0x34 0x30 0x2E 0x31 0x30 0x2C 0x38 0x30 0x30
0x30 0x2C 0x31 0x32 0x33 0x34 0x0D 0x0A
For a socket handle of 1 the response,
OK 1 \r\n
…………………….
0x4F 0x4B 0x01 0x0D 0x0A
3.4.3 Open a Listening UDP Socket
Description
This command opens a User Datagram Protocol (UDP) socket and binds to a
specified port. The UDP socket waits for the data from the peer. This socket is
not connected to any peer and is used if the user wants to receive/send data
from/to any peer.
Command
at+rsi_ludp
Usage
at+rsi_ludp=lport\r\n