Microchip Technology RN1723 2.4 GHz IEEE Std. 802.11 b/g Wireless LAN Module User Manual WiFly RN171 1 0 0 um

Microchip Technology Inc 2.4 GHz IEEE Std. 802.11 b/g Wireless LAN Module WiFly RN171 1 0 0 um

Users Manual

Download: Microchip Technology RN1723 2.4 GHz IEEE Std. 802.11 b/g Wireless LAN Module User Manual WiFly RN171 1 0 0 um
Mirror Download [FCC.gov]Microchip Technology RN1723 2.4 GHz IEEE Std. 802.11 b/g Wireless LAN Module User Manual WiFly RN171 1 0 0 um
Document ID2597285
Application ID0V6YyhicZXx2AH+55CTtaA==
Document DescriptionUsers Manual
Short Term ConfidentialNo
Permanent ConfidentialNo
SupercedeNo
Document TypeUser Manual
Display FormatAdobe Acrobat PDF - pdf
Filesize64.2kB (802542 bits)
Date Submitted2015-04-27 00:00:00
Date Available2015-04-27 00:00:00
Creation Date2011-02-23 11:42:17
Producing SoftwareAcrobat Distiller 7.0 (Windows)
Document Lastmod2015-04-27 10:40:33
Document TitleMicrosoft Word - WiFly RN171 1.0.0 um.doc
Document CreatorPScript5.dll Version 5.2.2
Document Author: TEST

WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
WIFLY RN171
802.11 b/g wireless LAN Modules
User Manual and Command Reference
Version 1.0.0
January 16th, 2011
Copyright © 2011 Roving Networks, 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 Networks is not responsible under any
circumstances for direct, indirect, unexpected or consequent damage that is caused by this document.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~1~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
Overview............................................................................................................................................................ 4
Hardware Interface............................................................................................................................................ 6
2.1.
Power ................................................................................................................................................6
2.2.
Reset..................................................................................................................................................6
2.3.
UART................................................................................................................................................6
2.4.
Status Indictors..................................................................................................................................7
3. Configuration..................................................................................................................................................... 7
3.1.
Entering Command Mode.................................................................................................................7
4. WiFly Command Reference........................................................................................................................... 10
4.1.
Command Syntax............................................................................................................................10
4.2.
Command Organization ..................................................................................................................10
5. SET Commands............................................................................................................................................... 11
5.1.
Adhoc Parameters ...........................................................................................................................11
5.2.
Broadcast Parameters......................................................................................................................11
5.3.
COMM Parameters .........................................................................................................................12
5.4.
DNS Parameters..............................................................................................................................13
5.5.
FTP Parameters...............................................................................................................................13
5.6.
IP Parameters ..................................................................................................................................14
5.7.
Optional Parameters........................................................................................................................16
5.8.
SystemParameters ...........................................................................................................................16
5.9.
Time Server Parameters..................................................................................................................17
5.10. UART Parameters...........................................................................................................................18
5.11. WLAN Parameters..........................................................................................................................19
5.12. Sensor Parameters...........................................................................................................................22
6. Get Commands ................................................................................................................................................ 23
7. Status Commands............................................................................................................................................ 24
8. Action Commands........................................................................................................................................... 25
9. File IO Commands .......................................................................................................................................... 26
10.
Advanced features and Settings................................................................................................................. 27
10.1. System Timers and Auto Connect Timers ......................................................................................28
10.2. Wake on Sensor Input.....................................................................................................................31
10.3. Wake on UART ..............................................................................................................................31
10.5. Setting GPIO direction, Alternate Functions and Disabling LEDs ................................................33
10.6. Setting Debug Print levels ..............................................................................................................36
10.7. Using the Real Time Clock Function..............................................................................................36
10.8. Time Stamping Packets...................................................................................................................37
11.
Sending data using UDP .................................................................................................................38
11.1. Overview.........................................................................................................................................38
11.2. UDP Auto Pairing ...........................................................................................................................39
11.3. UDP Retry.......................................................................................................................................39
11.4. Using the UDP Broadcast function.................................................................................................39
12.
Joining Networks and Making Connections ............................................................................................ 41
1.
2.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~2~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
12.1. Associate with a network access point............................................................................................41
12.2. Making Connections .......................................................................................................................42
12.3. Setting up Automatic Connections .................................................................................................42
12.4. Controlling Connections using PIO5 and PIO6..............................................................................43
12.5. Using DNS settings.........................................................................................................................43
12.6. Utilizing the Backup IP address/connect function..........................................................................44
13.
Using HTML client feature........................................................................................................................ 45
13.1. Built-in HTML Client Modes .........................................................................................................45
13.2. Automatically periodicallyconnect to web server...........................................................................46
13.3. Automatically connect to web server on uart data..........................................................................46
13.4. Posting binary data:.........................................................................................................................47
13.5. Auto posting sensor data:................................................................................................................48
13.6. Examples using the HTML client ...................................................................................................48
14.
Firmware Upgrade over FTP ..................................................................................................................... 51
14.1. FTP Upload and Upgrade ...............................................................................................................51
15.
Adhoc Networking Mode........................................................................................................................... 53
15.1. Infrastructure and adhoc comparison..............................................................................................53
15.2. Configuring adhoc mode.................................................................................................................53
16.
Analog Sensor Capability .......................................................................................................................... 56
16.1. Automatic sampling of sensor pins:................................................................................................57
16.2. Using the Built In Sensor Power.....................................................................................................57
17.
Default Configuration Settings.................................................................................................................. 59
17.1. Restoring Default configuration settings: .......................................................................................60
18.
Boot-up Timing Values............................................................................................................................... 61
19.
Supported Access Points ............................................................................................................................ 62
20.
Release Notes .............................................................................................................................................. 63
20.1. Known problems.............................................................................................................................63
20.2. Current Firmware features and fixes...............................................................................................63
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~3~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
1. Overview
The “WiFly” radio module is a complete stand alone embedded wireless LAN access device. The device
has on board TCP/IP stack and applications. Requiring only 4 pins (POWER, TX, RX, GND) 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 Wi-Fi 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
Features
•
•
•
•
•
•
•
•
Host Data Rate up to 1 Mbps for UART, 4Mbps SPI
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.3VDC 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).
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~4~
WiFly GSX
www.rovingnetworks.com
•
•
WiFlyRN171-um
2/23/2011
Built in networking applications DHCP client, UDP, DNS client , ARP, ICMP ping, FTP, TELNET,
HTTP
802.11 power save and roaming functions
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~5~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
2. Hardware Interface
See the specific module data sheets on the Roving Networks website for hardware specifications, and layout
information.
2.1. Power
There are two options for powering the RN-131G module directly.
DC SUPPLY:
Apply 3.3 VDC power to VBATT (pin 20), and V3.3IN (pin 21).
Tie 3.3VREG-IN (pin 18) to GROUND.
Leave 3.3V-REG-OUT (Pin 17) floating/no connect.
BATTERY:
Apply battery = 2.0 to 3.3VDC to VBATT (pin 20).
LeaveV3.3IN pin 21 floating/no connect.
Tie pin 17 to pin 18. (This enables the on board battery boost 3.3V switcher).
There is a built-in brownout monitor which will shut down the chip when the voltage drops below 2.0 VDC.
WARNING: Do NOT exceed the voltage ratings damage to the module will result.
#1: The Sensor inputs SENS0-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 GND 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)
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~6~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
Factory default is hardware flow control disabled; CTS and RTS are not required.
PIO’s are not 5.0 VDC tolerant. If using a 5.0 VDC circuit, input, PIO and UART input pins require a
resistor divider. A suggestion is to use a 10Kresistor in series with 20k resistor to ground.
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.
Condition
ON solid
Fast blink
Slow blink
OFF
PIO6=Red LED
Not Associated
PIO5=Yellow LED
PIO4=Green LED
Connected over TCP
Rx/Tx data transfer
No IP address
IP address OK
Associated
3. Configuration
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. 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 RN-131g connects, for
example: the default is 9600 baudrate, 8 bits, No Parity, 1 stop bit, and hardware flow control disabled.
Use TeraTerm as your terminal emulator. Please DO NOT use HyperTerminal as it is known to have issues
with our products.TeraTerm can be downloaded from our
website: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“.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~7~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
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.
NOTE: When the WiFly GSX module is powered up, it tries to auto associate to the Access Point stored in
the config settings. If for some reason the module cannot find the Access Point, it goes into auto association
mode and gets busy scanning and trying to join a network. This may cause the UART to become
unresponsive for a brief amount of time and you may lose the data sent to the module while the module is in
this “not associated” state making it difficult to get into command mode and configure the module
Version 2.21 of the firmware fixes this issue. The auto-join feature is disabled when in command mode.
This makes it easy to configure the module. Auto-join will re-enable when you exit out of command mode.
The auto join feature can be disabled by setting the set wlan join 0. This will prevent the WiFly GSX
module to attempt to associate to a network that does not exist.
Another alternative is to boot the module in adhoc mode by using the PIO9 adhoc/factory reset jumper. If
this is high on power up, the module will not associate to any network; it will use the temporary adhoc
mode. When in adhoc mode, you can configure the network settings.
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 RN-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
Channel:
DHCP:
OFF
IP address:
169.254.1.1
Netmask:
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. Note: currently the WiFly only supports OPEN mode for creating adhoc
networks.
NOTE: 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.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~8~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
The IP address assigned by Auto IP must be on the subnet 169.254.x.y otherwise the WiFly GSX module
will not be accessible.
NOTE: If your machine has both wireless and wired interface hardware you will need to disable the wired
LAN interface hardware before connecting to the adhoc network. If the wired LAN is enabled,
thecomputermayassignan IP addressthatisnotonthesamesubnet 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.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~9~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
4. WiFly 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,
setuartbaudrate 115200 is valid,
setuart b 115200
set u b 115200
is also valid,
is also valid, however,
s uartbaudrate 115200 isNOT valid.
Numbers can be entered as either decimal, (like 115200 above) or HEX. To enter HEX, use 0x.
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.
FILE IO COMMANDS
Upgrade, load and save configuration, delete files, etc.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 10 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
NOTE: 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,
WLAN 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 rewrite 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  command, and these configurations can be loaded using the load
 command.
