background image

   

www.rovingnetworks.com 

Version 1.0r 9/21/2012

 

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. Capabilities Bit Mask Values 

Bit Mask Value 

Description 

0004 

Short slot time 

0100 

ESS (infrastructure mode) 

0200 

IBSS (ad hoc mode) 

1000 

Privacy (secure with WEP or WPA)  

2000 

Short preamble 

 

Table 26 describes the WPA bit mask values. 

Table 26. WPA Bit Mask Values 

Bit Mask Value 

Description 

04 

WPA_UNICAST_TKIP 

08 

WPA_UNICAST_AES_CCMP 

10 

WPA_BROADCAST_TKIP 

20 

WPA_BROADCAST_AES_CCMP 

 

Table 27 describes the WPS bit mask values. 

Table 27. WPS Bit Mask Values 

Bit Mask Value 

Description 

02 

WPS_PushButton_ACTIVE 

40 

WPS_SUPPORTED 

80 

WPS_PushButton_SUPPORTED 

 

Summary of Contents for RN-131

Page 1: ... www rovingnetworks com 1 RN WIFLYCR UM 01 RN WIFLYCR UM WiFly Command Reference Advanced Features Applications USER MANUAL 2012 Roving Networks All rights reserved RN WIFLYCR UM Version 1 0r 9 21 2012 ...

Page 2: ...the Last Connected Device over TCP 44 View Associated Devices 45 Enable the Link Monitor 45 Route Data between Clients 45 GPIO4 5 6 Alternative Functions 45 Putting the Module to Sleep Waking It 46 System Auto Connect Timers 48 UDP Sleep Connection Timers 48 TCP Connection Timers 49 Opening a TCP Connection 49 Closing the TCP Connection 49 Wake on Sensor Input 49 Wake on UART Activity 50 UART Rece...

Page 3: ...ically when UART Data Is Received 68 Post Binary Data 68 Post Sensor Data Automatically 69 HTML Client Example Posting Sensor Data Automatically 69 HTML Client Example Posting UART Data to a Web server 70 Upgrading Firmware Via FTP 71 FTP Client 72 Connect to an FTP Server 72 Creating Files on the FTP Server 72 Retrieving Files from the FTP Server 73 Wi Fi Protected Setup WPS 73 Launching a WPS Ap...

Page 4: ...T PARAMETERS 83 WLAN PARAMETERS 83 String Variable Sizes 83 Restoring Default Configuration Settings 84 Boot up Timing Values 85 Supported Access Points 86 Command List 87 Known Problems 92 Current Firmware Features Fixes 93 Version 2 36 2 45 9 14 2012 93 Version 2 30 10 26 2011 94 Version 2 27 09 08 11 94 Version 2 23 04 03 2011 94 Version 2 21 07 11 2010 95 Version 2 20 06 14 2010 95 Fixes 95 Fe...

Page 5: ...ature RN 131 RN 171 Output power 18 dBm fixed 12 dBm programmable Lowest power 18 dBm 0 dBm 100 mA Tx current On board antenna Yes No Accurate sleep timer Yes 32 kHz No 10 error GPIO pins available 10 GPIO4 13 GPIO1 3 are not available for use 14 GPIO1 14 Default firmware WiFly_GSX version img WiFly_EZX version img Refer to the RN 131 and the RN 171 data sheets on the Roving Networks website at ht...

Page 6: ...st not send a carriage return cr or line feed after the to enter command mode The module replies with CMD to indicate it is in command mode Once in command mode you can configure the WiFly device using simple ASCII commands each command ends with a carriage return cr Most valid commands return AOK invalid ones return an ERR description To exit command mode send exit cr The module responds with EXI...

Page 7: ...is on the J6 connector Upon power up with GPIO9 high the WiFly module creates an ad hoc network with the following settings SSID WiFly GSX XX where XX is the final two bytes of the devices MAC address Channel 1 DHCP Off IP address 169 254 1 1 Netmask 255 255 0 0 With the ad hoc jumper in place these settings override any saved configuration settings From your computer connect to the WiFly GSX XX n...

Page 8: ...orthand for command keywords For example s uart baudrate 115200 is illegal You can type numbers in decimal e g 115200 or hexadecimal To enter a number in hex use 0x value For example the hex value FF would be entered as 0xFF COMMAND ORGANIZATION There are five general command categories as shown in Table 2 Table 2 Command Types Command Type Description Set commands Set commands take effect immedia...

