User guide

Redpine Signals, Inc. Proprietary and Confidential. Page 49
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
…………………….
0x4F 0x4B 0x01 0x0D 0x0A
3.4.7 Query a Listening Socket’s Active Connection Status
Description
This command retrieves handles of active socket connections established
through the listening socket. This command can be issued when a
listening/server TCP socket has been opened in the module, to get information
about the remote peer’s client socket.
Command
at+rsi_ctcp
Usage
at+rsi_ctcp=hn\r\n
Parameters
hn – TCP listening socket handle for an already open listening socket in the
module.
Response
Result Code
Description
OK<hn><IP_Address><Port>
An active socket handle. <hn> is
returned as two‟s complement.
hn >=0: A handle to an active
connected socket. Returned as
hex. For example, if hn = 7, it is
returned as 0x07
hn =-1: No connection has been
established yet between module‟s
listening socket and remote peer.
Returned as two‟s complement
(0xFF).
IP_Address is the client/remote
peer‟s IP address. Returned in
hex, 4 bytes.
Port is the port number on which
the client/peer is exchanging
data. Returned in hex, 2 bytes
. For example, if the port number
is 8001 (0x1F41), then first 0x41