2.4. Status Indictors..................................................................................................................................7
5. SET Commands............................................................................................................................................... 11
6. Get Commands................................................................................................................................................ 23
7. Status Commands............................................................................................................................................ 24
11.4. Using the UDP Broadcast function............................................ ... ..................................................39
12. Joining Networks and Making Connections............................................................................................ 41
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
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 applica tions. 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
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 functi ons
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 Ro v i n g Ne tw orks website for hardware specific a tio ns, 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), a nd V3.3IN (pin 21).
Tie 3.3VREG-IN (pin 18) to GROUND.
Leave 3.3V-REG-OUT (Pin 17) floating/ no conne ct.
BATTERY:
Apply battery = 2.0 to 3.3VDC to V BAT T (p in 20).
LeaveV3.3IN pin 21 f l oating/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 ab o ve 3. 3 Vdc into the VDD pins of the module wi ll pe rmanently
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 an d V CC.
2.2. Reset
Reset is active LOW and is optional/does n ot need to be connected. The reset pin is 3.3V tole ra nt 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 PIO6=Red LED PIO5=Yellow LED PIO4=Green LED
ON solid Connected over TCP
Fast blink Not Associated Rx/Tx data transferNo IP address
Slow blink IP address OK
OFF 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<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 RN-131g connects, for
example: the default is 9600 baud rate, 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“<cr>.
.
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 th e 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 a n d tr yin g 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 m odule. Auto-join will re-ena ble when you exit out of command m ode.
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 yo u 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 m od ule creates an adhoc
network with the following
SSID: WiFly-GSX-XX where XX is the final two bytes of the devices MAC ad dre ss
Channel: 1
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 w hich 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 1 69.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 addressthatis notonthesamesubnet 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 sensiti ve. Hex input data can be upper or lower case. String text data, such
as SSID is also case sensitive.
The first command is fully decod e d 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 is also valid,
set u b 115200 is also valid, however,
s uartbaudrate 115200 isNOT
Numbers 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.
valid.
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 change s made or the module will load the pre vious 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 t he cha nnel an d ge t 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 para meters “on the fly” to test feat ures, 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 <filename> command, and these configurations can be loaded using the load
<filename> command.
5. SET 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 DNS host and domain
FTP 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 milliseconds. Default is 100.
set adhoc probe <num> 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 <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 inte rval = 0x7, a packet will
be sent every 8 seconds. The m inimum interval value is 1 (every 2
seconds) and max value is 0xff (every 256 seconds). Setting the interval
value to zero disables sending UDP broadc ast messages. The default
interval is 7.
set broadcast port <port>sets the port number to which the UDP hell o/h e artbeat message is sent.
The default port is 55555.
5.3. COMM Parameters
setcomm $ <char> 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 ever y
subsequent reboot will ignore “$$$” and look for “<char><char><char>”.
setcomm 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 a s the <string> parameter. Max string
length is 32 characters. Default is *CLOS*
setcomm 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 leng t h
is 32 characters. Default is *OPEN*
setcomm 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. Defa ult is *HE LL O *
setcomm idle <secs>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 <value>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 Ti mers 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 WiFlyRN171-um 2/23/2011
setcomm size <value>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 f orw a rding. The
others are match character and timer. For more information see section
10.4 on UART Receiver.
setcomm time <num>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). Settin g t his value to 0
will disable forwarding bas e d o n t he f l ush 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 <addr> 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 <string> sets the name of the host for TCP/IP connections.
setdns backup <string> sets the name of the backup host for TCP/IP connections.
5.5. FTP 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.
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 <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 “.” deli mited. Note this is different from the RN111b module which is space delimited!
Example: “set ip a 10.20.20.1”
setip backup <addr> 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<value>enable/disable DHCP mode. If enabled, the IP a ddress, 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 ti me 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 t he p revious 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 ON, get IP address and gateway from AP
2 Auto-IP, generally used with A dhoc networks
3
4 Reserved for future use
setip flags <value> Set TCP/IP functions. Value is a bit mapped register. Default = 0x7.
Bit Function
0 TCP connection status. See note below
1 Bypass Nagle algorithm and use TCP_NODELAY
2 TCP retry enabled ( 42 total )
3
4 DNS host address caching enabled
5 ARP table caching enabled
6 UDP auto pairing enabled
7 Add 8 byte timestamp to UDP or TCP packets
DHCP cache mode, Uses previous IP address if
lease is not expired (lease survives reboot)
UDP RETRY (attempts retry if no ACK from
UDP)
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 ac cess 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 <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.
setip 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>.
setiplocalport<num> sets the local port number.
setipnetmask<value> sets the network mask. If DHCP is turned on, the net mask is assign and
overwritten during association with the access point.
setip 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)
Bit Position Protocol
0 UDP
1 TCP Server & Client (Default)
2
3 TCP Client only
4 HTTP client mode
setip remote <value>sets the remote host port number.
Secure (only receive packe ts with IP address
matches the store host IP)
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<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 format <value>settings for HTTP client/web server value is a bitmapped register. See
Section 錯誤! 找不到參照來源。 web server modes.
set opt replace <char> replacement character for spaces. The replacement character is used when
set opt deviceid<string> Configurable Device ID - can be used for storing serial n umbers, product
set opt password <string> TCP connection password. Provides minimal authentication by requiring
Bit Function
0 A utom atically sen d HTML data header based on broa dcas t
interval.
1 Send users BINARY data (converted to ASCII hex )
2 Sample the GPIO and AtoD pins and format to ASCII hex
3 Appends &id=<the value of the deviceid string set with “set opt
device <string>”>
4 Appends &rtc= <real time clock value in message as 32 bit HEX
value in format aabbccddeeff>
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)
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” command s. Max string
size is 32 bytes. The default is “WiFly-GSX”.
any remote device that connects to send and match a challenge <string>.
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 WiFlyRN171-um 2/23/2011
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 ONLY, this
timer is used as a quick sleep function. Device will sleep
<num>ms after transmission of the first UDP packet.
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
is1. Please refer section 10.6 on Setting Debug Print levels
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.
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 <value> sets the sensor input(s) to wake on (0-3). Bit-mapped va lue. 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. (sNTP servers)
set time port <num> sets the time server port number. Defaults to 123 which is almos t 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 WiFlyRN171-um 2/23/2011
set time enable <value>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 <value> minutes.
5.10. UART Parameters
setuart 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.
NOTE: the RS232 interface on the RN-134 does not work above 230400
setuart 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. Returns the AOK
response, and then this command will exit command mode.
setuart 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.
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 <value>sets the UART mode register. This is a bit-mapped value.
Bit Position Function
0
1 DATA TRIGGER makes connection on RX data
2 RAW mode (TCP stack disabled )
3 Enable Sleep on RX BREAK signal
4 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.
NOECHO - disables echo of RX data while in
command mode
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<value> Sets the authentication mode. Not needed un l ess 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 s ha red 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 Not Used
6 Adhoc, Join any Adhoc network
setwlan 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.
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 s witching the antenna.
setwlan 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.
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~19~
WiFly GSX
www.rovingnetworks.com WiFlyRN171-um 2/23/2011
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 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 sear ched can be
limited by setting the channel mask.
3 Reserved – Not 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
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 p assphrase using the set wlan key or set wlan
passphrase command. Default = 0, don’t hi de.
setwlan key <value>sets the 128 bit WEP key. If you are using WPA or WPA2 you sh ould
enter a pass phrase with the set wlanpassphase command. Ke y 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<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
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 recommende d, 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)
setwlannum<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.
setwlan phrase <string>sets the passphrase for WPA and W P A2 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), w hic h is t h e n has h ed 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 byt e PSK an d t h e va lu e 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.
setwlan rate <value>sets the wireless data rate. Lowering the rate increa ses the ef fective range
of the WiFly-GSX module. The value entered is mapped according to the
following table
setwlanssid<string>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 “$” chara cter.
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 <value> sets the IP maximum buffer window size. Default is 1460 bytes.
5.12. Sensor Parameters
set q sensor <mask> Bitmask value that determines which sensor pins to sample when sending
data using the UDP broadcast pac ket, or the HTTP auto sample function.
NOTE: The sensor pins variable has been changed from
“set option sensor <mask>” to set q sensor <mask> in ver 2.21.1
set q power <value> 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~
Loading...
+ 49 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.