Page 9: ...the save filename command and you can load them using the load filename command SET COMMANDS These commands begin with the set keyword and include the categories shown in Table 3 Table 3 Set Commands Parameter Description adhoc Controls the ad hoc parameters broadcast Controls the broadcast hello heartbeat UDP message comm Sets the communication and data transfer timers and matching characters dns...

Page 10: ...tbeat UDP message is sent and is specified in seconds The value is a mask that is ANDed with a free running seconds counter if the result is all 0s a packet is sent For example If the interval is 0x1 the module sends one packet every 2 seconds If the interval is 0x2 The module sends two packets every 4 seconds If the interval is 0x3 the module sends one packet every 4 seconds If the interval is 0x...

Page 11: ...nd sets the ASCI string that is sent to the local UART when the TCP port is opened where string is one or more characters up to a maximum of 32 32 bytes If you do not wish to use a string use a zero 0 as the string parameter Default OPEN Example set comm open port open Set the string to port open set comm remote string This command sets the ASCI string that is sent to the remote TCP client when th...

Page 12: ...tes are received Roving Networks recommends that you set this value as large as possible to maximize TCP IP performance NOTE To optimize the link this value is set automatically when the baud rate is set It is assumed that higher baud rates equate to more data hence the flush size is increased Flush size is one of three available methods you use to control TCP IP packet forwarding The other method...

Page 13: ...ections to string where string is up to 32 characters 32 bytes The FTP client uses the backup string to download the firmware via the ftp update command Default rn microchip com Example set dns backup roving2 Set the DNS host name to roving2 set ftp addr address This command sets the FTP server s IP address of the FTP server where address is an IP address in the form value value value value with v...

Page 14: ... the FTP server s remote port number where value is the port number Default 21 Example set ftp remote 25 Sets the FTP server s remote port to 25 set ftp time value The command sets the FTP timeout value where value is a decimal number that is five times the number of seconds required The module uses this timer to close the FTP connection automatically after the specified time Default 200 Example s...

Page 15: ...bles disables DHCP mode where value is a decimal number shown in Table 4 If you set this parameter the module requests and sets the IP address gateway netmask and DNS server upon association with an access point Any previously set IP information is overwritten Table 4 DHCP Modes Mode Protocol 0 Turns DHCP off The module uses its stored static IP address 1 Turns DHCP on The module attempts to obtai...

Page 16: ...ult 0x7 Example set ip flags 0x6 Clear bit 0 set ip gateway address This command sets the gateway 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 gateway IP address is assigned and overwritten when the module associates with the access point Default 0 0 0 0 Example set ip gateway 169 254 1 1 Sets the...

Page 17: ... be able to connect to the WiFly module over TCP IP for example using telnet you must set bit 2 of the IP protocol register For the module to accept both TCP and UDP set bits 1 and 2 value 3 Figure 2 set ip protocol Command Bit Mapped Register Default 2 Example set ip protocol 18 enables TCP and HTTP client mode set ip remote value This command sets the remote host port number where value is a dec...

Page 18: ...e details Figure 4 set opt format Command Bit Mapped Register Default 0x00 Example set opt format 0x7 The module sends sensor values 1 2 3 4 0 Shorten the TCP connect timer use with bit 1 Shorten the TCP connect timer use with bit 0 Forces the module to use DNS first to resolve the IP address even if the host IP is set Reserved Disables remote configuration for security purposes 1 2 3 4 0 Automati...

Page 19: ...iceid my_wifly Sets the device ID to my_wifly set opt password string This command sets the TCP connection password where string is up to 32 bytes long This setting provides minimal authentication by requiring any remote device that connects to the module to send and match the challenge string When a connection is opened the module sends the string PASS to the remote host The remote host must repl...

Page 20: ... broadcast Automatic web posting of sensor data Power is removed immediately after sampling is complete Table 5 set q power Command Sensor Pin Voltage Settings Value Sensor pin voltage 0 Turn off the sensor power 1 Ground the sensor pin 2 1 2 V internal regulated reference 3 VBATT input pin 4 3 3 V output of on board regulator Default 0 Example set q power 0x20 Sets power to 1 2 V automatically up...

Page 21: ... seconds 255 Connect to a stored host IMMEDIATELY upon power up or when waking from sleep and go back to sleep IMMEDIATELY as soon as the TCP connection closes Default 0 Example set sys autoconn 5 The module connects to the host every 5 seconds set sys autosleep value This command sets the auto sleep timer in UDP mode where value is a decimal number If the protocol is set to UDP ONLY this timer ac...

