WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
Phone 408-395-6539
-
28 -
You could also have specified the roving1 access point by using the command
join # 1
If the access point is security enabled you will need to set the pass phrase prior to issuing the
join
command. The RN-131G module will attempt to inquire and determine the security protocol of the
access point so you do not have to set the authentication mode. To set the pass phrase for WPA use
the command
set wlan phrase <string>
. For WEP set the key using the
set wlan key <num>
command.
Once you have successfully associated to the network the access point SSID is stored. This along
with the pass phrase can be saved to the config file so the module can associate with the network
each time it is booted up.
11.2
Making Connections
To make a connection into the module simply open a IP socket and connect to the IP address of the
module. Telnet is a simple way to test this connection. From in Telnet type open <addr> <port>.
In the example above the telnet command you look like
open 10.20.20.62 2000
. Once open you
can type characters into the UART window and see them on the Telnet window or visa versa.
To make a connection from the module you will need IP address and port number of your server
application. A simple program to test this functionality is a COM port redirector. This software opens
an IP port and transfers all data it receives to a specified COM port on your machine. A free com
port redirector program is available from Pira at
http://www.pira.cz/eng/piracom.htm
After installing and starting this program, note the IP address of the machine it is running on. This
can be found by running ipconfig in the Microsoft command window.
With the WiFly-GSX module in command mode, type
open <addr> <port>
. The server will report
the connection is open and you can type characters into the UART window and see them on the
server window or visa versa.
11.3
Setting up Automatic Connections
Often, it is desired on power up (or wakeup) to automatically connect out to a remote server, send
data, and then disconnect. This can be configured to happen automatically.
In the following example assume the network SSID and security have been set correctly and autojoin
is set to 1. This will also work in adhoc mode(autojoin 4), however there will be delay in connecting
to the adhoc network from the remote computer so set the sleep timer large enough to allow the
network to get set up and the autoconn establish a TCP connection.
When the module wakes up or is powered on the autoconn timer will cause the module to attempt a
connection to the stored remote IP address and port. While this connection is open the sleep timer
will not decrement. While data is flowing the idle timer will not decrement. Once data stops for 5