Home
WiFly Serial Adapter User Manual
Contents
1. Restart using the new configuration You can now test this configuration using telnet on a computer sharing the same network as the WiFly serial adapter www rovingnetworks com 11 B AOU Nt DET SERIAL CONNECTOR SPECIFICATION The WiFly serial adapters have male or female DB9 connectors Refer to Figure 5 and Table 3 for the pin out Figure 5 DB9 Connector Pins 1 5 QOOQOQ0 21081010 6 9 Table 3 DB9 Connector Pin Out I9 4 12 VDC 4 12 VDC NOTE The RS 232 interface uses the SIPEX SP3232ECA chip with capacitor switch to generate the and signals therefore it is not driving the full RS 232 voltages Devices stealing power from the RS 232 pins may not have enough voltage RESOURCES amp RELATED DOCUMENTS For more information refer to the following sources which are available on the Support page on the Roving Networks website at http www rovingnetworks com support php e RN 171 Data Sheet e RN 151 Data Sheet e Advanced User Manual e WiIFly Training Presentation e Drivers tools and utilities www rovingnetworks com RN WIFLY SRL UM 1 0 12 RN WIFLY SRL UM 1 0 BY AOU IE APPENDIX A NULL MODEM amp FLOW CONTROL JUMPERS You can configure the adapters serial interface to enable flow control and null modem signaling You access the jumper block by removing the cover from the WiFly serial adapter Figure 6 shows the jumper setting for various signals WARNING Flow
2. TON oe WiFly Serial Adapter 2011 Roving Networks All rights reserved RN WIFLY SRL UM 1 0 Version 1 0 11 11 2011 U S E R M A N U A L RN WIFLY SRL UM 1 0 BY AOU Nt DET OVERVIEW The Roving Networks Wi Fi serial adapters supply a serial to Wi Fi bridge providing wireless connectivity to any legacy system that supports serial communication Connected to a remote host the adapters transfer data read or written to the serial interface to a remote application such as an iPhone app data logger or PC control console The adapters support Wi Fi infrastructures or ad hoc networking which allows you to use existing low cost wireless connectivity while remotely connecting to any WiFly serial adapter in the world Because Apple iOS devices require an additional Bluetooth authorization co processor for any and all devices connecting to the iPhone using the Wi Fi serial adapter in ad hoc mode is a simple cost effective way to connect to iPhone apps The WiFly serial adapters are more than a cable replacement solution by allowing TCP IP sockets applications can control and monitor hundreds of Wi Fi serial adapters remotely distributed across a building LAN or campus WAN The adapters also support other usage modes For example when configured in auto connect mode the WiFly serial adapter connects to a pre stored IP address whenever data is written to the serial port The adapter can also be programmed to sleep automatically when idle and
3. 0 so that other devices connecting to the module can be reached You can also set the netmask to a smaller subnet if the other device s IP addresses begin statically at the same subnet as the ad hoc device set ip address 169 254 1 1 set ip netmask 255 255 0 0 set ip dhcp O save your configuration Upon rebooting the adapter is in ad hoc mode To associate with the WiFly serial adapter from an iPhone smartphone or computer open the dialog box or window that shows the available networks On the iPhone touch the Settings icon For Microsoft Windows go to the Control Panel Networking and Sharing Networking and Sharing Center dialog box Find the name of the adapter s ad hoc network in the list of available networks and select it to associate NOTE Once associated with the ad hoc network because there probably is no active DHCP server the adapter automatically assigns an IP address This process may take a few minutes to allocate an IP address for your computer To work around it you can assign a static IP address in the Network settings TCP IP Properties menu After the iPhone smartphone or computer is associated with the ad hoc network you can open a connection or telnet window as you would with an infrastructure mode connection NOTE The adapter does not support ad hoc and infrastructure modes simultaneously Connection Modes Two common operational modes are initiating a connection to a server and listening for a rem
4. LEDS The adapters have green red and blue status LEDs see Table 1 The blue LED blinks when data is sent or received on the serial interface it does not indicate that the data was sent over the WiFi connection If the blue LED is not flashing and your device is sending data to the serial port you likely have a connection incorrect baud rate or hardware flow control RTS CTS problem When using switch 1 to enable ad hoc mode after power up all LEDs blink in succession from green to blue This blinking does not occur when you set up ad hoc mode through software There is an additional red LED near the power connector that indicates external power is present at either the power plug or the DB9 connector Table 1 LED Indicators State Green LED Red LED Blue LED Fast blink No IP address or configuration mode Not associated Rx Tx data transfer Slow blink IP address OK Associated no Internet ee www rovingnetworks com 3 RN WIFLY SRL UM 1 0 BY AOU DET CONFIGURATION SWITCHES The adapters have small configuration switches on the top You need a paper clip or small screwdriver to flip them Holding the adapter with the DB9 connector facing to the right refer to Figure 1 for the switch numbering and on off positions Figure 1 Switches RN 370 RN 340 4321 TIE On Switch 1 is used for ad hoc mode and for restoring factory defaults With this switch turned on the device powers up in ad hoc mode The ad hoc network
5. control signals are NOT RS 232 signaling tolerant If you enable these signals with the jumpers do not exceed 3 3 V DC or permanent damage can occur Figure 6 Jumpers Male DB9 Default Configuration Male DB9 Null Modem Jumper l lt gt 2 3 lt gt 4 Jumper 2 lt gt 4 1 lt gt 3 Female DB9 Default Configuration Female DB9 Null Modem Jumper2 lt gt 4 1 lt gt 3 Jumper l lt gt 2 3 lt gt 4 Drive DSR on Pin 6 of the Male DB9 Drive DTR on Pin 4 of the Male DB9 Jumper 5 lt gt 6 Jumper 7 lt gt 8 Drive DCD on Pin 1 of the Male DB9 Jumper 9 10 www rovingnetworks com 13 Roving Networks Inc 102 Cooper Court Los Gatos CA 95032 1 408 395 5300 www rovingnetworks com www rovingnetworks com 82 1 MOULE NETWORKS RN WIFLY SRL UM 1 Copyright O 2011 Roving Networks All rights reserved Roving Networks is a registered trademark of Roving Networks Apple Inc iPhone iPad iTunes Made for iPhone are registered trademarks of Apple Computer Roving Networks reserves the right to make corrections modifications and other changes to its products documentation and services at any time Customers should obtain 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
6. only makes one attempt to auto connect Set the wake up and sleep conditions By default the serial adapter wakes up whenever data is written to the serial interface You can also configure the device to wake up on CTS on a PIO or timer See the WiFly Advanced User Manual for details In the following example the adapter wakes up on a timer and then sleeps after 2 minutes if there Is no connection or if It is connected and no data has been transferred for 30 seconds set sys sleep 120 Sleep after 2 minutes if no connection set sys trigger 2 Wake on CTS set conn idle 30 Disconnect after 30 seconds of no data save Save all the settings to the configuration file reboot Use the new settings You can test this setup using a TCP server application that opens a socket on port 3000 Port Peeker is a free application that you can use to test the setup It is available at http www linklogger com portpeeker htm Waiting for the Remote Host to Connect to the Adapter Listen Mode In this example the adapter has a static IP address so that the remote host knows where the adapter is on the network Alternatively you can write your application software to listen for the broadcast UDP packet automatically sent by the adapter by default to identify the adapter and obtain the IP address and TCP port number on which the adapter is listening Perform the following steps in command mode l Set the wlan properties so that the devic
7. phrase or key using the set wlan hide command To show the pass phrase or key simply reset it Ad Hoc Setup You can configure the WIFly serial adapter for ad hoc networks via hardware or software commands In ad hoc mode the adapter looks like access point with which other WiFi devices can associate and open connections to the WiFly serial adapter NOTE Currently the adapters only support the OPEN mode for creating ad hoc networks www rovingnetworks com 8 RN WIFLY SRL UM 1 0 BY AOU Nt DET Enable Ad Hoc Mode via Hardware To enable ad hoc mode via hardware turn switch 1 on refer back to Figure 1 On power up the LEDS blink in sequence and an ad hoc network is created with the following settings SSID WIFly GSX XX where XX is the final two bytes of the adapter s MAC address Channel 1 DHCP OFF IP address 169 254 1 1 Netmask 255 255 0 0 NOTE When switch 1 is turned on these settings override any other configuration settings Enable Ad Hoc Mode via Software To enable ad hoc mode using software configuration enter into command mode and set the join mode SSID and channel as shown in the following commands set wlan join 4 set wlan ssid lt my ad hoc network gt set wlan chan 1 Turn off DHCP so that the module does not attempt to obtain an IP address from another source and set the IP address and netmask Because automatic IP assignment fixes the first two bytes of the IP address use a netmask of 255 255 0
8. receiving data to the host is transparent to the end microprocessor oee Figure 2 Figure 2 Data amp Command Modes User Data BEK ow gt 955 Command Mode By default the module is in data mode Sending the escape sequence causes the module to enter command mode Once in command mode you can configure the WiFly device using simple ASCII commands To exit command mode and return to data mode type exit cr Basic configuration only requires the wireless network access point s name SSID and authentication password The WiFly module can only associate with one network at a time Roving Networks recommends that you begin your evaluation by configuring the WiFly module using an open access point to simplify the setup There are two ways to configure the WiFly module e Overthe UART which is connected to a computer or microprocessor e Via Wi Fi using ad hoc networking You need a terminal emulator to complete the setup NOTE Roving Networks suggests using either the TeraTerm Windows OS or CoolTerm Mac OS X terminal emulator program Configuration Using the RS 232 Serial Interface You can configure the WiFly serial adapter by using a USB to serial cable or by plugging it directly into your computer s serial port The following instructions describe how to use a terminal emulator to go into configuration mode send commands to find networks associate with an access point and save your configuration www rovingn
9. wake up based on a time delay UART RX data or CTS signal state change POWERING THE WIFLY SERIAL ADAPTER The RN 340 and RN 370 serial adapters have different powering capabilities the RN 340 uses a DC power source while the RN 3 0 uses either batteries or a DC power source Powering the RN 340 Adapter The RN 340 adapter has a built in voltage regulator and can be powered from a 4 to 12 V DC power source You can also power the RN 340 adapter using pin 9 of a DB9 connector Powering the RN 370 Adapter You can power the RN 370 adapter using rechargeable batteries or the external power connector The adapter has a red button on it s top which is a soft on off switch WARNING Do NOT use alkaline batteries when connecting the external power connector to the adapter otherwise the alkaline batteries will leak and damage the serial adapter Turning the Adapter On amp Off To turn the adapter on press the red button for 1 second and then release it The green yellow red and blue LEDs flash in succession After a moment the blue and yellow LEDs go off and the red and green LEDs remain flashing To turn the adapter off press the red button for 1 second and then release it The green yellow red and blue LEDs flash in succession several times Then all LEDs turn off and the device is in sleep mode By default the adapter automatically shuts off if it is not connected for more than 3 minutes i e 180 seconds You can control t
10. Networks components To minimize customer product risks customers should provide adequate design and operating safeguards Roving Networks products are not authorized for use in safety critical applications such as life support where a failure of the Roving Networks product would reasonably be expected to cause severe personal injury or death unless officers of the parties have executed an agreement specifically governing such use 0 14 Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery amp Lifecycle Information Roving Networks RN 340M S
11. apter is making connections to a server and uploading data In the point to point setup the adapter is connected via ad hoc mode to an iPhone smartphone or laptop computer to download the data or control a remote device through the serial interface Infrastructure Network Setup From command mode you can view available networks associate with a network and see status of the network connection To find all available networks use the scan command If the access point you want to associate with is running in open mode no security you can use the join lt my network gt command to associate with it If the access point is secure you must set the pass phrase WPA modes or key WEP modes prior to issuing the join command You do not need to set the authentication mode because the adapter determines the security protocol automatically To set the pass phrase for WPA modes use the command set wlan phrase lt string gt For WEP modes set the key using the set wlan key lt num gt command To configure the adapter to remember the network use the command set wlan ssid my network and save the SSID and pass phrase or key to the configuration file using the save command When the device next powers up it uses the saved network information to associate with the network The following commands show an example set wlan ssid my network set wlan phrase ny secret code save reboot NOTE For security purposes you may wish to hide the pass
12. dditionally you can use shorthand for the parameters For example the following commands are equivalent e set uart baudrate 115200 e set uart b 115200 e setub 15200 NOTE You cannot use shorthand for command keywords For example s uart baudrate 115200 is illegal The WiFly module supports a variety of command keywords The Advanced User Manual which is available on the Support page of the Roving Networks website provides a complete command reference For evaluation purposes you may view the current settings using the get command get everything shows all parameters Table 2 shows additional parameters for the set and get commands Table 2 Basic set amp get Parameters w Pete Wireless interface such as SSID channel and security options www rovingnetworks com 7 RN WIFLY SRL UM 1 0 BY AOU Nt DET WI FI CONNECTIONS You can use the serial adapters to create a WiFi connection to a variety of applications such as e Remote environmental sensors e Linking mobile devices such as GPS and light sensors e Automotive diagnostics e Industrial equipment monitoring and control You can configure the WiFly serial adapter in infrastructure or point to point ad hoc networking setups With the infrastructure setup the adapter associates with an access point and is accessible from any machine on the LAN You can extend this access to anywhere on the Internet by using dynamic DNS The infrastructure setup is useful when the ad
13. e connects to the network automatically upon power up The following example uses the wireless network my network and pass phrase my secret code set wlan join 1 Auto join on power up set wlan chan 1 Only look on channel 1 set wlan ssid my network Set the network name set wlan phrase my secret code Set the pass phrase www rovingnetworks com 10 RN WIFLY SRL UM 1 0 BY AOU Nt DET 2 Configure the adapter s static IP address so that the remote application can connect Turn off DHCP and set the IP gateway and netmask set ip address 10 20 20 63 Set the IP address set ip port 5030 Set the local port on which to listen set ip netmask 255 255 255 0 Set the IP netmask set ip gateway 10 20 20 1 Set the network gateway set ip dhcp O Turn off DHCP 3 Set the wake up and sleep conditions In this mode the sleep and wake timers are used to conserve battery power Because it is unknown when the remote host will connect the adapter should occasionally wake up and listen for the remote host With these timers the battery performs better if the adapter sleeps longer but the remote host sees more latency when connecting WARNING Do not set the sleep timer for less than 5 seconds or you will not be able to go back into command mode to reconfigure the adapter before it goes back to sleep set sys wake 20 Wake after 20 seconds set sys sleep 10 Go to sleep after 10 seconds save Save configuration reboot
14. etworks com 5 RN WIFLY SRL UM 1 0 SYA MOULE NETWORKS Configure the Module Using a Terminal Emulator To communicate with the module using a terminal emulator perform the following steps 1 Determine the COM port that was assigned to the USB to serial cable If you do not know the COM port number you can find it using the Windows Device Manager which is in the system tools In the Device Manager browse and expand the selection for Ports COM amp LPT In the example shown in Figure 3 the USB serial port is COMO For OS X if you are using CoolTerm you can view and select the port from within the application 2 Open your terminal emulation program 3 Specify the COM port If you are using TeraTerm select Serial and choose the COM port number from the Port drop down list box NOTE The default serial port setting for the WiFly module is 9600 baud 8 bits no parity and 1 stop bit Figure 3 Finding the COM Port Number in Windows ioj x ml Fie Action View Window Help 8 x esin 2E A ml Computer Management Loc 2 Wb System Tools gi Event Viewer Shared Folders M Loca Users and Groug i dip Performance Logs anc Device Manager fj Storage Batteries 4 Computer wu Disk drives M Display adapters 4 DVD CD ROM drives ig Human Interface Devices IDE ATA ATAPI controllers Removable Storage 3 Keyboards W Disk Defragmenter Mice and other pointing devices B Disk Management L Modems t
15. he sleep timer duration using the set system sleep seconds command Use the get sys command to display the sleep timer s current settings www rovingnetworks com 2 RN WIFLY SRL UM 1 0 BY AOU Nt DET Batteries amp Charging If you wish to power the module using AC power insert rechargeable NiMH batteries into the device When using the external power connector to charge the batteries ensure that e You install rechargeable batteries before using the charger Do not operate the adapter using the charger without batteries or the adapter will be permanently damaged e You only use the charger with NiMH batteries NOT alkaline Attempting to charge alkaline batteries causes battery acid to leak and destroys the adapter and surrounding environment e The charge rate is low enough lt 100 ma such that the batteries can be charged indefinitely without harm e The charger is a slow charger it typically takes 10 hours to re charge batteries fully from low battery You can apply external power from either the 5 V DC plug or pin 9 on the DB9 connector The power plug is center pin positive outer cylinder ground The input MUST be 5 V DC for proper battery charging Higher voltages can permanently damage the charger and battery You can view the current battery voltage in configuration mode using the show bat command Note that with rechargeable NiMh batteries the voltage remains relatively unchanged just until they go dead STATUS
16. i Services and Applications D Monitors ME Network adapters BEER E s PCMCIA adapters y Ports COM amp LPT z Communications Port COM 1 F ECP Printer Port LPT1 Example COM L USB Serial Port COM9 Port Setting we HB Smart card readers Sound video and game controllers HM System devices Universal Seria Bus controlers Enter Command Mode To enter command mode perform the following steps in the terminal emulator 1 Type You must type together quickly with no additional characters before or after them The module replies with CMD to indicate it is in command mode 2 Type show net cr to display the current network settings www rovingnetworks com RN WIFLY SRL UM 1 0 82 1 MOULE NETWORKS NOTE When a command completes the terminal displays a prompt in the format X XX where X XX indicates the module s firmware version In Figure 4 the version is 2 28 Figure 4 Show Current Network Settings L Tera Term disconnected VT lt jm File Edit Setup Control Window Help MD 2 28 show net SSid rovingi Chan 1 den ate 12 24Mb uth OK ode WPA2 HCP OK renewv 79 oot 66623336 ime FAIL Links 2 28 B 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 Use a to indicate a space e g MY NETWORK should be written as MYS NETWORK A
17. ote host connection The configuration commands for these modes are shown in the following sections The setup is described using infrastructure mode i e with an access point however you can perform a similar setup using ad hoc networking www rovingnetworks com 9 BY AOU Nt DET RN WIFLY SRL UM 1 0 Initiating a Connection from the Adapter To initiate a connection from the adapter perform the following steps in command mode l Set the wlan properties so that the adapter connects to the network automatically upon power up The following example uses the wireless network my_network and pass phrase my_secret_code set wlan join 1 Auto join upon power up set wlan chan O Scan all channels set wlan ssid my network Set the network name set wlan phrase my secret code Set the pass phrase The Join 1 setting ensures that when the module wakes up it tries to associate with the access point that matches the stored SSID passkey and channel Setting the channel to O the default forces auto scanning Specifying the channel reduces the time it takes the adapter to find and associate with the access point Set the remote server s IP address and port so the adapter can connect to it when it wakes up set ip host 10 20 20 75 Set the host IP address set ip remote 3000 Set the remote port set sys autoconn 2 Try to connect to the host every 2 seconds save Save configuration NOTE If autoconn is 1 the adapter
18. s SSID is Wifly GSX NN where NN is the last two digits of the adapter s MAC address To restore factory defaults power on the device with switch 1 turned on then toggle the switch five 5 times If the adapter s file system has a configuration file named user the adapter reads the data in this file as the default instead of using hardcoded defaults If no user configuration file is present the adapter uses the hardcoded factory defaults NOTE You create the user configuration file with the save user command which saves the current configuration settings Even if a user configuration file exists you can override it s settings and restore the WiFly module to the factory hardcoded defaults by arming and toggling switch 1 seven 7 times This bypass mechanism allows you to restore the adapter to its original settings if incorrect configuration is saved into the user file Switches 2 sensor pin 2 3 sensor pin 3 and 4 sensor pin 7 are currently unused www rovingnetworks com 4 RN WIFLY SRL UM 1 0 BY MOULE NETWORKS CONFIGURATION The WiFly module operates in two modes data mode default and command mode While in data mode the WiFly module is essentially a data pipe When the module receives data over a Wi Fi it strips the TCP IP headers and trailers and passes the user data to the UART When data is written to the UART the module constructs the TCP IP packet and sends it out over Wi Fi Thus the entire process of sending
Download Pdf Manuals
Related Search
Related Contents
LES ANTISEPTIQUES Albatros Tournament Management System Ipad Scoring Manual Manual do Utilizador para o Nokia 6260 South Shore Furniture 3347189 Instructions / Assembly Cisco 7921G Power Supply for Central Europe "取扱説明書" Philips SA2VBE08S WiFi to RS-422/485 adapter user manual MC140 User Manual pdf Copyright © All rights reserved.
Failed to retrieve file