Page 22: ...rinted when the module wakes up or powers up 1 Print all status messages 2 Print only critical network access point connection level status e g Associated or Disconnect from SSID 4 Print the DHCP and IP address status information After you have verified the module s configuration you can turn off this option so that the messages do not interfere with the data 0x4000 Change the scan format output t...

Page 23: ... 5 s after TCP connection closes set sys trigger flag or mask With this parameter setting the module wakes from sleep state using the sensor input 0 1 2 and 3 where flag is a decimal number referring to a bit mapped register as shown in Table 8 and mask is a hex number You use either flag or mask with this parameter setting This command sets the sensor input s to wake on 0 to 3 Setting flag to 0 d...

Page 24: ...tes can be set ONLY for the GPIO pins that are set as outputs Setting the value to 1 makes the default power up state high setting the value to 0 makes the default power up state low To configure GPIO pins as outputs use the set sys mask value command NOTE GPIO pins 4 5 and 6 are used by the firmware to blink the status LEDs To set the default power up states for these GPIO pins you must first dis...

Page 25: ...ks at 32 768 Hz Default None Example set time raw 1 Set to 1 second set uart baud value This command sets the UART baud rate where value is 2400 4800 9600 19200 38400 57600 115200 230400 460800 or 921600 NOTE The RN 134 evaluation board s RS 232 interface cannot exceed 230 400 baud Default 9600 Example set uart baud 19200 Sets the baud rate to 19 200 baud set uart flow value This command sets the ...

Page 26: ...ue the first character Default Not applicable Example set uart instant 19200 Sets the baud rate to 19 200 baud set uart mode mask This command sets the UART mode register where mask is a hex number masking a bit mapped value as shown in Figure 5 Figure 5 set uart mode Command Bit Mapped Register Notes 1 With firmware version 2 27 and higher bit 4 s functionality has changed When a TCP connection i...

Page 27: ...hows the supported raw baud rates Table 10 Supported Raw Baud Rates Raw Baud Rate Comment 458 333 This is 460 800 500 000 Raw baud rate 550 000 Raw baud rate 611 111 Raw baud rate 687 599 Raw baud rate 785 714 Raw baud rate 916 667 This is 921 600 1 100 000 Raw baud rate Default Not applicable Example set uart raw 7200 Sets the baud rate to 7 200 baud set uart tx value This command disables or ena...

Page 28: ...ess point and automatically selects the authentication mode The firmware supports he following security modes WEP 64 and WEP 128 open mode only NOT shared mode WPA2 PSK AES only WPA1 PSK TKIP only WPA PSK mixed mode some access points not all are supported Table 11 set wlan auth Command Authentication Modes Value Authentication Mode 0 Open Default 1 WEP 128 2 WPA1 3 Mixed WPA1 and WPA2 PSK 4 WPA2 ...

Page 29: ...set wlan channel 2 Set the WLAN channel to 2 Example 2 set wlan channel 1 i set wlan join 7 set ip address 1 2 3 4 set ip gateway 1 2 3 4 set ip netmask 255 255 255 0 set ip dhcp 4 Use DHCP server join SSID Module goes into AP mode set wlan ext_antenna value This commands determines which antenna is active where value is 0 use the chip antenna or 1 use the U FL connector Only one antenna is active...

Page 30: ... using stored SSID IP address and netmask You MUST set the channel Unless another ad hoc device can act as DHCP server set DHCP to 0 static IP or use automatic IP You can use this policy instead of the hardware jumper to create a custom ad hoc network 7 Create a soft AP network using stored the SSID IP address netmask channel etc This mode applies only to firmware versions supporting soft AP mode ...

Page 31: ...way to detect that an access point is no longer present until it becomes available again if ever Default 0 disabled Example set wlan linkmon 5 Set the number of scan attempts to 5 set wlan mask mask This command sets the WLAN channel mask which is used for scanning channels with auto join policy 1 or 2 where mask is a hex number bit 0 channel 1 Reducing the number of channels scanned for associati...

Page 32: ... 24 default 13 36 14 48 15 54 Default 12 Example set wlan rate 13 Set the data rate to 36 Mbits second set wlan ssid string This command sets the SSID with which the module associates where string is 1 to 32 characters 32 bytes NOTE string cannot contain spaces If the SSID has spaces use the character to indicate the space For example yellow brick road becomes yellow brick road When you use the ge...

