Home
RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards User Manual
Contents
1. RN 131 171 PICTAIL UM RN 131 PICTAIL amp RN 171 PICTAIL Evaluation Boards USER MANUAL RN 131 171 PICTAIL UM 22 OVERVIEW The RN 131 and RN 171 WiFly radio modules are complete standalone wireless LAN access devices Each module contains a TCIP IP stack and related applications After the module is configured the radio can access the Wi Fi network automatically and transmit and receive data over a UART General Description The RN 131 PICTAIL and RN 171 PICTAIL evaluation boards work seamlessly with the Microchip Technology 18 Explorer Development Board The evaluation boards plug into the PICtail M modular connector on the PIC18 Explorer Board and add wireless functionality to PIC18 based microcontroller designs The evaluation boards are preloaded with firmware to simplify integration and minimize application development In the simplest configuration the hardware only requires four connections PWR TX RX and GND to create a wireless data connection The microcontroller can communicate with the boards via the UART and SPI interfaces and can drive LEDS wake the boards and reset them The evaluation boards are updated and controlled with a simple ASCII command language Once the boards are set up they can scan to find an access point associate authenticate and connect over any Wi Fi network The PIC18 Explorer Board DM183032 is a development platform equipped wi
2. SENSOR 2 SPI SCK 53 VEE gt SEN3 3 16 Sv S ii nn SENSOR_3 SPI MISO lo 2 28 RESET lt lt 290001 RFO 39 WAKEUP_ RG1 SENSOR_POWER FLASH_CS J2 PICTAI L PLUS 30 Pin vana a SENSOR 4 YA SENSOR_5 RAS YA SENSOR_6 lt RA4 6 1 3 7 05 1 RARE mosi SENSOR_7 VDD_3V3 PIC RX 29 RAG OSC2 RESTO MISO MOSI RC7 MIO GND GPIO_4 PIC_TX TI 12 SCK El RESET MISO 2 19 87 RAO 6 GPIO_5 886 iO SK 17 RB5 2 E FORCE_AWAKE GPIO 6 ARL PIC_L EDR 19 RCO 20 PIC RTS _ PIC LEDY 21 22 PIC_CTS STATUS_L ED Licei ZI gt GPIO_14 236 ac A S Sp 5 RBI V_VAR Vin Hie cG GPIO_13 UART_RTS RO 44 GND 2 1 PIC_RTS PICTAI L 28 Pin Power Net ART Ela 4 a Pic Ix GPIO_11 UART_RX E SARL IK GPIO 10 UART TO p g a lt i GND gt R8 VDD3V3 UART_TX R2 STATUS LED 100k R4 MOSI 100k 4 gt VDD3V3 R5 MI SO u 100k lt gt a ll a 5 M R3 SIRO 3 Je 100k g R gt 12 Vin U1 TC1262 3 3V VDD3V3 1 55 100k 403 ND Vin Vout C2 C1 R11 R10 10uF di 10uF R6 seno R7 220R 220R Version 1 1 9 20 2012 14 www rovingnetworks com NOTES www rovingnetworks com Version 1 1 9 20 2012 RN 131 171 PICTAIL UM Roving Networks Inc 102 Cooper Court Los Gatos CA 95032 1 408 395 5300 www rovingnetwork
3. CoolTerm_0 A O ka 814 n i 12 on RN 171 Addr 00 06 66 80 0a ab Auto Assoc Derrick AP1 chan 6 mode NONE FAILED READY Auto Assoc Derrick AP1 chan 1 mode 0PEN SCAN OK Joining Derrick AP1 now Associated DHCP Start DHCP in 193 ms lease 864005 IF UP DHCP ON IP 192 168 1 50 2000 255 255 255 0 GW 192 168 1 1 Listen on 2000 CMD set w s Derrick AP1 Storing in config lt 2 32 gt join DeAuth Auto Assoc Derrick AP1 chan 1 mode OPEN SCAN OK Joining Derrick AP1 now lt 2 32 gt Associated DHCP Start DHCP in 13ms lease 86400s IP 192 168 1 50 2000 NM 255 255 255 0 1 2 1 9 1 1 RN 131 171 PICTAIL UM In the console note the IP address that the access point assigns to the RN 131 RN 171 module The P is unique to each wireless environment s DHCP server You will use this IP address to open a telnet session with the device The application source code includes a file called ConfigApp h Two parameters in this file establish which SSID and passphrase is used if the default access point cannot be found define NETWORK_SSID xxxstringxxx define NETWORK_PASS yyystringyyy You can change these parameters to match your local network environment Then rebuild and re load the updated application The application then uses these settings to search for the access point to join in case the default device parameters stored in the device cannot be found or if found t
4. 1 RN 171 module It sets the UART s baud rate to 9600 baud 8 bits data 1 stop bit no parity and no flow control These settings are the default for the RN 131 RN 171 module To change the baud rate modify the define BAUD_RATE 9600 macro in the console h header file and re initialize the UART The Consolelnit function enables both transmit and receive UART capabilities but their respective interrupts are disabled until the application is prepared to receive them Later receive interrupts are enabled Transmit interrupts remain disabled Reset the RN 171 Module The PICtail connector has an active low reset pin RB1 that is used to reset the RN 131 RN 171 module after the PIC18 Explorer Board and UART are properly initialized The void rn_reset_wifi void API function is used for this reset operation It transitions the reset pin from high to low holds the pin low for 10 ms and then returns it high This reset action triggers the module to begin its joining procedure Check Module s Status Immediately after resetting the module the PIC s UART receiver interrupt is enabled This process prepares the PIC to receive the information that is transmitted from the RN 171 s UART as it goes through its start up procedure The PIC18 parses the RN 171 output and searches for the module s P address if it was successful in associating with an access point If a valid IP address is received the assumption is made that the device is sa
5. 131 PICTAIL RN 171 PICTAIL evaluation board into the PIC18 Explorer Board s PICtail connector See Figure 1 Figure 1 Modules Connected to PIC18 Explorer Board RN 171 PICTAIL Connected to the PIC18 Board RN 131 PICTAIL Connected to the PIC18 Board SG gt x 2 x 1 7 4 4 2 Configure the PIC18 Explorer Board s J4 and J13 jumpers as shown in Figure 2 This configuration is for command mode operation www rovingnetworks com Version 1 1 9 20 2012 4 RN 131 171 PICTAIL UM 27 IRIS Figure 2 Jumper Selection for Command Mode Operation 2 ci perce YY YALE amp 66 3 Connect a serial cable from the PIC18 Explorer Board s DE9 connector to the PC If you are using a laptop that does not have a serial connector use a USB to serial converter cable to connect the serial cable to the laptop s USB port 4 Connect the programmer to the PIC18 Explorer Board and apply power Program the PIC18F8 7J11 amp Configure the RN 131 RN 171 In this step you configure the RN 131 RN 1 1 modules so that they automatically search for and join a preferred access point First you use the following steps to program the PIC18F87J11 with software that allows the RN 131 RN 171 to be configured for its current operating environment These steps are specific to the PIC18 Explorer Board because of the way in which the UARTS are connected on the board 1 Using the MPLAB
6. Instructions for configuring the jumpers are provided in Demo Setup on page 4 802 11b g compliant Wi Fi access point e Serial cable or USB to serial converter cable Software Requirements You need the following software tools applications to run the demo applications e Terminal emulator application such as Teralerm or CoolTerm You will use the terminal emulator to send configuration commands to the module over a UART interface The emulator also displays information transmitted from the module e MPLAB X version 1 2 or higher You will use this application with the programmer to load the application into the PIC and to modify and customize the application e xXC8 amp v1 10 compiler You will use the compiler to build a customized application Sample Application Code You can obtain the sample application code described in this user manual at www microchip com wireless www rovingnetworks com Version 1 1 9 20 2012 3 RN 131 171 PICTAIL UM 224 Demo Applications This section demonstrates how to use the demo applications to accomplish the following tasks e Configure the module to join a known user specified access point automatically e Communicate with the module via a telnet session to turn on off LEDs using a command set that the application running on the PIC recognizes Set Up Hardware Perform the following steps to set up the hardware and prepare it for configuration 1 Plug the RN
7. X IDE and the programmer load the ConfigurelnCmdMode hex file into the PICI8F8 J11 This application performs two important tasks e It configures the 18 817 11 I O pins appropriately e Itallows the UART signal to traverse from the Explorer 18 board s DEY connector to the RN 131 PICTAIL RN 171 PICTAIL temporarily bypassing the PIC this step is specific to the PIC18 Explorer Board 2 Open your terminal emulator to the COM port of the PIC18 Explorer Board RN 131 PICTAIL RN 171 PICTAIL The serial port settings are 9600 baud 8 bits data no parity 1 stop bit and no flow control www rovingnetworks com Version 1 1 9 20 2012 5 RN 131 171 PICTAIL UM gt A IRIS 3 Type the following commands in the console of your terminal emulator This command places the RN 131 RN 171 module in command mode scan lt gt The device scans for networks and produces a list of available access points see Figure 3 for an example The access point to which you wish to connect should be listed If it is not repeat the scan command join XX lt cr gt Associate with the access point where XX is the access point s number interest as shown in the scan report leave lt cr gt This command asks the device to leave the network Figure 3 Access Point List CoolTerm_0 Deng lt id e E d New Open Save Connect Disconnect Clear Data Options View Hi i lex Help CMD scan lt 2 32 gt SCAN Fo
8. a P 9 DT gt Gj NAD6 NAD5 R20 R19 220R 220R STATUS L ED SIRQ MISO 2 MOSI Povver Net 10uF gt A un m O Version 1 1 9 20 2012 VDD3V3 M2 RN131 Module UART_TX GPI _10 UART_TX TT UART_RX GPI O 11 lo Ne a UART_CTS GPI 0 12 1 RTS UART_RTS GPI _13 10 PIC_CTS va WAKEUP FORCE_AWAKE GPIO_6 SUPERCAP BAL ANCE GPIO 5 GPIO 4 EPC_A SENSOR_1 RESET SENSOR_2 SENSOR_7 SENSOR_3 SENSOR_5 SENSOR_POWER SENSOR_4 SENSOR_0 SENSOR_6 a a a Z Z Z Z gt Z Z Z U 0 0 N N m 1 Power Net VDD3V3 Li ISP_TX Ju PIC_TX WAKEUP 5 5 RESET ISP_RX UART J3 ISP Connector 13 Figure 8 RN 171 PICTAIL Board Schematic RN 131 171 PICTAIL UM VDD3V3 ISP_ TX WAKEUP ISP_RX UART_1X J3 ISP Connector M1 RN171 Module RB2 SS1 AN2 RF2 U1RX_E RFGJSCKI RF3 UITX_E 2 5 FF7 SDI 1_E RG2 SCL1 3 gt RF8 5D01 E RG3 SDA1 fy 1 i I vl RB0 ANO RB1 AN1 gt PIC L EDY 13 RB3 AN3 e PICLEDR SENSOR_0 VDD_3V3_SW 15 16 qj CND GND 18 SIRO CIS gt 1 RE9 I NT2 RE8 I NT1 2 PIC RIS SENSOR_1 SPI_MOSI vede 9 27 RD14 V1CTS_E RD15 U1RTS E S 2 a 5V 33 4
9. ad hoc and infrastructure networks e Wi Fi Alliance certified for WPA2 PSK e Complete on board TCP IP networking stack e Environmentally friendly RoHS compliant www rovingnetworks com Version 1 1 9 20 2012 2 RN 131 171 PICTAIL UM 224 Demo Applications The example applications provided with this document include an MPLAB X project and 2 pre compiled hex files e The MPLAB X project files provide a sample 8 bit application framework that you can customize to configure and control the RN 131 RN 171 from an 8 bit Microchip microcontroller e You use the pre compiled sample application ConfigurelnCmdMode hex to configure the RN ISURN 171 module e SampleTelnetApp hex accepts specific telnet commands from a remote device and turns on off the LEDs either the RN 131 RN 1 1 module or the PIC18 Explorer Development Board The following sections describe these applications in detail GETTING STARTED This section describes how to setup up the PIC18 Explorer Board and to run the sample demo applications Hardware Requirements To run the demo applications you need the following hardware e RN 131 PICIAIL or RN 171 PICTAIL evaluation board e PIC18 Explorer Development Board equipped with a PIC18F3 7J11 PIM 180020 e Microchip programmer e g or Real Ice e 2 jumper wires to configure jumpers J4 and J13 on the PIC18 Explorer Board NOTE You cannot use the default jumper settings for J4 and J13
10. fely on a network and is in data mode In this case the PIC18 waits to receive commands from the RN 131 RN 171 module in an endless loop The PIC18 acts on each valid command as it receives it Command Mode If the PIC18 application detects that the RN 171 module was not successful in its start up attempt to associate with an access point the PIC s application attempts to instruct the module to associate with a specific access point The 18 application sends the following commands to the module in sequence Put the module into command mode set wlan ssid lt string gt Set the network s SSID where lt string gt is the SSID set wlan pass lt string gt Set the passphrase to use when joining where lt string gt Is the passphrase save Save the settings to persistent storage reused when joining reboot Reboot the module so that the settings take effect When successful the module reboots and associates with the specified access point The following section describes the APIs used to carry out these operations www rovingnetworks com Version 1 1 9 20 2012 11 RN 131 171 PICTAIL UM gt IRIS Primary Module Communications API Functions The API function that tells the device to go into command mode is err t module send cmd const char response const char fmt This function accepts 2 or more parameters i e a variable lengih parameter list The first parameter response is the reply expected f
11. hey do not allow association Version 1 1 9 20 2012 MOTON RN 131 171 PICTAIL UM The RN 131 RN 171 module is now associated to an access point and is operating in data mode Use the following steps to open a telnet session with the device and send it commands l Zi Associate your computers Wi Fi connection with the same access point as the RN 131 RN 1 1 module On your computer open a command line session and type the command telnet lt address gt 2000 where lt address gt is the IP address of the RN 131 RN 171 module For example telnet 192 168 1 50 2000 2000 is the port number on which the RN 131 RN 171 module listens for telnet session commands The telnet console should display the echoed response HELLO Anything you type in the telnet console followed by a lt cr gt is echoed on the RN 131 RN 171 module s console Type some random strings and observe the echoing The PIC18F87J11 connected to the RN 131 RN 171 module can recognize and act on the following commands MOD_TON_GRN Turn on module s green LED MOD_TOFF_GRN Turn off module s green LED EXP TON LEDI Turn on Explorer Board s D8 LED TOFF LEDI Turn off Explorer Board s D8 LED EXP TON LED2 Turn on Explorer Board s D LED EXP TOFF LEDI Turn off Explorer Board s D LED Type one of these commands in the telnet console either by itself or embedded in a longer string followed by a lt cr gt Observe that you can turn on or off the a
12. ings to persistent storage reused when joining reboot lt cr gt Reboot the module so that the settings take effect Data Mode Operation In the following steps you load an application into the PIC18F87J11 that allows the RN 131 RN 1 1 module to operate data mode and accept a telnet connection request Additionally the application lets you control the module s LEDs by sending specific PIC commands 1 Configure the jumpers J4 and J13 as shown in Figure 4 This setting allows the PIC s UART to communicate with RN 131 RN 171 module s UART via the PICtail connector and also allows the module s transmitted data to echo back to the terminal emulator s console This setting is specific to the PIC18 Explorer Board www rovingnetworks com Version 1 1 9 20 2012 6 RN 131 171 PICTAIL UM Figure 4 Data Mode Operation Jumper Selection 2 Use the MPLAB X IDE and the programmer to load the SampleTelnetApp hex demo application into the PIC18F87J11 3 Press the MCLR reset button on the Explorer 18 board and observe the output transaction on the terminal emulator console A normal sequence is similar to that shown in Figure 5 i e the device is associated with the designated access point and the yellow LED on the RN 131 PICTAIL RN 171 PICTAIL is illuminated www rovingnetworks com Version 1 1 9 20 2012 22 IRON Figure 5 RN 131 RN 171 Association Start Up Sequence NOTE www rovingnetworks com
13. ppropriate LEDs on either the evaluation board or the PIC18 Explorer Board You have completed the application demonstration The next section describes how the software is designed for PIC18 microcontroller www rovingnetworks com Version 1 1 9 20 2012 9 MOTON SAMPLE APPLICATION DESIGN RN 131 171 PICTAIL UM This chapter provides a high level overview of how the sample demo application was designed and shows some of the APIs you can use to communicate with RN 171 module Demo Application Flow Diagram Figure 6 shows the demo application flow diagram Figure 6 Flow Diagram Power Up Initialize Explorer 18 Hardware Initialize PIC18 UART Reset RN 171 Module Check RN 171 Status Associated lt b Initialize the PIC18 Explorer Board Hardware Set Command Mode Enable RCV INT During this processing stage the void Boardlint void API function performs the following tasks e Chooses the external 10 crystal as the clock source e Configures the ports pins as digital and selects their direction to match the functional requirements of the PICtail connector e Turns off the LEDs e Clears the interrupt flags e Disables the peripheral interrupts www rovingnetworks com Version 1 1 9 20 2012 10 RN 131 171 PICTAIL UM gt Initialize the PIC s UART The void Consolelnit void API function initializes the PIC s UART1 which communicates with the RN 13
14. rom the RN 171 module after it has processed the command The command is carried in the fmt parameter For example if the function is called as follovvs retValue err t module send cmd CMD The command is and the expected return is CMD For a more complex instantiation such as retValue module send cmd CMD AOK set wlan ssid s NETWORK_SSID The variable parameter list is essential to properly resolve the s into the value of the NETWORK_SSID macro The next API demonstrates how you can combine individual commands inside a single function to carry out a more complex operation such as joining a network The following API function forces the device into command mode saves the SSID and passphrase and reboots the module err t module netyvork connect void Internally it sends a total of 5 commands module send cmd CMD module send cmd CMD set w 5 NETWORK_SSID module send set w s NETVVORK PASS module send cmd NULL save module send cmd NULL join This function represents a typical API that sends a sequence of commands to the module to carry out a complex task Most applications follow a similar pattern 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 Awww rovingnetworks com support php e RN 171 Data Sheet RN I131 Data Shee
15. s com www rovingnetworks com Copyright 2012 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 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 Version 1 1 9 20 2012 RN 131 171 PICTAIL UM 16
16. t Advanced User Manual e WiFly Training Presentation e Drivers tools and utilities www rovingnetworks com Version 1 1 9 20 2012 12 BOARD SCHEMATICS gt A RN 131 171 PICTAIL UM Figures 7 and 8 show the schematics for the RN 131 PICTAIL and RN 171 PICTAIL evaluation boards respectively Figure 7 RN 131 PICTAIL Board Schematic RB2 SS1 AN2 RF2 U1RX_E 2 RF6 SCK1 PG RF7 SDI 1_E RG2 SCL1 5 RF8 SDO1_E RG3 SDA1 lt GND GND 13 Il gt RB0 ANO RB1 AN1 E Di Li T RB3 AN3 RB4 AN4 1 I fron NT2 18 calls RD15 U1RTS_E o 5 3 3 a 1v003v3 Ev 9V SS gt 28 RESET 3g RGO ay WAKEUP gt lt 29561 RFI J2 PICTAI L PLUS 30 Pin 1 2 v re RAS RES gt SRATIOSCI RA3 mem PIC 29 RA6 OSC2 RCS 10 MISO FICRX 2 RC4 PIC TX Ti 12 SCK 11 RC6 RC3 12 2 15 RB RAO he 7 86 RA1 8 PIC LEDR E 20 PICRTS PIC_LEDY z o H PIC CTS WAKEUP 23 24 55 WAKEUP 20 ei RESET 25 26 2 V_VAR vin SIRO 27080 CN 28 JI R12 3k3 VDD3V3 R14 STATUS L ED 100k R17 MOSI 100k R16 MI SO 100k R15 SIRO 100k R13 100k PIC TX R21 seno R22 220k 100k www rovingnetworks com PICTAI L 28 Pin UART_TX Power Net U2 TC1262 3 3V VDD3V3 Vin Vout CA O 10uF soe N 29 29 EN m m U a
17. th a 28 pin PICtail connector and PIM that can accommodate various versions of the 8 bit PIC16 and PIC18 microcontroller families The PIC18 Explorer Board s 8 bit microcontroller communicates with the RN 131 PICTAIL RN 171 PICTAIL evaluation board via the PICtail connector This document describes how to use the RN 131 PICTAIL RN 171 PICTAIL evaluation board connected to a PIC18 Explorer Board to associate with a Wi Fi network and communicate with other devices within a LAN Communication with other LAN devices is performed using telnet RN 131 PICTAIL RN 171 PICTAIL Module Features e certified 2 4 GHz IEEE 802 11b g transceiver e Plugs into the PICtail Plus connector on the PIC18 Explorer and Explorer 16 Development Boards e Adds wireless capability to designs targeting the PIC18 Explorer and Explorer 16 boards e Configurable transmit power to 10 dBm RN 171 PICTAIL e trace antenna RN 171 PICTAIL and on board ceramic chip antenna RN 131 PICTAIL e Ultra low power 4 uA sleep 38 mA Rx 120 mA Tx at O dBm RN 171 PICTAIL 40 sleep 40 mA Rx 210 mA Tx RN 131 PICTAIL e High throughput 921 Kbps TX 500 Kbps RX data rate with TCP IP and WPA2 over UART up to 2 Mbps over SPI slave e UART interface with hardware flow control e interface with slave interrupt e Real time clock for wakeup and time stamping e status LEDs 2 configurable e Powered by PIC18 Explorer and Explorer 16 boards e Supports
18. und 7 SSID Ch RSSI Sec MAC Address Suites mchp peap 01 71 Open 00 0b 86 e0 cd 8 3104 guest 01 71 Open 00 00 86 0 4 81 21 mchp secure 1 69 Open 00 05 86 e0 cd 82 AESM AES 3104 MicrochipDemoAP 6 83 Open 00 25 9c e6 91 3d 5 2104 LedZepExpress 07 55 Open 70 56 81 83 46 71 2104 mchp peap 08 77 Open 00 24 6c b6 ec f TKIPM TKIP 3104 LedZep20 09 52 WPAZPSK 68 7f 74 e0 ec a5 AESM AES WPSPB 3104 z SN DAN UN scan lt 2 32 gt SCAN Found 5 Num SSID Ch RSSI Sec MAC Address Suites Derrick AP1 01 37 Open 00 1d 7e 09 19 39 100 guest 01 68 Open 00 0b 86 e0 cd 81 2104 mchp secure 1 67 Open 00 00 86 0 4 82 AESM AES 3104 LedZepExpress 07 51 Open 70 56 81 83 46 71 LedZep20 09 50 NPAZPSK 68 7f 74 e ec a5 AESM AES WPSPB 3104 UAWNHE usbserial 9600 8 N 1 RTS DTR _ Connected 00 15 58 OR Das osr ORI 42 4 Store the parameters from step into the RN 131 RN 171 module s non volatile memory so that they can be used in the next application you run on the 18 8 11 Type the following commands in the console of your terminal emulator set wlan ssid lt string gt lt cr gt Set the network s SSID where lt string gt is the SSID e g set wlan ssid RovingNET set wlan pass lt string gt lt cr gt Set the passphrase to use when joining where lt string gt is the passphrase e g set wlan pass duckmauifries save lt gt Save the sett
Download Pdf Manuals
Related Search
Related Contents
Universal Remote Control MX-810 Universal Remote User Manual KeTop T20eco Benutzerhandbuch V1.01 EL TRAN ALIMENTOS NSPORTE DE S PERECEDEROS Samsung DVD-P249M Керівництво користувача AVERTISSEMENT! AVERTISSEMENT! ATTENTION! 52 Problèmes et solutions 万 - 三菱電機 PHY USER R407C MANUAL 2006 17-2-2006 「取扱説明書」 AR532/AR542/AR552/AR562シリーズ Copyright © All rights reserved.
Failed to retrieve file