Redpine Signals, Inc.
Page 27
R
R
S
S
-
-
W
W
C
C
-
-
3
3
0
0
1
1
E
E
v
v
a
a
l
l
u
u
a
a
t
t
i
i
o
o
n
n
B
B
o
o
a
a
r
r
d
d
U
U
s
s
e
e
r
r
G
G
u
u
i
i
d
d
e
e
V
V
e
e
r
r
s
s
i
i
o
o
n
n
2
2
.
.
5
5
1
1
5.
Connect the Laptop C (Windows XP/Vista/Windows7) to the Access
Point. It is assumed for the rest of this section that the Laptop has
acquired an IP address of 192.168.50.20.
6.
Exchanging data between the module and the Laptop C
Using TCP Sockets
a.
Open a TCP socket in the Laptop C by typing the below command
in the Windows command line interface. Make sure that any
firewalls, that might prevent opening of sockets, are disabled.
TCP.exe c 2001 192.168.50.10 5001
The application is found in the path
RS.WSC.x.x.GENR.x.x.x.x.x.x\Resources\Applications\Peer\Windo
ws\ .
b.
The command line window will display three options: 1 (Send), 2
(Receive) and 3 (Exit). Type 1 to send data to the Wi-Fi module.
On being prompted “Enter the string to be Transmitted”, type any
string from the Keyboard (“test” in this example). On pressing
“Enter” key on the keyboard, the data is sent from the Laptop C to
the module and the terminal displays it with the
AT+RSI_READ
message.
c.
To send data from the Wi-Fi module, first type Option 2 in Laptop
C and then type the below command in the module
at+rsi_snd=1,0,0,0,abcdefghij
The first parameter in the command is the
socket_handle
. It is 1
in this case. It is returned as the response of the command
at+rsi_ltcp
and can be observed in the Serial Port Monitor. Refer
to the Programming Reference Manual for more details. The data
sent will be displayed in the Laptop C.
Usage of PC applications:
TCP.exe <s for server> <lport> <dipaddr> <dport>
TCP.exe <c for client> <lport> <dipaddr> <dport>
s – to open a server TCP socket
c – to open a client TCP socket
lport – Local port number
dipaddr – IP address of the destination
dport – Port number of the destination
UDP.exe is also used in the same way.