Page 33: ...lan tx 11 Set the TX power to 11 dBm GET COMMANDS These commands begin with the keyword get and they display the module s current values Except where noted the get commands do not have any parameters get adhoc This command displays the ad hoc settings Example get adhoc Show ad hoc settings get broadcast This command displays the broadcast UPD address port and interval Example get broadcast Show br...

Page 34: ...ess Example get mac Show the MAC address get option This command displays the optional settings such as the device ID Example get option Show the optional settings get sys This command displays the system settings sleep and wake timers etc Example get sys Show the system settings get time This command displays the time server UDP address and port number Example get time Show the time server inform...

Page 35: ...ction This command displays the connection status in the hex format 8 XYZ where 8 XYZ is a bit mapped register providing the information shown in Figure 6 Figure 6 show connection Command Bit Mapped Register show io This command displays the GPIO pins level status in the hex format 8 ABC For example 8103 indicates GPIO 0 1 and 8 are high Example show io Show the GPIO level status show net char The...

Page 36: ...mask This command displays multiple analog interface values simultaneously where mask is a bit mask representing the channels For example to read channels 0 1 and 7 use the command show q 0x183 The module returns 8 chan0 8 chan1 8 chan7 NOTE If a web post or UDP broadcast samples the data the data is shifted as described in UDP Broadcast on page 62 Example show q 0x183 Show values for channel 0 1 ...

Page 37: ... module treats them as data and passes them over the TCP or UDP socket and the module will not enter command mode If you want to use different characters to enter command mode not you can set the character to use with the set comm char command Example Enter command mode close This command disconnects a TCP connection Example close Close the TCP connection exit This command exits command mode After...

Page 38: ...in value Use this command to join a network that is shown in the scan list where value is the entry number listed for the network in the scan list If network is security enabled you must set the passphrase with the set wlan phrase command prior to issuing the join command Example join 1 Join the network indicated by a 1 in the scan list leave This command disconnects the module from the access poi...

Page 39: ...odule sends 1 packet The optional value sends value pings at 10 per second Table 14 ping Command Parameter Options Option Description g This option pings the gateway The gateway IP address is loaded if DHCP is turned on otherwise you must set it using the set ip gateway address command h This option pings the stored host IP address You can set the host IP address using the set ip host address comm...

Page 40: ...ep You can wake the module by sending characters over the UART or by using the wake timer Example sleep Put the module to sleep time This command sets the real time clock by synchronizing with the time server specified with the time server set time parameters This command sends a UDP time server request packet Example time Set the real time clock FILE I O COMMANDS You use the file I O commands to ...

Page 41: ...e 55 Set the new boot image to a file represented by file name 55 NOTE After changing the boot pointer to the new image you must reboot the module to boot up with the new image After the module boots up with new image you must perform a factory reset on the module to initialize all the parameters to the factory default settings Then you can reinitialize the parameters as required ftp update string...

Page 42: ...releases unlike ad hoc which is an open mode The module supports routing between clients Before enabling AP mode you must load the firmware that supports it By default Roving Networks modules are shipped with firmware version 2 36 You must change the boot image to version 2 45 to use AP mode You change the module s firmware image using the boot image value command After you change the boot image y...

Page 43: ... to see the module when they scan for access points NOTE Roving Networks recommends setting the WiFly module as the gateway when creating a point to point network between devices Wi Fi network only If devices such as smartphones and tablets iPads Android tablets etc with a WAN connection associate to the soft AP network Roving Networks recommends setting the gateway to 0 This setting lets these sm...

Page 44: ...xample output from the show lease command Figure 7 Show Lease Command Example Output 2 42 show lease 1 2 3 10 f0 cb a1 2b 63 59 153 1 2 3 11 00 00 00 00 00 00 0 1 2 3 12 00 00 00 00 00 00 0 1 2 3 13 00 00 00 00 00 00 0 1 2 3 14 00 00 00 00 00 00 0 1 2 3 15 00 00 00 00 00 00 0 1 2 3 16 00 00 00 00 00 00 0 2 42 NOTE In AP mode the module can assign a DHCP lease to 7 clients However not all clients r...

Page 45: ...re received from an associated device When the timer expires the AP module de authenticates the client s 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 Route Data between Clients AP mode supports ...

