User guide

Redpine Signals, Inc. Proprietary and Confidential. Page 50
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
Result Code
Description
is returned, then 0x1F
ERROR<Error code>
Failure
Example 1:
at+rsi_ctcp=1\r\n
………………………………………………………………….
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x63 0x74 0x63 0x70 0x3D 0x31
0x0D 0x0A
Example 2:
OK<hn=7><IP_Address=192.168.40.10><Port=8001> \r\n
…………………….
0x4F 0x4B 0x07 0xC0 0xA8 0x28 0x0A 0x41 0x1F 0x0D 0x0A
Example 3:
OK<hn=-1> \r\n
…………………….
0x4F 0x4B 0xFF 0x0D 0x0A
3.4.8 Close a Socket
Description
This command closes a TCP/UDP socket in the module.
Command
at+rsi_cls
Usage
at+rsi_cls=hn\r\n
Parameters
hn: TCP/UDP socket handle of an already open socket.
For example, to close the socket with handle 1, the command is
at+rsi_cls=1\r\n
……………………..
0x61 0x74 0x2B 0x72 0x73 0x69 0x5F 0x62 0x6C 0x73 0x3D 0x31 0x0D 0x0A
Response
Result Code
Description