5. SET Commands
These commands begin with “set”. There are 6 major categories.
Adhoc
Broadcast
COMM
DNS
FTP
IP
Option
Sys
Time
UART
WLAN
controls the adhoc parameters
controls the broadcast hello/heartbeat UDP message
communication and data transfer, timers, matching characters
DNS host and domain
FTP host address and login information
IP settings
optional and not frequently used parameters
system settings such as sleep and wake timers
timer server settings
serial port settings such as baudrate and parity
wireless interface settings, such as ssid, chan, and security options
5.1. Adhoc Parameters
set adhoc beacon 
sets the adhoc beacon interval in milliseconds. Default is 100.
set adhoc probe 
sets the adhoc probe timeout in seconds. Default is 60. This is the number
of seconds waiting for probe responses before declaring “ADHOC is lost”
and disabling the network interface.
5.2. Broadcast Parameters
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 11 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
set broadcast address  sets the address to which the UDP hello/heartbeat message is sent. The
default address is 255.255.255.255
set broadcast interval  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 1 (every 2
seconds) and max value is 0xff (every 256 seconds). Setting the interval
value to zero disables sending UDP broadcast messages. The default
interval is 7.
set broadcast port 
sets the port number to which the UDP hello/heartbeat message is sent.
The default port is 55555.
5.3. COMM Parameters
setcomm $ 
sets character used to enter command mode. Typically used when “$$$” is
a possible data string. Default is ‘$’. Care should be taken when setting
this to note the new character as once this setting is saved every
subsequent reboot will ignore “$$$” and look for “”.
setcomm close 
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  parameter. Max string
length is 32 characters. Default is *CLOS*
setcomm open 
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  parameter. Max string length
is 32 characters. Default is *OPEN*
setcomm remote 
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  parameter. Max string
length is 32 characters. Default is *HELLO*
setcomm idle 
sets the Idle Timer Value. This is the number of seconds with no transmit
orreceive data before the connection is closed automatically. Default is 0,
never disconnect on idle.
setcomm match 
sets match character. An IP packet will be sent each time the match
character appears in the data. Value is entered as the decimal (13) or hex
(0xd) of the of the ASCII character. Default is 0, disabled. The match
character is one of three ways to control TCP/IP packet forwarding. The
others are size and timer. For more information see section 10.1 on
System Timers and Auto Connect Timers and section 10.4 on UART
Receiver.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 12 ~
WiFly GSX
www.rovingnetworks.com
setcomm size 
WiFlyRN171-um
2/23/2011
sets the flush size. An IP packet will be sent each time “value” bytes are
received. Default is 64 bytes. You should set this value to the largest
possible setting to maximize TCP/IP performance. Maximum value =
1420 (at 9600) bytes.
NOTE: This value is set automatically when the baudrate is set, in an
attempt to optimize the link. It is assumed that higher baudrates equates
to more data and hence the flush size is increased.
Flush size is one of three ways to control TCP/IP packet forwarding. The
others are match character and timer. For more information see section
10.4 on UART Receiver.
setcomm time 
sets the flush timer. An IP packet will be sent if no additional bytes are
received for “num” milliseconds. Num is one milliseconds interval. 1 is
the minimum value. Default is 10 (10 milliseconds). Setting this value to 0
will disable forwarding based on the flush timer.
Flush timer is one of three ways to control TCP/IP packet forwarding.
The others are match character and size. For more information see section
10.1 on System Timers and Auto Connect Timers
5.4. DNS Parameters
setdns address 
sets the IP address of the DNS sever. This is auto-set when using DHCP,
and needs to be set in STATIC IP or Auto-IP modes.
setdns name 
sets the name of the host for TCP/IP connections.
setdns backup 
sets the name of the backup host for TCP/IP connections.
5.5. FTP Parameters
set ftp filename 
sets the name of the file transferred when issuing the “ftp u” or “ftp g”
commands.
set ftp addr
sets the ftp server IP address.
set ftp remote 
sets the ftp server remote port number (default is 21).
set ftp user 
sets the ftp user name for accessing the FTP server.
set ftp pass 
sets the ftp password for accessing the FTP server.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 13 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
5.6. IP Parameters
setip address 
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. Note this is different from the RN111b module which is space delimited!
Example: “set ip a 10.20.20.1”
setip backup 
sets a secondary host IP address. If the primary host IP is not reachable
the module will try the secondary IP address if set.
setipdchp
enable/disable DHCP mode. If enabled, the IP address, gateway, netmask,
and DNS 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
DHCP OFF, use stored static IP address
DHCP ON, get IP address and gateway from AP
Auto-IP, generally used with Adhoc networks
DHCP cache mode, Uses previous IP address if
lease is not expired (lease survives reboot)
Reserved for future use
setip flags 
Bit
Set TCP/IP functions. Value is a bit mapped register. Default = 0x7.
Function
TCP connection status. See note below
Bypass Nagle algorithm and use TCP_NODELAY
TCP retry enabled ( 42 total )
UDP RETRY (attempts retry if no ACK from
UDP)
DNS host address caching enabled
ARP table caching enabled
UDP auto pairing enabled
Add 8 byte timestamp to UDP or TCP packets
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 14 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
NOTE: When the link to an associated to an access point is lost while a
TCP connection is active, the TCP connection canbe left in hung/
inconsistent state. In some cases, the TCP connection will not recover. In
version 2.20 and later, if the link to the access point is regained within 60
seconds, the TCP connection will survive.
With version 2.20 we have changed the operation of bit0 in the
“ipflags”register. Previously this bit specified the TCP copy function,
butcontrols the TCP socket function while associated on a network.
• If bit 0 is set (default) TCP connections are kept open when the
connection to the access point is lost.
• If bit 0 is cleared (by setting “set ip flags 0x6” for example) then
when the connection to the access point is lost and TCP is
connected, the connection will be closed.
set ip gateway 
sets the gateway IP address, If DHCP is turned on, the gateway IP address
is assign and overwritten during association with the access point.
setip host 
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
.
setiplocalport
sets the local port number.
setipnetmask
sets the network mask. If DHCP is turned on, the net mask is assign and
overwritten during association with the access point.
setip protocol 
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)
Bit Position
Protocol
UDP
TCP Server & Client (Default)
Secure (only receive packets with IP address
matches the store host IP)
TCP Client only
HTTP client mode
setip remote 
sets the remote host port number.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 15 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
5.7. Optional Parameters
set opt jointmr
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 format 
settings for HTTP client/web server value is a bitmapped register. See
Section 錯誤! 找不到參照來源。 web server modes.
Bit
Function
Automatically send HTML data header based on broadcast
interval.
Send users BINARY data (converted to ASCII hex )
Sample the GPIO and AtoD pins and format to ASCII hex
Appends &id=”>
Appends &rtc= 
set opt replace 
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
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 
TCP connection password. Provides minimal authentication by requiring
any remote device that connects to send and match a challenge .
When set, all newly opened connections must first send the exact
characters that match the stored password otherwise the WiFly module
will close the connection. When the password is set the WiFly module
sends the string “PASS?” to the remote host. 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. SystemParameters
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 16 ~
WiFly GSX
www.rovingnetworks.com
set sys autoconn
WiFlyRN171-um
2/23/2011
TCP mode: sets the auto connect timer. This command causes the module
periodically connect to the host. The timer  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
Sets the auto-sleep timer. 0 disables. If the protocol is set to UDP ONLY, this
timer is used as a quick sleep function. Device will sleep
ms after transmission of the first UDP packet.
set sys iofunc
sets the IO port alternate functions. Bit-mapped value. For more details
see section 10.5
set sys mask 
sets the IO port direction mask. Bit-mapped value. For more information
see section 10.5
set sys printlvl
sets numerous print functions. 0 = quiet, 1 = connect information Default
is1. Please refer section 10.6 on Setting Debug Print levels
set sys output sets output PIO pins to HIGH or LOW. Bit-mapped value. Optional mask
only sets a subset of pins.
set sys sleep 
sets the sleep timer. 0 disables.
NOTE: 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 
sets the sensor input(s) to wake on (0-3). Bit-mapped value. 0 disables.
set sys wake 
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 
sets the time server address. (sNTP servers)
set time port 
sets the time server port number. Defaults to 123 which is almost always
the sNTP server port.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 17 ~
WiFly GSX
www.rovingnetworks.com
set time enable 
WiFlyRN171-um
2/23/2011
Enable or disable fetching time from the specified sNTP time server.
Default=0= disabled. A value or 1 gets time only once on power up. Any
value > 1 gets time continuously every  minutes.
5.10. UART Parameters
setuart baud 
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.
NOTE: the RS232 interface on the RN-134 does not work above 230400
setuart instant 
setuart raw 
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. Returns the AOK
response, and then this command will exit command mode.
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.
setuart 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
NOT be sent out the UART, and further configuration in command mode
will be problematic as no response will be received.
setuart mode 
sets the UART mode register. This is a bit-mapped value.
Bit Position
Function
NOECHO - disables echo of RX data while in
command mode
DATA TRIGGER makes connection on RX data
RAW mode (TCP stack disabled )
Enable Sleep on RX BREAK signal
UART RX data buffer. See note below for details*
*NOTE: When a TCP connection is closed, currently if there is RX data in the UART receiver, it is held
until
1) more chars come in, in which case it will get flushed, or
2) no chars come in and a new connection is made, then the chars will get forwarded.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 18 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
If this setting is enabled (set uart mode 0x10), any unsent RX data is still in the buffer is flushed when a
connection is closed.
setuarttx<0, 1>
Disables or enables the TX pin= PIO10 of the UART. Disable will set
PIO10 to an INPUT 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
setwlanauth
Sets the authentication mode. Not needed unless using auto join mode 2.
i.e. set wlan join 2
Note: 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, NOT shared mode)
• WPA2-PSK (AES only)
• WPA1-PSK (TKIP only)
• WPA-PSK mixed mode (some APs, not all are supported)
Value
Authentication Mode
Open (Default)
WEP-128
WPA1
Mixed WPA1 & WPA2-PSK
WPA2-PSK
Not Used
Adhoc, Join any Adhoc network
setwlan channel 
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.
setwlanext_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.
setwlan join 
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.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 19 ~
WiFly GSX
www.rovingnetworks.com
Value
WiFlyRN171-um
2/23/2011
Policy
Manual, do not try to join automatically
Try to join the access point that matches the stored
SSID, passkey and channel. Channel can be set to
0 for scanning. (Default)
Join ANY 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.
Reserved – Not used
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
setwlan 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.
setwlan key 
sets the 128 bit WEP key. If you are using WPA or WPA2 you should
enter a pass phrase with the set wlanpassphase command. Key must be
EXACTLY 13 bytes (26 ASCII chars). Data is expected in HEX format,
“0x” should NOT 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.
setwlanlinkmon
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
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 20 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
threshold of failed scans before the WiFly declares “AP is Lost”, deauthenticates. 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 
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)
setwlannum
sets the default WEP key to use. 1-4 is the valid range.
Example : “set w n 2” sets the default key to 2.
setwlan phrase 
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 .
Example : “set w p password” sets the phrase.
setwlan rate 
Value
4-7
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
Wireless Data Rate
1 Mbit/sec
2 Mbit/sec
5.5 Mbit/sec
11 Mbit/sec
Invalid
6 Mbit/sec
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 21 ~
WiFly GSX
www.rovingnetworks.com
10
11
12
13
14
15
WiFlyRN171-um
2/23/2011
9 Mbit/sec
12 Mbit/sec
18 Mbit/sec
24 Mbit/sec (default)
36 Mbit/sec
48 Mbit/sec
54 Mbit/sec
setwlanssid
sets the wlanssid to associate with. 1-32 chars.
NOTE: 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.
setwlan window 
sets the IP maximum buffer window size. Default is 1460 bytes.
5.12. Sensor Parameters
set q sensor 
set q power 
Bitmask value that determines which sensor pins to sample when sending
data using the UDP broadcast packet, or the HTTP auto sample function.
NOTE: The sensor pins variable has been changed from
“set option sensor ” to set q sensor  in ver 2.21.1
This is a new register added in ver 2.21.1 to automatically turn on the
sensor power. This is a 8 bit register with two 4 bit nibbles. If the top nibble is
set, then power is applied upon power up and removed upon power down or
sleep.
If the bottom nibble is set, then power is applied when a sampling event
occurs, for example:
• The UDP Broadcast
•
The auto web posting of sensor data
The power is removed immediately after the sampling is complete.
The values used for setting the power are described in the table below:
Value
Sensor pin voltage
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 22 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
Turn off the sensor power
GROUND the sensor pin
1.2V internal regulated reference
VBATT input pin
3.3V output of on board regulator
Example: To set the power to 1.2V automatically upon power up, the
command would be set q power 0x20. To set sensor power to 1.2V when
sampling event occurs, the command is set q power 0x02
Example: To set the power to 3.3V automatically upon power up, the
command would be set q power 0x40. To set sensor power to 3.3V when
sampling event occurs, the command is set q power 0x04
6. Get 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.
getdns
display DNS settings.
get ftp
display FTP settings.
getip
display IP address and port number settings. Optional parameter just returns the
current IP address value.
get mac
display the device MAC address.
get option
display the option settings like device ID
get q
display the sensor settings (sensor mask and sensor power settings)
get sys
display system settings, sleep, wake timers, etc.
get time
display the time server UDP address and port number.
getwlan
display the ssid, chan, and other wlan settings.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 23 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
getuart
display the UART settings.
ver
return the software release version
2/23/2011
7. Status 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
RN-370 and temperature sensors)
show connection
Bit
location
Function
Value
Displays connection status in this HEX format: 8XYZ
13-16
9-12
0-3
fixed
channel
1-13
DNS found
1=resolved
DNS server
1=
contacted
Authen
1= OK
Assoc
1=OK
TCP status
0= Idle,
1=Connected
3= NOIP
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. Optional parameter
displays only the MAC address of the AP currently associated.
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 0x1Displays multiple analog interface values at once. The channels displayed is controlled
by a bit mask which is proceeded by a 0x1xxwhere xx mask is the bit mask of the
channels. For example, to read channels 0,1, and 7, send:
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 24 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
show q 0x183
Which returns 8, 8, 8, \r\n
8. Action Commands
$$$
enter command modeCharacters 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. This command also writes the settings out
to the standard config file. After this command the module then needs to
be rebooted for settings to take effect.
join
joins the network . If network is security enabled you must set the
pass phrase with the set wlan phrase command prior to issuing the join
command
join # 
join a network from the scan list.  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 join command
leave
disconnectsthe module fromthe currentlyassociated Access Point.
lookup
performs a DNS query on the suppliedhostname.
open
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.  can also be a DNS hostname
and will be resolved if entered.
ping
ping remote host. Default sends 1 packet. Optional  sends 
pings at 10 per second.
Ping 10.20.20.12 10 – pings IP address 10 times
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~ 25 ~
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um
2/23/2011
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 
command
ping h
pings the stored host IP address, the host IP address can be set
with the set ip host command
ping i
pings a known Internet server at www.neelum.com by first
resolving the URL (proves that DNS 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)
scan

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : No
Author                          : TEST
Create Date                     : 2011:02:23 11:42:17+08:00
Modify Date                     : 2015:04:27 10:40:33+08:00
Has XFA                         : No
XMP Toolkit                     : Adobe XMP Core 5.4-c005 78.147326, 2012/08/23-13:03:03
Producer                        : Acrobat Distiller 7.0 (Windows)
Creator Tool                    : PScript5.dll Version 5.2.2
Metadata Date                   : 2015:04:27 10:40:33+08:00
Format                          : application/pdf
Title                           : Microsoft Word - WiFly RN171 1.0.0 um.doc
Creator                         : TEST
Document ID                     : uuid:5eda4be2-a186-4c28-886e-5a05c33fbdd0
Instance ID                     : uuid:9b73ead2-ef37-4156-9a2c-05491ad66292
Page Count                      : 71
EXIF Metadata provided by
EXIF.tools
FCC ID Filing: OA3RN1723

Navigation menu