Page 46: ...e this feature use the set sys trigger 0x20 command setting Table 18 describes the methods for waking the module Table 18 Methods for Waking the Module Method Interface Description Sensor input 1 2 V DC only Sensor pins You can wake the module using sensor pins 0 3 1 2 V DC ONLY Use the set sys trigger value command to enable the sensors Rx pin 3 3 V DC only RX pin via sensor 0 The RX pin on the R...

Page 47: ...dule to output Vbat or 3 3 V or 1 2 V on the sensor power pin when it wakes from sleep indicating it is ready to accept data After the module wakes you can open a TCP connection to a remote host in a number of ways as described in Table 20 You set the remote host using the following commands set ip host address OR set dns name string Sets the host s IP address OR URL set ip remote value Sets the p...

Page 48: ...e timer counts down to 0 The sleep timer is disabled if the module has an IP connection or is in command mode For example if you want the module to wake up join a network and be available to accept TCP connections for 30 seconds every 2 minutes you would set the timers as shown in the following example set wlan ssid my_net Set the host name set wlan passphrase my_pass Set the passphrase set sys sl...

Page 49: ...connection is closed The default 0 disables the timer NOTE You must specify the remote host s IP address and port number in the module s configuration file for the auto connect timer to work Closing the TCP Connection The module supports a disconnect timer in both TCP client and server mode default mode You can use this timer to close a TCP connection automatically after a specified number of seco...

Page 50: ...n RX and CTS using a 3 3 V signal NOTE Do not apply 3 3 V directly to SENSE0 and SENSE1 the voltage on any sensor input CANNOT exceed 1 2 V DC or the module will be permanently damaged To enable wake on RXD use the set sys trig 1 command It should be noted that the first or possibly multiple byte sent to the module will likely be lost therefore you should take care to send a preamble byte to wake ...

Page 51: ...w control if the packets are uniform and you use an application protocol to ensure that the packet data is delivered on the remote side before the next packet is sent However given the uncertainty of packet delays in a TCP IP network and the affects of interference and retries inherent in wireless networks flow control is typically required whenever large contiguous quantities of data are being wr...

Page 52: ...tor and cannot be turned off The RN 174 evaluation board s blue LED is connected to GPIO7 which is output by default The board does not drive this because GPIO7 s default power up state is low The get sys command shows the setting of the GPIO mask as shown in the following example 2 21 get sys SleepTmr IoFunc 0x0 IoMask 0x21f0 Figure 10 shows the bits corresponding to the GPIO pins and Table 22 sh...

Page 53: ...r up and goes low when the system is ready If hardware flow control is enabled this pin toggles to high to indicate the RX buffer is full 14 GPIO14 N A Input NOTE On the Wi Fi serial adapter RN 370 and the RN 174 evaluation board the blue LED is connected to GPIO7 The blue LED is NOT connected to GPIO7 on the RN 134 board It is not possible to power off the blue LED on the RN 134 board because it ...

Page 54: ... status of the TCP IP connection To monitor and control the module s connection status enable the alternate function of GPIO4 6 Using the alternate function for these GPIO pins the module connects to the stored remote host IP address and port when GPIO5 is driven high and disconnects when driven low You can monitor the TCP IP connection status by reading GPIO6 it is high when connected and low whe...

Page 55: ...The WiFly module is instructed to open a TCP IP connection to the stored remote host Event The WiFly module successfully opens the TCP connection to the stored remote host This signal instructs the microprocessor that it is OK to open a TCP connection Event the microprocessor wants to open a TCP connection to the stored remote host This signal instructs the microprocessor that the TCP connection i...

Page 56: ...delimited scan output format which a microprocessor can use to parse the RSSI information The scan command output format is Index Channel RSSI Security Mode Capabilities WPA Configuration WPS Mode MAC address SSID Where Field Value Index 2 character decimal Channel 2 character decimal RSSI 2 character decimal negative number Security mode 2 bytes see Table 24 Capabilities Bit mapped 4 hex bytes se...

Page 57: ...it Mask Values Bit Mask Value Description 0004 Short slot time 0100 ESS infrastructure mode 0200 IBSS ad hoc mode 1000 Privacy secure with WEP or WPA 2000 Short preamble Table 26 describes the WPA bit mask values Table 26 WPA Bit Mask Values Bit Mask Value Description 04 WPA_UNICAST_TKIP 08 WPA_UNICAST_AES_CCMP 10 WPA_BROADCAST_TKIP 20 WPA_BROADCAST_AES_CCMP Table 27 describes the WPS bit mask val...

