Roving Networks WIFLY GSX User manual

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
W
I
F
LY
GSX
802.11 b/g wireless LAN Modules
User Manual and Command Reference
RN-131G,
RN-131C,
RN-134,
RN-121,
RN-123
&
RN-125
Version 2.15
October 16, 2009
Copyright © 2009 Roving etworks, Inc. All Rights Reserved.
The contents of this document can be changed by Roving networks without prior notice and do not
constitute any binding undertakings from Roving networks. Roving etworks is not responsible
under any circumstances for direct, indirect, unexpected or consequent damage that is caused by
this document.

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 2 -
1
Overview.......................................................................................................................... 3
2
Hardware Interface ........................................................................................................... 4
2.1
Power ....................................................................................................................... 4
2.2
Reset........................................................................................................................ 4
2.3
UART ........................................................................................................................ 4
2.4
Status Indictors ......................................................................................................... 5
3
Configuration .................................................................................................................... 5
3.1
Entering Command Mode ............................................................................................ 5
4
WiFly Command Reference ................................................................................................. 7
4.1
Command Syntax ...................................................................................................... 7
4.2
Command Organization .............................................................................................. 7
5
SET Commands ................................................................................................................. 8
5.1
ADHOC Parameters .................................................................................................... 8
5.2
BROADCAST Parameters ............................................................................................. 8
5.3
COMM Parameters ...................................................................................................... 8
5.4
D S Parameters ........................................................................................................ 9
5.5
FTP Parameters ......................................................................................................... 9
5.6
IP Parameters............................................................................................................ 9
5.7
OPTIO AL Parameters .............................................................................................. 11
5.8
SYSTEM Parameters ................................................................................................. 11
5.9
TIME Server Parameters ........................................................................................... 12
5.10
UART Parameters .................................................................................................. 12
5.11
WLA Parameters ................................................................................................. 13
6
GET Commands .............................................................................................................. 16
7
STATUS Commands ......................................................................................................... 17
8
ACTIO Commands ......................................................................................................... 18
9
FILE IO Commands.......................................................................................................... 19
10
Advanced Features and Settings ....................................................................................... 20
10.1
System Timers and Auto Connect Timers ................................................................. 20
10.2
Wake on Sensor Input ........................................................................................... 21
10.3
Wake on UART ...................................................................................................... 21
10.4
UART Receiver, RTS/CTS Hardware Flow Control ....................................................... 21
10.5
Setting GPIO direction, Alternate Functions and Disabling LEDs .................................. 22
10.6
Setting Debug Print levels ...................................................................................... 24
10.7
Using the Real Time Clock Function ......................................................................... 25
10.8
Using the UDP Broadcast function ........................................................................... 26
11
Joining etworks and Making Connections .......................................................................... 27
11.1
Associate with a network access point ..................................................................... 27
11.2
Making Connections .............................................................................................. 28
11.3
Setting up Automatic Connections ........................................................................... 28
11.4
Controlling Connections using PIO5 and PIO6 ........................................................... 29
11.5
Using D S settings ............................................................................................... 29
11.6
Utilizing the Backup IP address/connect function....................................................... 29
12
Firmware Upgrade over FTP .............................................................................................. 30
13
Adhoc etworking Mode ................................................................................................... 31
13.1
Infrastructure and adhoc comparison ...................................................................... 31
13.2
Configuring adhoc mode ........................................................................................ 31
14
Analog Sensor Capability .................................................................................................. 33
15
Default Configuration Settings .......................................................................................... 34
15.1
Restoring Default configuration settings: ................................................................. 35
16
Boot-up Timing Values ..................................................................................................... 36
17
Supported Access Points .................................................................................................. 36
18
Release otes ................................................................................................................. 37
18.1
Known problems ................................................................................................... 37
18.2
Current Firmware features and fixes ........................................................................ 37

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 3 -
1Overview
The “WiFly” radio module is a complete stand alone embedded wireless LA access device. The
device has on board TCP/IP stack and applications. Requiring only 4 pins (POWER, TX, RX, G D) to
design in. Once initial configuration is set, the radio can automatically access the WiFi network and
send/receive serial data over UART.
•Fully Qualified and Wifi Certified 2.4GHz IEEE 802.11b/g transceiver
•High throughput, up to 4Mbps sustained data rate with TCP/IP and WPA2
•Ultra-low power (4uA sleep, 40mA Rx, 210mA max Tx)
•Small, compact surface mount module
•On board ceramic chip antenna and U.FL connector for external antenna
•8 Mbit flash memory and 128 KB RAM
•UART and SPI (future) data/control interfaces
•10 general purpose digital I/O
•8 analog inputs
•Real-time clock for wakeup and time stamping/data logging
•Accepts 3.3V regulated or 2-3V battery with on board boost regulators
•Supports Adhoc and Infrastructure mode connections
•On board ECOS-OS, TCP/IP stacks
•Wi-Fi Alliance certified for WPA2-PSK
•FCC / CE/ ICS certified and RoHS compliant
eatures
•Host Data Rate Up to 2.7 Mbps for UART
•Memory 128 KB RAM,2MB ROM, 2 KB battery-backed memory, 8 Mbit Flash.
•Intelligent, built-in power management with programmable wakeup
•Can be powered from regulated 3.3-3.7V source or 2.0-3.0V batteries
•Real time clock for time stamping, auto-sleep and auto-wakeup modes
•Configuration over UART or wireless interfaces using simple ASCII commands
•Over the air firmware upgrade (FTP), and data file upload.
•Secure WiFi authentication WEP-128, WPA-PSK (TKIP), WPA2-PSK (AES).
•Built in networking applications DHCP client, UDP, D S client , ARP, ICMP ping, FTP, HTTP
•802.11 power save and roaming functions

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 4 -
2Hardware Interface
See the R -131 or R -134 data sheets on the Roving etworks website for technical specifications
and layout information of these modules.
2.1 Power
There are two options for powering the R -131G module directly.
DC SUPPLY: Apply 3.3 VDC power to VBATT (pin 20), and V3.3I (pin 21). Tie 3.3VREG-I (pin 18)
to GROU D. 3.3V-REG-OUT (Pin 17) leave floating.
BATTERY: Apply battery = 2.0 to 3.3VDC to VBATT (pin 20). V3.3I pin 21 = floating.
Tie pin 17 to pin 18. (This enables the on board battery boost 3.3V switcher).
There is a built in voltage brownout monitor which will shut down the chip when the voltage drops
below 2.0 VDC.
Warning: Do OT exceed the voltage ratings on the 3.3V pins, damage to the module will result.
otes:
#1: The Sensor inputs SE S0-7 are extremely sensitive to over voltage. Under no conditions
should these pins be driven above 1.2VDC. Placing any voltage above this will permanently
damage the radio module and render it useless.
#2: Placing 5VDC or any voltage above 3.3Vdc into the VDD pins of the module will
permanently damage the radio module.
#3: Placing 3.3Vdc into the PIO’s while they are set as outputs will permanently damage the
module. The failure mode is a short across G D and VCC.
2.2 Reset
Reset is active LOW and is optional/does not need to be connected. The reset pin is 3.3V tolerant
and has an internal pull up of 100K to the VBATT.
2.3 UART
Connect a common ground when using the external TX, RX inputs.
For a 3 wire DB-9 interface (connect tx, rx, gnd only)
Factory default is hardware flow control disabled, CTS and RTS are not required.
When using a 5.0 VDC Input, PIO’s and UART input pins require a resistor divider. A suggestion is
10K in series with 20k to ground. PIO’s are 0-3.3 VDC not 5.0 VDC tolerant.

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 5 -
2.4 Status Indictors
PIO 4, 5 and 6 are active high and can be connected to external LEDs to provide network, connection
and data status.
3Configuration
3.1 Entering Command Mode
Upon power up, the device will be in data mode. To enter command mode, exactly the three
characters $$$ must be sent. The device will respond with CMD.
While in command mode, the device will accept ASCII bytes as commands.
To exit command mode, send exit<cr>. The device will respond with “EXIT”.
Parameters, such as the SSID, channel, IP address, Serial Port settings, and all other settings can be
viewed and configured in command mode.
ASCII characters can be sent through a terminal emulator connected to the UART or via Telnet.
When using the UART communications settings should match the settings used when R -131g
connects, for example: the default is 9600 baudrate, 8 bits, o Parity, 1 stop bit, and hardware flow
control disabled.
Run your favorite terminal emulator, Roving etworks provides a free one, Teraterm, at
http://www.rovingnetworks.com/support/teraterm.zip.
Type $$$ on in the terminal emulator. You should see “CMD” returned to you. This will verify that
your cable and comm. settings are correct. Most valid commands will return an “AOK”, response,
and invalid ones will return an “ERR” description.
To exit command mode, type “exit“<cr>.
NOTE: You can enter command mode locally over the UART interface at any time when not
connected, and also when connected if the appropriate settings are enabled.
Remote configuration using ADHOC mode
Using adhoc mode to configure the device eliminates the need for the module to be associated with a
network access point. In adhoc mode the module creates it own “on demand” network that you can
connect to via your computer like you would to any other network.
To enable adhoc mode via hardware set PIO9 high (3.3V) at power up. On the R -134 PIO9 is on
the J1 jumper block. When the module powers up with PIO9 set high, the WiFly module creates an
adhoc network with the following
SSID: WiFly-GSX-XX where XX is the final two bytes of the devices MAC address
Condition PIO6=Red LED PIO5=Yellow LED PIO4=Green LED
O solid ot Associated Connected over TCP
Fast blink Rx/Tx data transfer
o IP address
Slow blink Associated, o
Internet IP address OK
OFF Associated, Internet
OK

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 6 -
Channel: 1
DHCP: OFF
IP address: 169.254.1.1
etmask: 255.255.0.0
With the adhoc jumper in place the above settings override the current saved configuration settings.
From your computer, connect to the WiFly-GSX-XX network. This is an open network which does
not require a pass phrase or pass key. ote: currently the WiFly only supports OPE mode for
creating adhoc networks.
OTE: It may take a couple of minutes for Auto IP in Windows to assign an IP address and connect
to the network. You can check IP address of your Windows computer by running the ipconfig
command in the command window. If connected, this command will show you the IP address and net
mask for your computer.
The IP address assigned by Auto IP must be on the subnet 169.254.1.X otherwise the WiFly GSX
module will not be accessible.
OTE: If your machine has both a wireless and wired interface hardware you will need to disable the
wired LA interface hardware before connecting to the adhoc network. If the wired LA is enabled
the computer will assign an IP address that is not on the same subnet as the WiFly module.
Once connected and you have a good IP address, telnet into the WiFly module on port 2000
telnet 169.254.1.1 2000
You should see the response “*HELLO*”
You can now enter command mode and configure the module.

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 7 -
4Wi ly Command Reference
4.1 Command Syntax
Commands begin with a keyword, and have optional additional parameters, generally space
delimited. Commands and options are case sensitive. Hex input data can be upper or lower case.
String text data, such as SSID is also case sensitive.
The first command is fully decoded and must be complete. Other command parameters can be
shorted by using only the first character.
For example,
set uart baudrate 115200 is valid,
set uart b 115200 is also valid,
set u b 115200 is also valid, however,
s uart baudrate 115200 is OT valid.
umbers can be entered as either decimal, (like 115200 above) or HEX. To enter HEX, use
0x<value>. For example, the HEX value FF would be entered as 0xFF.
4.2 Command Organization
Commands fall into 5 general categories:
SET COMMANDS -Take effect immediately, permanently (save command issued).
GET COMMANDS -Retrieve the permanently stored information for display to user.
STATUS COMMANDS -See what is going on with the interface, IP status, etc.
ACTION COMMANDS- Perform action such as scan, connect, disconnect, etc.
ILE IO COMMANDS - Upgrade, load and save configuration, delete files, etc.
OTE: You must save any changes made or the module will load the previous settings upon reboot
or power up.
When the system boots, all configuration data is loaded into RAM variables from the file called
“config”. The set commands actually only modify the RAM copy of variables in the system. In
general, the IP, WLA and UART settings need a save and reboot to take effect, since they operate
at boot up time. For example you only associate, set the channel and get your ip address once at
power up.
Most of the other commands take effect immediately like the COMM settings and timers. This allows
temporary change of parameters “on the fly” to test features, minimizes power usage and saves on
flash re-write cycles.
Once all configuration is complete, the user must save the settings using the save command to store
the configuration data, otherwise it will not take effect upon reboot or reset. Multiple configurations
can be stored by using the save <filename> command, and these configurations can be loaded
using the load <filename> command.

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 8 -
5SET Commands
These commands begin with “set”. There are 6 major categories.
ADHOC - controls the adhoc parameters
BROADCAST - controls the broadcast hello/heartbeat UDP message
COMM - communication and data transfer, timers, matching characters
DNS - D S host and domain
TP - FTP host address and login information
IP - IP settings
OPTION - optional and not frequently used parameters
SYS - system settings such as sleep and wake timers
TIME - timer server settings
UART - serial port settings such as baudrate and parity
WLAN - wireless interface settings, such as ssid, chan, and security options
5.1 ADHOC Parameters
set adhoc beacon <ms> sets the adhoc beacon interval in miliseconds. Default is 100.
set adhoc probe <num> sets the adhoc probe retry count. Default is 5. This is the number of
consecutive probe responses that can be lost before declaring
“ADHOC is lost” and disabling the network interface.
5.2 BROADCAST Parameters
set broadcast address <addr> sets the address to which the UDP hello/heartbeat message is
sent. The default address is 255.255.255.255
set broadcast interval <value> sets the interval at which the hello/heartbeat UDP message is
sent. Interval is specified in seconds. The value is a mask that is
compared to a free running seconds counter. For example if interval
= 0x7, a packet will be sent every 8 seconds. The minimum interval
value is 0x01 (every 2 seconds) and max value is 0xff (every 256
seconds). Setting the value to zero turns off the UDP broadcast. The
default interval is 7.
set broadcast port <port> sets the port number to which the UDP hello/heartbeat message is
sent. The default port is 55555.
5.3 COMM Parameters
set comm close <string> sets the ASCI string that is sent to the local UART when the TCP port
is closed. If no string is desired, use 0 as the <string> parameter.
Max string length is 32 characters. Default is *CLOS*
set comm open <string> sets the string that is sent to the local UART when the TCP port is
opened. If no string is desired, use 0 as the <string> parameter.
Max string length is 32 characters. Default is *OPE *
set comm remote <string> sets the string that is sent to the remote TCP client when the TCP
port is opened. If no string is desired, use 0 as the <string>
parameter. Max string length is 32 characters. Default is *HELLO*

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 9 -
set comm idle <secs> sets the Idle Timer Value. This is the number of seconds with no
transmit or receive data before the connection is closed
automatically. Default is 0, never disconnect on idle.
set comm match <value> sets matching character initiate forwarding data across the TCP/IP
connection. The value is entered as the decimal value of the of the
ASCII character. Default is 0, disabled. For more information see
section 10.4.
set comm size <value> sets the Flush Size value. This is the number of bytes to receive on
the UART before forwarding. 0 disables forwarding based on byte
count. Default is 64 bytes (at 9600). Maximum value = 1420 bytes.
NOTE: This value is set auto atically when the baudrate is set, in
an atte pt to opti ize the link. It is assu ed that higher baudrates
suggest larger buffer sizes and hence the size will increase at higher
baudrate settings.
set comm time <num> sets the Flush Timer. This is the number of 1 millisecond intervals
after the last UART byte is received before the data is sent over Wifi.
1 is the minimum value. Default is 10 (10 milliseconds). Setting this
value to 0 will disable forwarding based on time delay.
5.4 DNS Parameters
set dns address <addr> sets the IP address of the D S sever. This is auto-set when using
DHCP, and needs to be set in STATIC IP or Auto-IP modes.
set dns name <string> sets the name of the host for TCP/IP connections.
set dns backup <string> sets the name of the backup host for TCP/IP connections.
5.5 TP Parameters
set ftp filename <file> sets the name of the file transferred when issuing the “ftp u” or “ftp
g” commands.
set ftp addr <addr> sets the ftp server IP address.
set ftp remote <port> sets the ftp server remote port number (default is 21).
set ftp user <name> sets the ftp user name for accessing the FTP server.
set ftp pass <pass> sets the ftp password for accessing the FTP server.
5.6 IP Parameters
set ip address <addr> sets the IP address of the WiFly GSX module. If DHCP is turned on,
the IP address is assigned and overwritten during association with
the access point. IP addresses are “.” delimited. ote this is
different from the R -111b module which is space delimited!
Example: “set ip a 10.20.20.1”

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 10 -
set ip backup <addr> sets a secondary host IP address.
set ip dchp <value> enable/disable DHCP mode. If enabled, the IP address, gateway,
netmask, and D S server are requested and set upon association
with access point. Any current IP values are overwritten.
DHCP Cache mode can reduce the time it takes the module to wake
from deep sleep thus saving power. In cache mode, the lease time
is checked and if not expired the module uses the previous IP
settings. If the lease has expired the module will attempt to
associated and use DHCP to get the IP settings. DHCP cached IP
address does not survive a power cycle or reset.
Mode Protocol
0 DHCP OFF, use stored static IP address
1 DHCP O , get IP address and gateway from AP
2 Auto-IP, generally used with Adhoc networks
3 DHCP cache mode, Uses previous IP address if
lease is not expired (lease survives reboot)
4 Reserved for future use
set ip flags <value> Set IP related advanced functions. Value is a bit mapped flag
register. Default = 0x7.
Bit unction
0 TCP stack copies RX buffer before sending
1 Bypass agle algorithm and use TCP_ ODELAY
2 TCP application level single retry enabled
3 RETRY multi - retries 4 times
4 D S host address caching enabled
5
ARP table
caching enabled
6 Reserved
7-31 Reserved
set ip gateway <addr> sets the gateway IP address, If DHCP is turned on, the gateway IP
address is assign and overwritten during association with the access
point.
set ip host <addr> sets the remote host IP address. This command is used for making
connections from the WiFly module to a TCP/IP server at the IP
address <addr>.
set ip localport <num> sets the local port number.
set ip netmask <value> sets the network mask. If DHCP is turned on, the net mask is assign
and overwritten during association with the access point.
set ip protocol <value> sets the IP protocol. Value is a bit mapped setting. To connect to the
WiFly GSX module over TCP/IP such as Telnet the device must have
the use the TCP Server protocol / bit 2 set. To accept both TCP and
UDP use value = 3 (bit 1 and bit 2 set)

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 11 -
Bit Position Protocol
0 UDP
1 TCP Server & Client (Default)
2
Secure (only receive packets with IP address
matches the
store host IP)
3 TCP Client only
4 Future Use
set ip remote <value> sets the remote host port number.
5.7 OPTIONAL Parameters
set opt jointmr <msecs> Join timer is the time in milliseconds (default=1000) the join function
will wait for the an access point to complete the association process.
This timer is also the timeout for the WPA handshaking process.
set opt replace <char> replacement character for spaces. The replacement character is
used when entering SSID and pass phrases that include space. This
is used by the WiFly GSX command parser only. Each occurrence of
the replacement character is changed into a space. The default is
“$” (0x24)
set opt deviceid <string> Configurable Device ID - can be used for storing serial numbers,
product name or other device information. This information is sent
as part of the broadcast hello packet that is sent as a UDP. The
current value can be shown with the “get option” or “show deviceid”
commands. Max string size is 32 bytes. The default is “WiFly-GSX”.
set opt password <string> TCP connection password. Used to challenge the remote device to
authenticate the connection. When set all incoming connections will
be challenged and the first characters sent must match the stored
password or the connection will be closed. When the password is set
the WiFly module will send the string “PASS?” to the remote
connection. All characters in the string must be sent in one TCP
packet. Max string size is 32 bytes. To disable the password feature
use string=0 which is the default.
5.8 SYSTEM Parameters
set sys autoconn <secs> TCP mode: sets the auto connect timer. This command causes the
module periodically connect to the host. The timer <secs>
determines how often to connect to the stored remote host. If set to
1, the module will only make one attempt to auto connect upon
power up. If set to 2 or greater auto connect will re-open the
connection after the connection is closed. Default=0 disables.
set sys autosleep <num> Sets the auto-sleep timer. 0 disables. If the protocol is set to UDP
O LY, this timer is used as a quick sleep function. Device will sleep
<num> ms after transmission of the first UDP packet.

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 12 -
set sys iofunc <value> sets the IO port alternate functions. Bit-mapped value. For more
details see section 10.5
set sys mask <mask> sets the IO port direction mask. Bit-mapped value. For more
information see section 10.5
set sys printlvl <value> sets numerous print functions. 0 = quiet 1 = connect information
Default is 1.
set sys output <value> <mask> sets output PIO pins to HIGH or LOW. Bit-mapped value.
Optional mask only sets a subset of pins.
set sys sleep <secs> sets the sleep timer. 0 disables.
OTE: If not using Sensor pins to wake the module, be sure to set
the wake timer before issuing the sleep timer or the module will not
wake up.
See section 10.1 for more details on using system timers
set sys trigger <value> sets the sensor input(s) to wake on (0-3). Bit-mapped value. 0
disables.
set sys wake <secs> sets the auto wake timer. 0 disables. See section 10.1 for more
details on using system timers
5.9 TIME Server Parameters
set time address <addr> sets the time server address. (s TP servers)
set time port <num> sets the time server port number. Defaults to 123 which is almost
always the s TP server port.
set time enable <value> Enable or disable fetching time from the specified s TP time server.
Default=0= disabled. A value or 1 gets time only once on power up.
Any value > 1 gets time continuously every <value> minutes.
5.10 UART Parameters
set uart baud <rate> set the UART baud rate. Valid settings are {2400, 4800, 9600,
19200, 38400, 57600, 115200, 230400, 460800, 921600}.
Example : “set u b 9600” sets the baud rate to 9600 baud.
OTE: the RS232 interface on the R -134 does not work above
230400
set uart instant <rate> This immediately changes the baudrate. This is useful when testing
baudrate settings, or switching baudrate “on the fly” remotely while
connected over TCP. This setting does not affect configuration.

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 13 -
Returns the AOK response, and then this command will exit
command mode.
set uart raw <rate> sets a RAW UART value. Used to set non-standard rates. The lowest
possible baud rate is 2400.
Example : “set u r 7200” sets the baud rate to 7200 baud.
set uart flow <0,1> sets the flow control mode. Default=0=off, 1= hardware RTS/CTS.
NOTE: once flow control is enabled, it is important to properly
Drive the CTS pin (active LOW enabled) If CTS is HIGH, data
will OT be sent out the UART, and further configuration in
command mode will be problematic as no response will be received.
set uart mode <value> sets the UART mode register. This is a bit-mapped value.
Bit Position Function
0 OECHO - disables echo of RX data while in
command mode
1 Reserved for future RAW mode protocol
2 Reserved for future Multipoint protocol
3 Enable Sleep on RX BREAK signal
set uart tx <0, 1> Disables or enables the TX pin= PIO10 of the UART. Disable will set
PIO10 to an I PUT with weak pulldown.
NOTE: Due to an issue in the UART hardware, the UART does not support even or odd
parity.
5.11 WLAN Parameters
set wlan auth <value> Sets the authentication mode. ot needed unless using auto join
mode 2. i.e. set wlan oin 2
ote: During association the WiFly module interrogates the Access
Point and automatically selects the authentication mode.
The current release of Wifly firmware supports these security modes:
• WEP-128 (open mode only, OT shared mode)
• WPA2-PSK (AES only)
• WPA1-PSK (TKIP only)
• WPA-PSK mixed mode (some APs, not all are supported)
Value Authentication Mode
0
Open
(Default)
1 WEP-128
2 WPA1
3 Mixed WPA1 & WPA2-PSK
4 WPA2-PSK
5 ot Used
6 Adhoc, Join any Adhoc network

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 14 -
set wlan channel <value> sets the wlan channel, 1-13 is the valid range for a fixed channel.
If 0 is set, then scan is performed, using the ssid, for all the channels
set in the channel mask.
set wlan ext_antenna <0, 1> determines which antenna is active, use 0 for chip antenna, 1 for
UF.L connector. Default = 0. Only one antenna is active at a time
and the module must be power cycled after switching the antenna.
set wlan join <value> sets the policy for automatically joining/associating with network
access points. This policy is used when the module powers up,
including wake up from the sleep timer.
Value Policy
0 Manual, do not try to join automatically
1 Try to join the access point that matches the
stored SSID, passkey and channel. Channel can
be set to 0 for scanning. (Default)
2 Join A Y access point with security matching the
stored authentication mode. This ignores the
stored SSID and searches for the access point
with the strongest signal. The channels searched
can be limited by setting the channel mask.
3 Reserved – ot used
4 Create an Adhoc network, using stored SSID, IP
address and netmask. Channel MUST be set.
DHCP should be 0 (static IP) or set to Auto-IP
with this policy. (unless another Adhoc device
can act as DHCP server)
This policy is often used instead of the hardware
jumper to creat a custom Adhoc network
set wlan hide <0, 1> Hides the WEP key and WPA passphrase. When set, displaying the
wlan settings shows ****** for these fields. To unhide the
passphrase or passkey, re-enter the key or passphrase using the set
wlan key or set wlan passphrase command. Default = 0, don’t hide.
wlan key <value> sets the 128 bit WEP key. If you are using WPA or WPA2 you should
enter a pass phrase with the set wlan passphase command. Key
must be EXACTLY 13 bytes (26 ASCII chars). Data is expected in
HEX format, “0x” should OT be used here.
Example : “set w k 112233445566778899AABBCCDD”
Hex digits > 9 can be either upper or lower case.
The Wifly GSX only supports “open” key mode, 128 bit keys for WEP.
WEP-128, shared mode is not supported as it is known to be easily
compromised and has been deprecated from the WiFi standards.

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 15 -
set wlan linkmon <value> sets the link monitor timeout threshold. If set to 1 or more, WiFly
will scan once per second for the AP it is associated with. The value
is the threshold of failed scans before the WiFly declares “AP is Lost”,
de-authenticates. The WiFly will retry the association based on the
join policy variable. A value of 5 is recommended, as some APs will
not always respond to probes. Default is 0 (disabled). Without this
feature, there is no way to detect an AP is no longer present until it
becomes available again (if ever).
set wlan mask <value> sets the wlan channel mask used for scanning channels with the
auto-join policy 1 or 2, used when the channel is set to 0. Value is a
bit-map where bit 0 = channel 1. Input for this command can be
entered in decimal or hex if prefixed with 0x. Default value is
0x1FFF (all channels)
set wlan num <value> sets the default WEP key to use. 1-4 is the valid range.
Example : “set w n 2” sets the default key to 2.
set wlan phrase <string> sets the passphrase for WPA and WPA2 security modes. 1-64 chars.
The passphrase can be alpha and numeric, and is used along with
the SSID to generate a unique 32 byte Pre-shared key (PSK), which
is then hashed into a 256 bit number. Changing either the SSID or
this value re-calculates and stores the PSK.
If exactly 64 chars are entered, it is assumed that this entry is
already an ASCII HEX representation of the 32 byte PSK and the
value is simply stored.
For passphrases that contain spaces use the replacement character $
instead of spaces. For example “my pass word” would be entered
“my$pass$word”. The replacement character can be changed using
the optional command set opt replace <char>.
Example : “set w p password” sets the phrase.
set wlan rate <value> sets the wireless data rate. Lowering the rate increases the effective
range of the WiFly-GSX module. The value entered is mapped
according to the following table
Value Wireless Data Rate
0 1 Mbit/sec
1 2 Mbit/sec
2 5.5 Mbit/sec
3 11 Mbit/sec
4 - 7 Invalid
8 6 Mbit/sec
9 9 Mbit/sec
10 12 Mbit/sec
11 18 Mbit/sec
12 24 Mbit/sec (default)
13 36 Mbit/sec

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 16 -
14 48 Mbit/sec
15 54 Mbit/sec
set wlan ssid <string> sets the wlan ssid to associate with. 1-32 chars.
OTE: If the passphrase or ssid contain the SPACE ( ‘ ‘)
characters, these can be entered using substitution via the “$”
character.
For example, if the ssid of the AP is “yellow brick road”
You would enter “yellow$brick$road”
Using the ‘get w” command will properly display the value:
SSID=yellow brick road.
set wlan window <value> sets the IP maximum buffer window size. Default is 1460 bytes.
6GET Commands
These commands begin with “get”. They display the current values.
get adhoc display all adhoc settings.
get broadcast will display the broadcast UPD address, port and interval
get everything displays all configuration settings, useful for debug.
get com display comm. settings.
get dns display D S settings.
get ftp display FTP settings.
get ip display IP address and port number settings.
get mac display the device MAC address.
get optional display the optional settings like device ID
get sys display system settings, sleep, wake timers, etc.
get time display the time server UDP address and port number.
get wlan display the ssid, chan, and other wlan settings.
get uart display the UART settings.
ver return the software release version

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 17 -
7STATUS Commands
These commands begin with “show”, and they return the current values of variables in the system.
In some cases, for example IP addresses, the current values are received from the network, and
may not match the stored values.
show battery Displays current battery voltage, (only valid for Roving battery powered product like
the R -370 and temperature sensors)
show connection Displays connection status in this HEX format: 8XYZ
Bit
location
13-16 9-12 7 6 5 4 0-3
Function fixed channel D S found D S server Authen Assoc TCP status
Value 8 1-13 1=resolved 1=
contacted
1= OK 1=OK 0= Idle,
1=Connected
3= OIP
4= Connecting
show io Displays IO pin levels status in this HEX format: 8ABC
Example: show i returns 8103 indicates pins 0, 1 and 9 high level.
show net Displays current network status, association, authentication, etc.
show rssi Displays current last received signal strength.
show stats Displays current statistics, packet rx/tx counters, etc.
show time Displays number of seconds since last powerup or reboot
show q <0-7> Display the value of the an analog interface pin from 0 to 7. The value returned will
be in the format 8xxxxx where xxxxx is voltage in microvolts sampled on the
channel you request with the 8 in front as a start marker.
show q 0x1<mask> Displays multiple analog interface values at once. The channels displayed is
controlled by a bit mask which is proceeded by a 0x1xx where xx mask is the bit
mask of the channels. For example, to read channels 0,1, and 7, send:
show q 0x183
Which returns 8<chan0>, 8<chan1>, 8<chan7>, \r\n

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 18 -
8 ACTION Commands
$$$ enter command mode Characters are PASSED until this exact
sequence is seen. If any bytes are seen before these chars, or after
these chars, in a 250ms window, command mode will not be
entered and these bytes will be passed on to other side.
close disconnect a TCP connection.
exit exit command mode. Exit command mode. “EXIT” will be displayed.
factory RESET Loads factory defaults into the RAM configuration. Note that the
RESET must be capitalized. After this command the new settings
must be save to the config file using the save command and the
module rebooted for them to take effect.
join <ssid> joins the network <ssid>. If network is security enabled you must
set the pass phrase with the set wlan phrase command prior to
issuing the oin command
join # <num> join a network from the scan list. <num> is the entry number in the
scan list that is returned from the scan command. If network is
security enabled you must set the pass phrase with the set wlan
phrase command prior to issuing the oin command
leave disconnects from currently associated Access Point.
open <addr> <port> opens a TCP connection to the given IP port and address. If no
arguments are provided, the device will attempt to connect to the
stored remote host IP address and remote port number. <addr>
can also be a D S hostname and will be resolved if entered.
Ping <g | h | i | addr> <num> ping remote host. Default sends 1 packet. Optional <num> sends
<num> pings at 10 per second.
Ping 10.20.20.12 10 – pings IP address 10 times
ping g pings the gateway, the gateway IP address is loaded if DHCP is
turned on, otherwise it should be set with the set ip gateway
<addr> command
ping h pings the stored host IP address, the host IP address can be set with
the set ip host <addr> command
ping i pings a known Internet server at www.neelum.com by first
resolving the URL (proves that D S is working and proves the device
has internet connectivity).
ping 0 terminates a ping command
reboot forces a reboot of the device (similar to power cycle)

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 19 -
scan <time> Performs an active probe scan of access points on all 13 channels.
Returns MAC address, signal strength, SSID name, security mode.
Default scan time is 200ms / channel = about 3 seconds.
time is an optional parameter, this is the time in ms per channel.
For example, “scan 30” reduces the total scan time down to about
1 second. This command also works in Adhoc mode (version 2.11).
time Sets the Real time clock by synchronizing with the time server
specified with the time server parameters (see section 5.9) This
command sends a UDP time server request packet.
9 ILE IO Commands
del <name> <num> Deletes a file. Optional <num> will override the name and use the
sector number shown in the “ls” command.
load <name> Reads in a new config file.
ls Displays the files in the system
save Saves the configuration to “config” (the default file).
save <name> Saves the configuration data to a new file name
boot image <num> Makes file <num> the new boot image.
ftp get <name> Retrieves a file from the remote FTP server. If <name> not
specified, the stored ftp filename is used.
ftp update <name> Deletes the backup image, retrieves new image and updates the
boot image.

WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 20 -
10 Advanced eatures and Settings
10.1 System Timers and Auto Connect Timers
There are 2 timers that can be used to put the module to sleep, and perform a wake up.
If the sleep timer is enabled, the module will automatically go into deep sleep, low power mode once
the timer counts down to 0. The sleep timer is disabled if the module has an IP connection, or the
module is in COMMA D mode. The timer is reset when characters are received on the UART.
The sleep timer is set with : set sys sleep <time> time=decimal in seconds.
The wake timer will bring the module out of deep sleep.
The wake timer is set with: set sys wake <time> time=decimal in seconds.
For example, if you wanted the module to wake up, join a network and be available to accept TCP
connections for 30 seconds every 2 minutes you would set the timers as such
set wlan ssid my_net
set wlan passphrase my_pass
set sys sleep 30
set sys wake 90
save
reboot
UDP sleep, and Connection timers
There is another timer than can be used to put the device to sleep.
In UDP protocol mode, the autoconn timer is used as an auto-sleep timer.
Upon the start of transmission of the first UDP data packet this timer will count down.
set sys autosleep <value> UDP mode: sets the auto-sleep timer. 0 disables
the timer is decremented every xx milliseconds, based on the value of the comm flushtimer. Using a
minimum value of 2 (when the default flushtime=10 ms) is recommended to ensure
that the UDP packet gets transmitted. For larger packets the value should be increased.
In TCP-Client mode, the auto-conn timer is used as a connect out timer. If set, the device will
automatically attempt a connection when the timer expires.
set sys autoconn <secs>
In TCP-Client A D TCP-Server mode, there is also a disconnect timer.
set comm idle <secs> sets the idle disconnect timer. This causes a disconnect if no transmit or
receive data is seen.
Table of contents
Other Roving Networks Computer Hardware manuals