Preview only show first 10 pages with watermark. For full document please download

Rs-xmega-220x Getting Started Guide Redpine Signals, Inc. Www.redpinesignals.com

   EMBED


Share

Transcript

RS-XMEGA-220X Getting Started Guide Redpine Signals, Inc. 2107 N. First Street, #680 San Jose, CA 95131. Tel: (408) 748-3385 Fax: (408) 705-2019 Email: [email protected] Website: www.redpinesignals.com Redpine Signals, Inc. Proprietary and Confidential. RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 Table of Contents 1 Introduction ........................................................................ 4 2 RS-XMEGA-220x Wi-Fi Add-on Card Description .................. 5 3 Getting Started .................................................................... 7 3.1 System Requirements ......................................................... 7 3.2 Programming the XMEGA-A3BU Xplained Kit with the Wi-Fi Demo Executable .......................................................................... 8 3.2.1 3.2.2 3.3 3.3.1 Programming through Boot-loader ..................................................... 8 Programming through JTAGICE3...................................................... 11 Demo Applications .............................................................12 Running the Demo Application ........................................................ 12 4 Example Applications ......................................................... 19 Redpine Signals, Inc. Proprietary and Confidential. Page 2 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 List of Figures Figure Figure Figure Figure Figure Figure Figure Figure Figure 1: RS-XMEGA-220x Wi-Fi Add-on Card............................................... 5 2: XMEGA-A3BU Xplained Platform .................................................... 5 3: Demo Application Set-up ............................................................... 8 4: Detection of the USB Cable .......................................................... 11 5: Demo Application GUI ................................................................. 13 6 Entering Configuration Parameters .............................................. 15 7: Demo GUI .................................................................................... 16 8: Throughput GUI .......................................................................... 17 9: Throughput Displayed in GUI ...................................................... 18 Redpine Signals, Inc. Proprietary and Confidential. Page 3 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 1 Introduction The Getting Started guide gives the user instructions to set up RS-XMEGA-220X 802.11n Wi-Fi® add-on card from Redpine Signals Inc. with Atmel XMEGA-A3BU Xplained Kit and execute demonstration applications to quickly evaluate Wi-Fi functionality on the kit. Various features and functionalities of the Wi-Fi add-on card are exercised in these demonstration applications, such as scanning and associating to networks, transmitting and receiving data over a Wi-Fi connection etc. The Getting Started guide does not describe the implementation details of the APIs used to configure and operate the RS-XMEGA-220X Wi-Fi add-on card. For such details, the Programming Reference Manual, included in the software package for the card, should be referred to. Redpine Signals, Inc. Proprietary and Confidential. Page 4 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 2 RS-XMEGA-220x Wi-Fi Add-on Card Description UART interface to plug into XMEGA-A3BU Kit Figure 1: RS-XMEGA-220x Wi-Fi Add-on Card Interface for the Wi-Fi add-on card SW1 SW0 LEDs Figure 2: XMEGA-A3BU Xplained Platform Redpine Signals, Inc. Proprietary and Confidential. Page 5 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 NOTE: The software and documentation for the RS-XMEGA-220x Wi-Fi Card can be downloaded from www.redpinesignals.com/atmel/rs-xmega.html For detailed description of the XMEGA-A3BU Xplained Kit, please visit www.atmel.com Redpine Signals, Inc. Proprietary and Confidential. Page 6 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 3 Getting Started 3.1 System Requirements The system requirements for this demo are as follows: 1. XMEGA-A3BU Xplained Kit from Atmel. 2. RS- XMEGA-220x Wi-Fi add-on card and software 3. Laptop/PC with Windows Xp/Vista/Windows7 to connect the XMEGA-A3BU Kit and to an Access Point. Java Runtime Environment (JRE) 6.0 or above should be installed in the Laptop/PC from http://www.oracle.com/technetwork/java/javase/downloads/index.html 4. Wi-Fi Access Point. It is recommended that the Access Point (AP) is configured in DHCP server mode. The Access Point may be connected to the Laptop/PC through an Ethernet or wireless interface. It is recommended that the Laptop/PC acquires its IP address from the DHCP server in the AP. The Access Point may be configured in open mode or secure mode with WEP or WPA2-PSK encryption. 5. Optional requirements a. JTAGICE3 (http://www.atmel.com/dyn/products/tools_card.asp?tool_id=17213& category_id=163&family_id=607&subfamily_id=760 ) Redpine Signals, Inc. Proprietary and Confidential. Page 7 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 Access Point (C) Laptop/PC (B) XMEGA-A3BU Kit + RS- XMEGAA3BU-220x Wi-Fi add-on card (A) Figure 3: Demo Application Set-up 3.2 Programming the XMEGA-A3BU Xplained Kit with the Wi-Fi Demo Executable To run the demo applications, the XMEGA-A3BU-Xplained kit should be programmed with the executable file of the applications. 3.2.1 Programming through Boot-loader Follow this process if the Kit is already programmed with the USB bootloader. Otherwise skip this section and go to section Programming through JTAGICE3 1. Install FLIP software version 3.4.4.103 or above for Windows ( www.atmel.com ) 2. Press down SW0 of the Kit and then power up the Kit by connecting the USB power cable between the Laptop and the Kit, while holding the SW0 down. Release SW0 after 2 secs. If the Kit was connected for the first time, a prompt will come in Windows, asking for DFU Driver Installation. This driver is a part of the FLIP tool. Install the DFU Driver from C:/Program Files/Atmel/FLIP/3.4.4.103 (assuming the FLIP tool was installed in the C: drive) Redpine Signals, Inc. Proprietary and Confidential. Page 8 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 3. Open the FLIP Tool. Select the part “ATxmega256A3BU” from the device selection list available with the „Device‟ icon. Select “USB” as communication media (available with the “USB cable icon”) 1 2 4. Open the USB port to connect to the target 5. Select the RS-XMEGA-220X-Vx-x-x\Firmware\RS-XMEGA_WiFi_Demo_Hex \xmega_a3bu_rsi_wifi_demo.hex file using “File”-> “Load HEX File” menu. This is the executable file for the demo application. Redpine Signals, Inc. Proprietary and Confidential. Page 9 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 6. Select the „Erase‟, „Blank check‟, „Program‟ and „Verify‟ operation check boxes and press the „Run‟ button. This operation loads the executable into the Kit. 1 1 2 4 1 3 7. After this process is complete, remove the USB power cable and connect it back. The PC will prompt to install the CDC driver from http://www.atmel.com/dyn/products/tools_card.asp?tool_id=17168. After the driver is installed, the USB cable should be detected and displayed in the “Device Manager” settings of the PC Redpine Signals, Inc. Proprietary and Confidential. Page 10 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 Figure 4: Detection of the USB Cable 8. Power down the board. 3.2.2 Programming through JTAGICE3 1. Install AVR Studio 5.0 (http://www.atmel.com/microsite/avr_studio_5/default.asp? ) in the PC 2. Connect the JTAGICE3 between the PC and the Kit. Power up the board using the USB cable. 3. Open the project RS-XMEGA-220X-Vx-x-x\Firmware\RSXMEGA_WiFi_Demo_Src\xmega_a3bu_rsi_wifi_demo\ xmega_a3bu_rsi_wifi_demo.avrsln 4. Click on “Build” menu and then on ”Build Solution” 5. Once build is completed, go to “Tools” menu and click on “AVR Programming”. Select values for “Tools”, “Device” and “Interface” as shown below and click “Apply”. After clicking “Apply”, click on Device ID -> Read and Target Voltage -> Read. The “Device ID -> Read” operation will return the device ID in the field provided. Redpine Signals, Inc. Proprietary and Confidential. Page 11 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 6. Click on “Close” to close the AVR Programming window. 7. Click on “Debug” menu and then on “Start Debugging and Break” to download the Wi-Fi demo executable to the Kit. Power down the board after the download is complete. 3.3 Demo Applications 3.3.1 Running the Demo Application 1. Connect the PC to the Access Point and make sure the PC has a valid IP address. (If the Access Point is in DHCP server mode, the PC can acquire an IP address from it) 2. Double click on the application RS-XMEGA-220X-Vx-xx\Software\GUI\Demo_App.jar in PC. Make sure JRE 6.0 or above is installed. Redpine Signals, Inc. Proprietary and Confidential. Page 12 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 Figure 5: Demo Application GUI Click on “Configure XMEGA-A3BU”. This will open a window to configure the Wi-Fi card. 3. In the configuration window, enter the COM port in the “Interface Name” field. Select the Baud rate to 115200, if not already present as default and click “Open” i. Set Network to “Infrastructure” ii. Select Band as 2.4 Ghz iii. If you want to scan a specific SSID or a hidden SSID, then click on the SSID button and then enter the SSID in the field provided next to the button. If you want to scan all the Access Points in the vicinity, please leave this field blank. iv. Click on “Scan” v. After the list of SSIDs are displayed, select the SSID of the AP you want to connect to, by clicking on the name in the SSID list. vi. Enter the “Pre Shared Key” if the Access Point is in security mode. Redpine Signals, Inc. Proprietary and Confidential. Page 13 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 vii. Enter Tx Rate as “Auto” and “Tx Power” as “High”. This will ensure that the Wi-Fi system adapts the physical data rate automatically depending on packet losses, range etc. The Tx power, when set to high, will ensure that the RF power emitted is in the range of 15-16 dBm. viii.Click on “Connect”. This makes the Wi-Fi module connect to the Access Point configured Note: If a wrong PSK is given, or if there is a failure to connect to the access point because of other reasons, a message at the bottom of the GUI will be given as “Retry Again”. In such a case, please restart the GUI and try the same process afresh. ix. Enter “Set” button near the “Destination Host IP”. This will display the IP address of the Laptop/PC x. For configuring the IP address a. To get the address from the DHCP server in the access point, click on “Automatic (DHCP)”. Note that the Access Point should be configured in DHCP server mode in this case. Click “Apply” b. If you want to configure a static IP, click on “Manual” and enter the IP address, Subnet and Gateway in the fields provided and click “Apply”. xi. Click “Apply” and the IP address acquired by the Wi-Fi module will be displayed. xii. Close the Wi-Fi configuration GUI and then click on the “Connect” button shown in figure Demo Application GUI . This will establish a TCP connection between the Wi-Fi card and the Laptop through the Access Point. The IP address of the Wi-Fi card will be displayed in the field “XMEGA-A3BU IP Address”. Note: If a Firewall is installed in the PC, the Demo GUI might not work as the network traffic might be blocked. Disable the Firewall and retry in such a case Redpine Signals, Inc. Proprietary and Confidential. Page 14 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 COM 4 COM7 192.168.1.45 Demo_SSID Figure 6 Entering Configuration Parameters Control & Monitor Tab 4. Click on “Control and Monitor” tab. Redpine Signals, Inc. Proprietary and Confidential. Page 15 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 SW0 SW1 LEDs Figure 7: Demo GUI 5. Click on the LEDs in the GUI as shown. On clicking the LEDs, the GUI transmits the information through the Access Point to the XMEGA-A3BU kit. The corresponding LED on the XMEGA-A3BU Xplained Kit will change color accordingly. The “Control & Monitor” Demo is used to demonstrate reception of data by the RS- XMEGA-220X Wi-Fi Card and supply the data to its Host, the XMEGA-A3BU Xplained Kit. 6. Press the buttons SW01 and SW1 on the XMEGA Kit. The corresponding switches in the GUI will flash. This demonstrates transfer of data from the XMega Kit to the remote terminal Throughput Tab 7. Click on the “Throughput” tab. The “Throughput” demo shows a large amount of data (in the order of megabytes) transferred between the XMEGA-A3BU Kit and the remote terminal Node D, wirelessly. It calculates the actual data throughput, using the time taken to complete the data transfer. 8. Enter the type of Socket you want to use to transfer (TCP or UDP) Redpine Signals, Inc. Proprietary and Confidential. Page 16 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 192.168.1.108 Figure 8: Throughput GUI 9. Enter the delay. This is the delay between two consecutive packets sent from the microcontroller in the XMEGA-A3BU Kit platform to the Wi-Fi module. 10. Enter the size of the data. This represents the TOTAL size of the data to be transacted between the PC and the Wi-Fi card through the wireless interface. Click “Start”. After the data-transfer is over, the throughput, depending on the amount of data transferred and the time taken, is displayed as shown below. Redpine Signals, Inc. Proprietary and Confidential. Page 17 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 192.168.1.108 Figure 9: Throughput Displayed in GUI Note: It is recommended that “Delay” parameter is kept to 0 for best results in TCP. For UDP, it is recommended that the parameter is 3 or more Redpine Signals, Inc. Proprietary and Confidential. Page 18 RS-XMEGA-A3BUUC3-L0-220X Getting Started Guide Version 1.1, 19 Sep, 2011 4 Example Applications Example applications covering network connection and configuration along with source code are available with the software package included with RS-XMEGA-220X at www.redpinesignals.com/Atmel/rs-xmega.html. A programming reference manual is included in the software package to illustrate the use of different APIs for configuring and operating the Wi-Fi card. Redpine Signals, Inc. Proprietary and Confidential. Page 19