Page 58: ... WPA PSK WPA2 PSK WPA Enterprise WPA2 Enterprise Code 0 1 2 4 6 8 UART Heartbeat Messages In firmware version 2 22 and higher the module can output UART heartbeat messages The bit mapped message is output periodically while the module is in data mode and not connected to a remote host Messages are not output while in command mode The heartbeat message encodes the module s state for the embedded mi...

Page 59: ...e show time command to see the current time and uptime as shown below 2 23 show t Time 08 43 10 UpTime 10 s To set the time use the time command 2 23 show t Time NOT SET UpTime 8 s 2 23 time 2 23 show t Time 08 51 31 UpTime 15 s NOTE The module must be associated with a network for the module to contact the sNTP server Tthe module can also be configured to get the time whenever it powers up using ...

Page 60: ... stamp bits from MSB to LSB are User s TCP or UDP packet data 63 56 55 48 47 40 39 32 31 24 23 16 15 8 7 0 The 8 bytes represents the 64 bit raw value of the real time clock register The data is appended before calculating the TCP checksum so that the data passes through the TCP stack correctly This register counts at 32 768 Hz If the timeserver function is enabled the RTC should accurately reflec...

Page 61: ...enable UDP data transfer Example Associate with a Network set wlan ssid string Set the network name set wlan phrase string Set the passphrase for WPA and WPA2 modes Example Set Up the Protocol Port Number set ip proto 1 Enable UDP as the protocol set ip host address Set the remote host s IP address set ip remote value Set the remote port on which the host listens set ip local value Set the port nu...

Page 62: ...ive and wants to stay associated Applications can use this feature to automatically discover and configure the module If an application is listening for the UDP broadcast a number of useful parameters are present in the package that can be used for auto discovery For example the module s IP address and port number are part of the packet thus an application can connect to the module and remotely co...

Page 63: ...efault baud rate is 9 600 8 bits and no parity To configure using ad hoc mode refer to Ad hoc Networking Mode on page 77 Once in ad hoc mode open a telnet window using the IP address 169 254 1 1 port 2000 Associate with an Access Point From within the terminal window put the module into command mode by typing The module responds with CMD indication that it is in command mode Type show net to displ...

Page 64: ...cessfully it stores the access point s SSID You can save the SSID and the pass phrase to the configuration file so that the module can associate with the access point each time it boots Making Connections To connect to the module open an IP socket and connect to the module s IP address You can use telnet to test the connection type open address port in a telnet window After the connection is open ...

Page 65: ...can also use ad hoc mode autojoin 4 however there will be a delay connecting to the ad hoc network from the remote computer Therefore make the sleep timer large enough to allow the network to get set up and the auto connect to establish a TCP connection Example Automatic Connection set ip host address Set up the remote machine s IP address set ip remote_port value Set up the remote machine s IP po...

Page 66: ...ails or is not set the module uses the backup DNS name if set Example Set the Backup IP Address set ip backup address Set the backup IP address Example Set the Backup DNS Name set dns backup string Set the backup host name USING THE HTML CLIENT FEATURE The module has a built in HTML client When enabled the module can get or post data to a web server For example you can use the HTML client to post ...

Page 67: ...r Refer to the set opt format flag command on page 18 for the bit function descriptions Table 29 describes the wake reason values Table 29 Wake Reason Values Value Wake Reason 0 Undefined 1 Power on or hardware reset battery install or power up 2 Sleep wake when the sleep timer is expired 3 Sensor 4 Undefined 5 Button RN 370 serial adapter only 6 Software reboot 7 Watchdog Example HTML Client Mode...

Page 68: ...ue e g set comm time 5000 By default it is set to 10 ms Example Connect to Web Server when UART Data Is Received set ip proto 18 Turn on HTTP mode 0x10 and TCP mode 0x2 set dns name www webserver com Set the web server name set ip host 0 Turn on DNS set ip remote 80 Set the web server port 80 is standard set com remote GET userprog php DATA Sample server application set uart mode 2 Automatically c...

Page 69: ...serprog php DATA Sample server application set q sensor 0xff The module samples all 8 sensor channels set sys auto 30 Connect every 30 seconds set option format 7 Send the header plus the sampled binary data converted to ASCII format The resulting string sent to the server is GET userprog php DATA 0F3000001111222233334444555566667777 n n The data format for this example is 2 Bytes GPIO Channel 0 C...

