Roving Networks RN-131 User Manual

Wifly command reference, advanced features & applications
Hide thumbs Also See for RN-131:
Table of Contents

Advertisement

Quick Links

 
WiFly Command Reference,
Advanced Features & Applications
© 2012 Roving Networks. All rights reserved.
RN-WIFLYCR-UM Version 1.0r 9/21/2012
www.rovingnetworks.com
 
 
RN -W IFLY CR-U M- .01
RN-WIFLYCR-UM
USER MANUAL
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RN-131 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Roving Networks RN-131

  • Page 1 RN -W IFLY CR-U M- .01       RN-WIFLYCR-UM WiFly Command Reference, Advanced Features & Applications © 2012 Roving Networks. All rights reserved. USER MANUAL RN-WIFLYCR-UM Version 1.0r 9/21/2012 www.rovingnetworks.com...
  • Page 2: Table Of Contents

    RN -W IFLYCR -U M   Contents Introduction ........................5     Features ............................5   Configuration ..........................6   Entering Command Mode ......................6   Remote Configuration Using Ad Hoc Mode ................... 7 Command Reference ......................8     Command Syntax ..........................
  • Page 3 RN -W IFLYCR -U M     UART Heartbeat Messages ....................... 58   Using the Real-Time Clock Function ..................... 59   Time Stamping Packets ....................... 60 Advanced Applications ..................... 61     Sending Data using UDP ......................61   UDP Auto Pairing ........................62  ...
  • Page 4 RN -W IFLYCR -U M     COMM PARAMETERS ......................... 81   DNS PARAMETERS ........................81   FTP PARAMETERS ........................81   IP PARAMETERS ........................82   OPTIONAL PARAMETERS ......................82   SYSTEM PARAMETERS ....................... 82   TIME SERVER PARAMETERS ...................... 82  ...
  • Page 5: Introduction

    UART. This user manual is applicable to standalone RN-131 and RN-171 modules, as well as Roving Networks hardware that includes these modules. Although there are some differences, the RN-131 and RN-171 modules support the same ASCII command set.
  • Page 6: Configuration

    8 bits, no parity, 1 stop bit, and hardware flow control disabled. You can enter command mode locally over the UART interface at any time irrespective of an active TCP connection. NOTE: Roving Networks suggests using either the TeraTerm (Windows OS) or CoolTerm (Mac OS-X) terminal emulator program.
  • Page 7: Remote Configuration Using Ad Hoc Mode

    RN -W IFLYCR -U M   mode may cause the UART to become unresponsive briefly. To avoid configuration problems, the auto-associate feature is disabled when the module is in command mode, making it easy to configure the module. The auto-associate mode turns on when you exit command mode.
  • Page 8: Command Reference

    RN -W IFLYCR -U M   COMMAND REFERENCE Roving Networks WiFly modules support a variety of commands for configuration. This section describes these commands in detail and provides examples. COMMAND SYNTAX To issue commands to the module, you send a keyword followed by optional parameters. Commands are case sensitive, and you cannot use spaces in parameters.
  • Page 9: Set Commands

    RN -W IFLYCR -U M   When the system boots, all configuration data is loaded into RAM variables from the config file. The set commands only modify the RAM copy of the system variables. In general, the IP, WLAN, and UART settings require you to save and reboot before they take effect because they operate upon power up.
  • Page 10 RN -W IFLYCR -U M   set adhoc probe <value> This command sets the ad hoc probe timeout in seconds, where <value> is the number of seconds. The probe timeout is the number of seconds the module waits for probe responses before declaring, “ADHOC is lost,” and disabling the network interface.
  • Page 11 RN -W IFLYCR -U M   set comm $ <char> This command sets character used to enter command mode to <char>. You typically use this setting when $$$ (the default string used to enter command mode) is a possible data string. You must carefully note the new character. After you save this setting, upon every subsequent reboot the module ignores $$$ and looks for <char><char><char>...
  • Page 12 RN -W IFLYCR -U M   set comm match <value> | <hex> This command sets the match character, where <value> is a decimal number from 0 to 127 or a hex number from 0 to 7F. When this configuration option is set, the module sends an IP packet each time the match character appears in the data.
  • Page 13 RN -W IFLYCR -U M   set dns address <address> This command sets the IP address of the DNS sever, where <address> is an IP address in the form <value>.<value>.<value>.<value> with <value> being a number between 0 and 255. This address is automatically set when using DHCP;...
  • Page 14 If you specify any file other than the firmware image, the WiFly module downloads the file and issues the UPDATE FAIL=3 error. Default: wifly_GSX-<version>.img (RN-131), wifly_EZX-<version>.img (RN-171) Example: set ftp filename my_data // Sets the firmware image to be retrieved via FTP as // my_data set ftp mode <mask>...
  • Page 15 RN -W IFLYCR -U M   set ip address <address> This command sets the WiFly module’s IP address, where <address> is an IP address in the form <value>.<value>.<value>.<value> with <value> being a number between 0 and 255. If DHCP is turned on, the IP address is assigned and overwritten when the module associates with an access point.
  • Page 16 RN -W IFLYCR -U M   set ip flags <mask> This commands sets the TCP/IP functions, where <mask> is a hex number referring to a bit-mapped register. See Figure 1. Figure 1. set ip flags Command Bit-Mapped Register TCP connection status. See Notes (1), (2). Bypass Nagle algorithm and use TCP_NODELAY.
  • Page 17 RN -W IFLYCR -U M   set ip localport <value> This command sets the local port number, where <value> is a decimal number representing the port. Default: 2000 Exampl: set ip localport 1025 // Sets the local port to 1025 set ip netmask <address>...
  • Page 18 RN -W IFLYCR -U M   Figure 3. set ip tcp-mode Command Bit-Mapped Register Shorten the TCP connect timer (use with bit 1). Shorten the TCP connect timer (use with bit 0). Forces the module to use DNS rst to resolve the IP address, even if the host IP is set. Reserved.
  • Page 19 RN -W IFLYCR -U M   set opt replace <char> This command sets the replacement character you use to indicate spaces in the SSID and pass phrases, where <char> is a single character. Each occurrence of the replacement character is changed into a space. Only the WiFly command parser uses this replacement character.
  • Page 20 RN -W IFLYCR -U M   set q power <value> This register automatically turns on the sensor power, where <value> is shown in Table 5. This parameter sets an 8-bit register with two 4-bit nibbles. If the top nibble is set, power is applied upon power up and removed upon power down or sleep.
  • Page 21 RN -W IFLYCR -U M   set sys autoconn <value> This command sets the auto-connect timer in TCP mode, where <value> is a decimal number from 0 to 255 as shown in Table 6. Setting this parameter causes the module to connect to the stored remote host periodically as specified by <value>.
  • Page 22 “Setting GPIO Direction, Alternate Functions & Disabling LEDs” on page 51. NOTE: To set the GPIO pins as inputs or outputs instantly, use the set sys mask 0xABCD 1 command, which does not require a reboot. Default: 0x20F0 (for RN-131) 0x21F0 (for RN-171) Example: set sys mask 0x0 // Sets all pins as inputs set sys printlvl <value>...
  • Page 23 RN -W IFLYCR -U M   set sys sleep <value> This command sets the sleep timer, where <value> is a decimal number. The sleep timer is the time (in seconds) after which the module goes to sleep. This timer is disabled during an open TCP connection. When the TCP connection is closed, the module counts down and puts the module to sleep after <value>...
  • Page 24 RN -W IFLYCR -U M   Setting the trigger value to 0x20 (i.e., using <mask>) puts the module to sleep when GPIO8 is pulled high. To enable this feature, use the set sys trigger 0x20 command. This command makes GPIO8 an interrupt pin and puts the module to sleep as soon as it is pulled high, regardless of the module’s state;...
  • Page 25 RN -W IFLYCR -U M   set time port <value> This command sets the time server port number, where <value> is a decimal number. 123, the default, is typically the SNTP server port. Default: Example: set time port 1052 // Sets the time server port to 1052 set time enable <value>...
  • Page 26 RN -W IFLYCR -U M   set uart instant <value> This command immediately changes the baud rate, where <value> is 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, or 921600. This command is useful when testing baud rate settings or when switching the baud rate “on the fly”...
  • Page 27 RN -W IFLYCR -U M   set uart raw <value> This command sets a raw UART value, where <value> is a decimal number representing the baud rate. You use this command to set non-standard baud rates. The lowest possible baud rate is 2,400. Using non-standard raw baud rates with hardware flow control can be more useful at speeds as the microcontroller interfaced to the module may be able to better match the UART speed and get better results.
  • Page 28 RN -W IFLYCR -U M   set wlan auth <value> This command sets the authentication mode, where <value> is shown in Table 11. You only need to set this parameter if you are using automatic join mode 2, i.e., the set wlan join 2 command. NOTE: During association the module interrogates the access point and automatically selects the authentication mode.
  • Page 29 Only one antenna is active at a time and the module must be power cycled after changing the antenna setting. NOTE: This command applies only to the RN-131 module; it is not applicable to the RN-171. If you send this parameter to the RN-171, it issues an error message ERR: Bad Args.
  • Page 30 RN -W IFLYCR -U M   set wlan join <value> This command sets the policy for automatically associating with network access points, where <value> is one of the options shown in Table 12. The module uses this policy on powers up, including waking up from the sleep timer. Table 12.
  • Page 31 The module re-attempts the association based on the join policy setting. Roving Networks recommends setting the threshold to 5 attempts, because some access points do not always respond to probes. If you do not set this parameter, there is no way to detect that an access point is no longer present until it becomes available again (if ever).
  • Page 32 RN -W IFLYCR -U M   set wlan rate <value> This command sets the wireless data rate, where <value> is a value shown in Table 13. Lowering the data rate increases the effective range of the module. Table 13. set wlan rate Command Options Value Wireless Data Rate (Mbits/second) 4 - 7...
  • Page 33: Get Commands

    NOTE: This command applies only to the RN-171 module; it is not applicable to the RN-131. The transmit power on the RN-131 is fixed to 18 dBm. If you send this parameter to the RN-131, it issues an error message ERR: Bad Args.
  • Page 34 RN -W IFLYCR -U M   get ftp This command displays the FTP settings. Example: get ftp // Show the FTP setttings get ip <char> This command displays the IP address and port number settings, where <char> is the optional parameter a. Using <char>...
  • Page 35: Status Commands

    IP addresses, the current values are received from the network and may not match the stored values. Except where noted, the show commands do not have any parameters. show battery This command displays current battery voltage, and is only applicable to Roving Networks’ battery-powered products such as the RN-370 and temperature sensors (ISENSOR-CB). Example:...
  • Page 36 RN -W IFLYCR -U M   show q <value> This command displays the value of the analog interface pin, where <value> is 0 to 7. The A/D reading is 14 bits with a range of 0 to 400 mV (therefore, the resolution is 24 uV). The output is in uV (1,000 millivolts). The module returns a value in the format 8xxxxx, where xxxxx is the voltage in microvolts sampled on the channel you requested.
  • Page 37: Action Commands

    RN -W IFLYCR -U M   ACTION COMMANDS The action commands allow you to enter and exit command mode, join networks, etc. Except where noted, these commands do not have any parameters. You use this command to enter command mode. You must type $$$ together quickly with no additional characters before or after.
  • Page 38 RN -W IFLYCR -U M   join <string> This commands instructs the WiFly module to join the network indicated by <string>. If the network has security enabled, you must first set the pass phrase with the set wlan pass command prior to issuing the join command. NOTE: The <string>...
  • Page 39 RN -W IFLYCR -U M   open <address> <value> This command opens a TCP connection to <address>, where <value> is the port number and <address> is an IP address in the form <value>.<value>.<value>.<value> with <value> being a number between 0 and 255. If you do not use the <address>...
  • Page 40: File I/O Commands

    RN -W IFLYCR -U M   scan <value> <char> This command performs an active probe scan of access points on all 13 channels, where <value> is an optional parameter representing the time in ms per channel. <char> represents the optional parameter P, which causes the module to perform a passive scan, and list all access points it can see in passive mode.
  • Page 41 RN -W IFLYCR -U M   save <string> This command saves the your configuration settings to a file, where <string> is an optional filename. If you do not specify a filename, the module saves the settings to a file named config (default). Default: config Example:...
  • Page 42: Advanced Features & Settings

    RESET and reboot commands. You can obtain the firmware images from Roving Networks FTP site. See “Upgrading Firmware Via FTP” on page 71 for instructions on how to download and install the firmware.
  • Page 43: Enabling Ap Mode

    To enable AP mode in hardware, hold GPIO9 high at 3.3 V and then reboot (or power cycle) the module. The module boots up in AP mode with the DHCP server enabled. NOTE: Refer to the documentation for your module on the Support page of the Roving Networks web site at http://rovingnetworks.com/Support_Overview for more details on programming/configuring the module.
  • Page 44: Using Ap Mode

    In this case, the module reports the name as an asterisk (*). Once a client is associated to the network, it can open a TCP connection to the Roving Networks’ module. After successfully opening a TCP connection, the client receives a *HELLO* message. The Roving Networks’ module prints *OPEN* on the UART, indicating an open TCP connection.
  • Page 45: View Associated Devices

    You enable the link monitor using the set wlan link <value>, where <value> is the link monitor timer in seconds. NOTE: Roving Networks recommends that you set the link monitor timer value to at least 300 seconds to avoid de- authenticating clients frequently.
  • Page 46: Putting The Module To Sleep & Waking It

    RN -W IFLYCR -U M   Table 16. GPIO Alternative Functions GPIO Description GPIO Role in alternative function GPIO4 High when the first client associates, Low when all clients leave the network GPIO5 WiFly module can drive it high to open a TCP connection to a stored host. When the module drives GPIO5 low, it closes the TCP connection GPIO6 WiFly module drives it high when a TCP connection is open, low when TCP...
  • Page 47 RN -W IFLYCR -U M   When the module wakes up from sleep, it takes time (in milliseconds) to initialize the internal hardware. During this time, any data that is sent to the WiFly module over the UART is not processed. You can monitor signals that indicate the module is ready to accept data, as described in Table 19.
  • Page 48: System & Auto-Connect Timers

    RN -W IFLYCR -U M   SYSTEM & AUTO-CONNECT TIMERS The WiFly module uses a real-time clock (RTC) to generate timers. The RTC is active even when the module is asleep, allowing you to put the module to sleep and wake it based on timer intervals. The module has the following timers: Sleep timer—Used to put the module to sleep.
  • Page 49: Tcp Connection Timers

    The resulting UDP sleep timer is 4 x 10 ms or 40 ms. You could also set autosleep = 2 and comm timer = 20 ms to achieve the same effect. Roving Networks recommends using a minimum value of 2 (when the default flush time is 10 ms) to ensure that the UDP packet is transmitted. For larger packets, you should increase the value.
  • Page 50: Wake On Uart Activity

    RN -W IFLYCR -U M   Table 21. Sensor Input Values Wake on Sensor Input Value Command set sys trigger 1 set sys trigger 2 set sys trigger 4 set sys trigger 8 WARNING: The voltage on any sensor input CANNOT exceed 1.2-V DC or the module will be permanently damaged. The sensor inputs are rated 1.2-V DC, maximum.
  • Page 51: Setting Gpio Direction, Alternate Functions & Disabling Leds

    If you only need to set one bit in the mask, you need to read, mask, and set the value. Otherwise, you will overwrite any previous GPIO settings. The default mask for the RN-131 module is 0x20f0, which sets GPIO13, GPIO7, GPIO6, GPIO5, and GPIO4 as outputs. The default mask for the RN-171 module is 0x21f0, which corresponds to the following settings: GPIO0 - 3 are used internally on the module.
  • Page 52 RN -W IFLYCR -U M   NOTE: To set the GPIO pins as inputs or outputs instantly, use the set sys mask 0xABCD 1 command, which does not require a reboot. The RN-134 evaluation board’s LEDs are connected to GPIO4 - 6. To disable the LEDs, enable the alternative functions of the LEDs (use the set sys iofunc 0x7 command).
  • Page 53: Setting The Alternate Gpio Functions

    RN -W IFLYCR -U M   Table 22. GPIO Pin Usage, Default State & Functionality Signal RN-131 RN-171 Default Function Name Default State Default State GPIO0 GPIO1 Input Unused. GPIO2 Input Unused. GPIO3 Input Unused. GPIO4 Output Output Green LED.
  • Page 54: Controlling Connections With Gpio Pins

    RN -W IFLYCR -U M   Table 23. GPIO Pin Alternate Function Bitmask Signal Name Direction Function GPIO4 Output Disable the LED function so the I/O can be used as a GPIO pin. GPIO5 Output Disable the LED function so the I/O can be used as a GPIO pin. GPIO6 Output Disable the LED function so the I/O can be used as a GPIO pin.
  • Page 55 RN -W IFLYCR -U M   Figure 11. Controlling Connections with the GPIO Pins Embedded WiFly Microprocessor Module This signal instructs the microprocessor that Event: The WiFly module is associated with GPIO4 = High by WiFly Module it is OK to open a TCP connection. an access point and has a valid IP address.
  • Page 56: Setting Debug Print Levels

    RN -W IFLYCR -U M   SETTING DEBUG PRINT LEVELS You can enable print functions to assist with debugging the operation and status of the module. The set sys printlvl <value> command controls these additional print functions, where <value> is a bit-mapped register that controls which printout messages are sent to the UART.
  • Page 57 RN -W IFLYCR -U M   Table 24. Security Modes Number Description OPEN WEP (64 or 128 ) WPA1 MIXED WPA2 Enterprise WEP Enterprise WPA1 Enterprise WPA mixed Enterprise WPA2 Enterprise NO security Table 25 describes the capabilities bit mask values. Table 25.
  • Page 58: Firmware Version 2.22 Through 2.30

    RN -W IFLYCR -U M   Firmware Version 2.22 through 2.30 Firmware version 2.22 through 2.30 supports a comma-delimited scan output format, which a microprocessor can use to parse the RSSI information. The scan command output format is: Row Count Channel RSSI Value Security...
  • Page 59: Using The Real-Time Clock Function

    RN -W IFLYCR -U M   USING THE REAL-TIME CLOCK FUNCTION The module’s real-time clock keeps track of the number of seconds since the module was powered on and the actual time when the module synchronized with the sNTP time server. By default, the module keeps track of up time but does not synchronize with the time server because this synchronization requires the module to be associated with a network that can access the sNTP server.
  • Page 60: Time Stamping Packets

    RN -W IFLYCR -U M   TIME STAMPING PACKETS You can use the time stamping feature to append 8 bytes to a TCP or UDP packet automatically. The set ip flags 0x87 command enables the time stamp and keeps other default settings). The time stamp bits from MSB to LSB are: User’s TCP or UDP packet data 63..56 55..48...
  • Page 61: Advanced Applications

    RN -W IFLYCR -U M   ADVANCED APPLICATIONS This section describes a variety of advanced applications for the WiFly module, such as sending data using UDP, associating with access points, using the HTML client feature, upgrading the firmware over FTP, etc. SENDING DATA USING UDP UDP is a connectionless protocol: there is no initial handshaking between the hosts to set up the UDP connection and the receiver does not send an acknowledgement when it receives UDP packets.
  • Page 62: Udp Auto Pairing

    RN -W IFLYCR -U M   UDP Auto Pairing With the UDP auto-pairing feature, the module temporarily stores the host IP address of the first remote device that sends a UDP packet to the module. This host IP address is stored in the module’s RAM, which is cleared when the module sleeps or power cycles.
  • Page 63: Joining Networks & Making Connections

    RN -W IFLYCR -U M   Figure 12. UDP Broadcast Packet Byte Format Position 0 - 5 6 7 8 - 9 10 - 13 14 - 15 16 - 17 18 - 31 32 - 59 60 - 91 92 - 93 94 - 110 Access Point’s MAC Address (6 Bytes) Channel (1 Byte) RSSI (1 Byte)
  • Page 64: Making Connections

    RN -W IFLYCR -U M   Figure 14. Find Available Networks If you are connecting to an open network, use the join command to associate with the access point. The scan list in Figure 14 shows that roving1 is an open access point. Type join roving1 (or join # 1) to associate with the network as shown in Figure 15.
  • Page 65: Setting Up Automatic Connections

    RN -W IFLYCR -U M   In your COM port redirector program, note your computer’s IP address, e.g., by typing the ipconfig command in the Microsoft Command Window. Go to your terminal emulator and put the module into command mode. Type the open <address>...
  • Page 66: Using Dns Settings

    RN -W IFLYCR -U M   Using DNS Settings The module contains a built-in DNS client. If you do not specify the host’s IP address, (i.e., it is set to 0.0.0.0), the module uses DNS protocol. When you set the host name using the set dns name <string> command, the module automatically attempts to resolve the host address.
  • Page 67: Built-In Html Client Modes

    RN -W IFLYCR -U M   To make the connection, use the open command or you can use open www.webserver.com 80. The user’s microprocessor writes the following string to the UART: GET /ob.php?obvar=WEATHER \n\n Where the \n is the linefeed character (decimal 10 or hex 0xa). Two linefeeds are required for the web server to know the page is complete.
  • Page 68: Connect To A Web Server Automatically When Uart Data Is Received

    RN -W IFLYCR -U M   NOTE: If the HTML header contains spaces, you must use the $ character to indicate spaces in the string. (A space is the command delimiter.) When the module’s command parser sees the $, it converts it to a space character.
  • Page 69: Post Sensor Data Automatically

    RN -W IFLYCR -U M   Post Sensor Data Automatically The module can send the value of the GPIO and sensor pins to the web server automatically. The data arrives as 18 bytes of ASCII hex data in the format <2 bytes GPIO><channel 0 thru 7 sensor data>. NOTE: The analog-to-digital convertor is 14 bits on a 400 mV signal, which translates to about 24 microvolts (0x61A80 in hex).
  • Page 70: Html Client Example: Posting Uart Data To A Web Server

    Figure 16. Server Response   You can view the data you sent to the Roving Networks web server at http://rovingnetworks.com/wiflys/view. HTML Client Example: Posting UART Data to a Web server The module can post serial UART data in ASCII or binary format automatically. In this example, when the serial UART data comes in, the module connects and sends data to the web server in the following format: GET /server.php?value=<user serial data>...
  • Page 71: Upgrading Firmware Via Ftp

    The module contains a built-in FTP client for downloading files and updating the firmware. The client uses passive mode FTP, which allows operation through firewalls and the Internet. To connect to Roving Networks to obtain the latest released firmware, use the following settings: FTP server: rn.microchip.com...
  • Page 72: Ftp Client

    Connect to an FTP Server By default, the module is configured to download the latest firmware from the Roving Networks’ FTP server. To configure the module to connect to your own FTP server, you must adjust the parameters as described in the example below.
  • Page 73: Retrieving Files From The Ftp Server

    Wi-Fi Protected Access, which is supported by all newer Wi-Fi certified devices (but not older Wi-Fi devices). The most common mode of WPS is the Push Button Mode (PBC) in which the user simply pushes a button on both the access point and the wireless client (e.g., the Roving Networks’ WiFly module). See Figure 17. www.rovingnetworks.com...
  • Page 74 The module supports the WPS feature in firmware version 2.28 and higher. To upgrade to the current firmware version and download the WPS application, refer to the WPS application note on the Support page of the Roving Networks web site at http://www.rovingnetworks.com/Support_Overview.
  • Page 75: Launching A Wps Application

    RN -W IFLYCR -U M   Launching a WPS Application There are two ways to invoke a WPS function: Using the wps command in the console. • • Using the ad hoc/factory reset pin (GPIO9). To invoke a WPS function using the ad hoc/factory reset mode: Enable the WPS function on GPIO9 using the set system trigger 0x10 command.
  • Page 76 RN -W IFLYCR -U M   Figure 19. Access Points Supporting WPS in Scan List   If you press the WPS button on the access point and then perform a scan, the scan returns a –A to indicate the access point is in WPS active mode.
  • Page 77: Ad Hoc Networking Mode

    DHCP server. NOTE: Roving Networks supports ad hoc networking, however, going forward, ad hoc mode will be replaced with soft AP mode. Ad hoc mode and soft AP mode are mutually exclusive and cannot operate at the same time. The support for these modes resides in separate firmware images loaded on the module.
  • Page 78: Scanning For Access Points In Ad Hoc Mode

    RN -W IFLYCR -U M   Turn off DHCP so that the module does not attempt to obtain an IP address from another device, and set the module’s IP address and netmask. Because automatic IP assignment fixes the first two bytes of the IP address, use 255.255.0.0 as the netmask so that other devices connecting to the module can be reached.
  • Page 79: Analog Sensor Capability

    The accuracy of each analog sensor reading can be offset by up to 5% due to variations from chip to chip. To improve accuracy, Roving Networks recommends using a precision reference voltage on one of the analog inputs to calculate the offset.
  • Page 80: Using The Built-In Sensor Power

    RN -W IFLYCR -U M   Using the Built-In Sensor Power The modules contain an on-board sensor power pin, which is controlled by the set q sensor <mask> command. <mask> is a bit mask value that determines which sensor pins to sample when sending data using the UDP broadcast packet or the HTTP auto-sample function.
  • Page 81: Default Configuration

    10 (milliseconds) Idle timer Cmd char DNS PARAMETERS IP address 0.0.0.0 Name dns1 Backup rn.microchip.com Lease 86400 for ad hoc mode only FTP PARAMETERS Server address 0.0.0.0 File wifly_GSX-<version>.img (RN-131), wifly_EZX<version>.img (RN-171) User roving Password Pass123 public www.rovingnetworks.com Version 1.0r 9/21/2012...
  • Page 82: Ip Parameters

    0x1 (SENS0 pin wakes up the device) Auto connect IOfunc 0x0 (No alternate functions) IOmask 0x20F0 (for RN-131) / 0x21F0 (for RN-171) IOvalue Print level 0x1 (Print enabled) Debug Register 0x0 (Unused parameter for future development. Leave at default value)
  • Page 83: Uart Parameters

    Channel 0 (Automatic scan) External antenna 0 (Off - use on-board chip antenna for RN-131 ONLY) Join mode 1 (Automatically scan and join based on SSID) for firmware version 2.36 (ad hoc mode) and lower 0 for firmware version 2.45 (soft AP mode) and higher...
  • Page 84: Restoring Default Configuration Settings

    RN -W IFLYCR -U M   RESTORING DEFAULT CONFIGURATION SETTINGS You can restore the default factory configuration settings in software and hardware. • Software—In command mode, use the factory RESET command to restore the defaults. This command automatically loads the default settings and executes a save command. Next, send the reboot command so that the module reboots with the default configuration.
  • Page 85: Boot-Up Timing Values

    RN -W IFLYCR -U M   BOOT-UP TIMING VALUES Table 31 shows the boot-up timing values. Table 31. Boot-Up Timing Values Function Description Time (ms) Power up Power up time from reset high or power good to boot code loaded. Initialization Initialize ECOS.
  • Page 86: Supported Access Points

    RN -W IFLYCR -U M   SUPPORTED ACCESS POINTS The module should work with any standard access point. Roving Networks has tested the module with the following access points: Cisco Aeronet series • • Linksys (both standard and open WRT Linux) Netgear WGR614 v8 •...
  • Page 87: Command List

    See description Sets the name of the file that is transferred when issuing the ftp u command, where <filename> is the firmware image. Default is wifly_GSX-<version>.img (RN-131) wifly_EZX-<version>.img (RN- 171). set ftp mode <mask> Sets the ftp mode, where <mask> indicates active or passive mode.
  • Page 88 Sets the auto-sleep timer in UDP mode. set sys iofunc <mask> Sets the I/O port alternate functions. set sys mask <mask> 0x20F0 (RN-131) Sets the I/O port direction. 0x21F0 (RN-171) set sys printlvl <value> Controls the debug print messages printed by the WiFly module on the UART.
  • Page 89 RN -W IFLYCR -U M   Command Default Description set wlan auth <value> Sets the authentication mode. set wlan channel <value> <flag> Sets the WLAN channel, where <value> is a decimal number from 1 to 13 representing a fixed channel and <flag> is the optional character i (meaning immediate).
  • Page 90 Table 34. Status Commands Command Description show battery Displays current battery voltage, and is only applicable to Roving Networks’ battery-powered products such as the RN-370 and temperature sensors (ISENSOR-CB). show connection Displays the connection status in the hex format 8<XYZ>.
  • Page 91 RN -W IFLYCR -U M   Table 36. File I/O Commands Command Description del <string> <value> Deletes a file. load <string> Reads in a new configuration file. Displays the files in the system. save <string> Saves the your configuration settings to a file. boot image <value>...
  • Page 92: Known Problems

    Flow control—RTS may fail to de-assert quickly enough for some high-speed CPUs to stop sending data bytes correctly. For high-speed transfers at baud rates greater than 460,800, Roving Networks recommends limiting the RX data to the maximum Ethernet frame (1,460 bytes) and using a protocol to acknowledge that the remote host receives the data.
  • Page 93: Current Firmware Features & Fixes

    You can change the firmware image using the boot image <value> command. After you change the boot image, you MUST reset the module back to the factory defaults using the factory RESET and reboot commands. Wifly_EZX-236.img—Ad hoc mode firmware for RN-171 Wifly_GSX-236.img—Ad hoc mode firmware for RN-131 Wifly_EZX-245.img—Soft AP mode for RN-171 Wifly_GSX-245.img—Soft AP mode for RN-131 •...
  • Page 94: Version 2.30 10/26/2011

    RN -W IFLYCR -U M   VERSION 2.30 10/26/2011 • Added support for incorrect WPA modes, namely WAPv1 with AES encryption and WPAv2 with TKIP encryption. • Added support for WEP shared mode • Increased FTP filename size to 64 bytes Added a new reboot register in ad hoc parameters.
  • Page 95: Version 2.21 07/11/2010

    RN -W IFLYCR -U M   • Fixed a bug in the set uart instant <value> command wherein the WiFly module would not return an AOK over telnet. Now when this command is issued, it returns an AOK over telnet and does not exit command mode. •...
  • Page 96 Roving Networks products are not authorized for use in safety-critical applications Los Gatos, CA 95032 (such as life support) where a failure of the Roving Networks product would +1 (408) 395-5300 reasonably be expected to cause severe personal injury or death, unless officers of www.rovingnetworks.com...

This manual is also suitable for:

Rn-171

Table of Contents