Page 70: ...nnects and sends data to the web server in the following format GET server php value user serial data n n Use the following commands to set the parameters set ip proto 18 Turn on HTTP mode 0x10 and TCP mode 0x2set dns name www rovingnetworks com Set the web server name set ip host 0 Turn on DNS set ip remote 80 Set the web server port 80 is standard set com remote GET server3 php value Set up the ...

Page 71: ...to store data files 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 FTP username roving FTP password Pass123 FTP filename wifly_GSX version img...

Page 72: ...ameters to the factory default settings Then you can reinitialize the parameters as required FTP CLIENT In addition to downloading firmware via FTP with firmware version 2 22 and higher the module can get and put files to an FTP server 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 ...

Page 73: ...and passes the file over the UART interface as the file is being transferred To retrieve a file from the FTP server issue the ftp get filename command The module prints the open string on the UART and the file begins transferring from the FTP serer to the module When the file transfer complete the module prints the close string indicating the file is transferred and the FTP connection is closed Ex...

Page 74: ...on 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 NOTE Modules that ship with firmware version 2 28 or higher already have the WPS application You can confirm whether your module has the application using the ls command See Figure 18 Figure 18 Confirming WPS Application is Instal...

Page 75: ...on the RN 134 and RN 174 boards When this LED flashes indicating the module is scanning for a WPS enabled access point you should drive GPIO9 low By default the WPS code prints messages on the UART as it scans channels detects access points and tries to complete WPS You can disable these messages using the set sys print 0 command Status LEDs during WPS Process In WPS mode the LEDs indicate activit...

Page 76: ...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 See Figure 20 Figure 20 Scan Showing Access Points in WPS Active Mode ...

Page 77: ...these modes resides in separate firmware images loaded on the module By default Roving Networks modules are shipped with the ad hoc mode image to maintain backwards compatibility with existing applications Refer to Access Point AP Mode on page 42 for more information on AP mode Configuring Ad Hoc Mode You can configure the module to setup an ad hoc network This mode is useful for point to point co...

Page 78: ...explicitly assign the IP address set ip dhcp 0 set ip address 169 254 1 2 You can confirm that the device has properly associated with the ad hoc network using the ping keyword ping 169 254 1 1 10 You can associate with the ad hoc network from a computer by specifying the network name and password if required in the operating system For example choose Control Panel Networking and Sharing Networkin...

Page 79: ...0 8 channel 1 8 channel 7 r n The analog input hardware specification is Input voltage range 0 1 2 V however the analog to digital converter saturates at 400 mV Resolution 14 bits 12 uV Sampling frequency 35 us Accuracy 5 un calibrated 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 preci...

Page 80: ...le when sending data using the UDP broadcast packet or the HTTP auto sample function See set q sensor mask on page 19 for more details NOTE In versions of firmware prior to 2 23 this command is named set option sensor Firmware versions 2 23 and higher support the set q power value command This command sets an 8 bit register with two 4 bit nibbles that automatically turns on the sensor power See se...

Page 81: ...sed parameter for future development Leave at default value BROADCAST PARAMETERS IP address 255 255 255 255 Port 55555 Interval 7 seconds COMM PARAMETERS Close string OPEN Open string CLOS Remote string HELLO Flush size 64 Match character 0 Flush timer 10 milliseconds Idle timer 0 Cmd char DNS PARAMETERS IP address 0 0 0 0 Name dns1 Backup rn microchip com Lease 86400 for ad hoc mode only FTP PARA...

Page 82: ...y GSX Join timer WPA timer 1000 Replacement char 0x24 Format 0x00 Password no password enforced Signal 0 Average 5 SYSTEM PARAMETERS Sleep timer 0 Wake timer 0 Trigger 0x1 SENS0 pin wakes up the device Auto connect 0 IOfunc 0x0 No alternate functions IOmask 0x20F0 for RN 131 0x21F0 for RN 171 IOvalue 0x0 Print level 0x1 Print enabled Debug Register 0x0 Unused parameter for future development Leave...

Page 83: ...0 for firmware version 2 45 soft AP mode and higher Authentication mode OPEN Mask 0x1FFF All channels Rate 12 24 Mbit Linkmon 0 Passphrase rubygirl TX Power 0 which implies 12 dBm Applicable to RN 171 module only STRING VARIABLE SIZES Table 30 provides the string variable sizes for the following parameters Table 30 String Variable Sizes Parameter Value Bytes FTP Parameters file 32 user 16 pass 16 ...

Page 84: ...ecify a user configuration file as the factory reset settings Prior to this firmware version only the hardcoded factory defaults would be restored If you have stored a configuration file named user the module reads it as the factory default instead of using the factory hardcoded defaults If no user configuration file is present the module uses the hardcoded factory defaults You create the user con...

Page 85: ...oaded 70 Initialization Initialize ECOS 50 Ready Load configuration and Initialize application 30 Join Associate using channel 0 full channel scan mask 0x1FFF 80 Associate using channel 0 primary channel scan mask 0x421 15 Associate using channel X fixed channel 5 20 Authentication Authenticate using WPA1 or WPA2 highly dependent on access point response 50 250 Aquire IP DHCP obtain IP address hig...

Page 86: ... standard and open WRT Linux Netgear WGR614 v8 Netgear WGN54 DLINK dir 615 Airlink 101 Apple Airport express Buffalo networks Ad hoc mode Apple iPhone Microsoft Windows PC with XP Vista Ubuntu Linux Access points that are set to MIXED mode WPA1 and WPA2 may cause problems during association because some of them incorrectly report their security mode Roving Networks currently does not support WPA2 ...

Page 87: ...aracter in hex or decimal set comm size value 64 Sets the flush size in bytes set comm time value 10 Sets the flush timer set dns address address 0 0 0 0 Sets the IP address of the DNS sever set dns name string server1 Sets the name of the host for TCP IP connections to string set dns backup string rn microchip com Sets the name of the backup host for TCP IP connections to string set ftp addr addr...

Page 88: ...sleep timer in UDP mode set sys iofunc mask 0x0 Sets the I O port alternate functions set sys mask mask 0x20F0 RN 131 0x21F0 RN 171 Sets the I O port direction set sys printlvl value 0x1 Controls the debug print messages printed by the WiFly module on the UART set sys output mask mask None sets the output GPIO pins high or low The optional mask sets a subset of the pins set sys sleep value 0 Sets ...

Page 89: ... is used for scanning channels with auto join policy 1 or 2 set wlan phrase string rubygirl Sets the passphrase for WPA and WPA2 security modes set wlan rate value 12 Sets the wireless data rate set wlan ssid string roving1 Sets the SSID with which the module associates set wlan tx value 0 Sets the Wi Fi transmit power where value is a decimal number from 1 to 12 that corresponds to 1 to 12 dBm Ta...

Page 90: ...e close Disconnects a TCP connection exit Exits command mode factory RESET Loads the factory defaults into the module s RAM and writes the settings to the standard configuration file You must type the word RESET in capital letters join string Instructs the WiFly module to join the network indicated by string join value Use this command to join a network that is shown in the scan list where value i...

Page 91: ... file load string Reads in a new configuration file ls Displays the files in the system save string Saves the your configuration settings to a file boot image value Makes a file represented by value the new boot image ftp update string Deletes the backup image file retrieves a new image file and updates the boot pointer to the new image ...

Page 92: ...trol 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: ...s compatibility In version 2 45 auto join is disabled and you must explicitly enable auto join mode using the set wlan join 1 command The firmware now supports parity with the set uart flow command Added the i flag to the set wlan channel command which changes the channel immediately You can use this feature to go into AP mode without having to reboot or save the settings In AP mode de authenticat...

Page 94: ...tra data would be added to FTP put file data This has been fixed in version 2 28 Fixed a bug where if the TCP_CLIENT mode is set the module would randomly attempt outgoing connections Fixed a bug in FTP data write mode whereby sometimes the OPEN status string came back over the UART before the file transfer was actually ready This fix also improves the speed of FTP open in write mode such that the...

Page 95: ...ng it impossible to enter a 32 byte HEX literal PSK Fixed DHCP status when link to Access Point AP is lost It was still reporting DHCP OK It is now cleared and new DHCP session will start once AP link is reestablished Fixed a bug whereby UDP receive becomes disabled no packets are received if AP LOST and then re established Improved handling of AP disconnect and AP link lost due to linkmon timeout...

Page 96: ...n the latest relevant information before placing orders and should verify that such information is current and complete Roving Networks assumes no liability for applications assistance or customer s product design Customers are responsible for their products and applications which use Roving Networks components To minimize customer product risks customers should provide adequate design and operati...

Reviews: