Home
Linux Driver Usage Application Note
Contents
1. 5 3 Using SDIO in Linux 2 6 30 ssssssss22222222 5 222222nnnnn 5 4 Building the Lite Fi Driver ssssnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn 6 5 Installing the Lite Fi Driver sssssssssssss22200uuunnnnnnnnnnnnnnnnnnn 7 6 Uninstalling the Lite Fi Driver ccccsccccssecseeeeseeessceeeenenens 8 7 Using Wi Fi Client Driver sssssssssuunnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn 8 8 Wireless Tools for LINUX ssssss2222222s s zmsnnunnnuuunnnnnn 9 9 Using Wi Fi in an Application sssssssssssssuuuussssnnnunnnnnnnnn 9 10 PPD NGC scscsescacewsesdsciewsnecseaenassannacnaredensansndsudsernseadseanees 11 10 1 Sample Client Program Reading from Socket scscssss00 11 Redpine Signals Inc Proprietary and confidential Page 3 Lite Fi Driver zgr Usage and Integration in Linux SIGNALS Version 1 0 Driving Wireless Convergence 1 About This Guide The purpose of this document is to provide details of Redpine s Lite Fi Wi Fi client driver and its integration with Linux operating system A user should be able to use Wi Fi in their application with the help of this driver The description is valid for Lite Fi family devices such as RS9110 N 11 02 and RS9110 N 11 03 for installing the Wi Fi driver under Linux platform The Wi Fi station driver is used to connect to an Access Point and carry out some data transfer tests using Lite Fi family devices This installation guide c
2. simple client c x EF RAK FR ER RR RA RO A FE A A A AE FE A OR KKK KEK K KAK KK KRKK KK KKK KK KKE K KK KKK OK EK JEI EEEE EKE KK KK ARR ERR AK RKK BREA EE AAR OR OE OE OB KKK AE A EB OR OE OE KO AE AE AR RE This is a simple client socket reader It opens a socket connects toa server reads the message and closes EAR AR A AEA KK OR AE K AE AE AS K KK K E EE AE AE AR Ee K K EE OR AE AE A EE K A K KK EE EKR EK KEREKE EE include lt stdio h gt include lt string h gt include lt errno h gt include lt sys socket h gt include lt resolv h gt define PORT_TIME 13 time not available on RedHat define PORT_FTP 21 FTP connection port IP Address of Remote Server connected using Wi Fi network define SERVER_ADDR 192 168 0 1 define MAXBUF 1024 int main int sockfd struct sockaddr_in dest char buffer MAXBUF Open socket for streaming if sockfd socket AF_INET SOCK_STREAM 0 lt 0 Redpine Signals Inc Proprietary and confidential Page 11 Lite Fi Driver Dy Beene Usage and Integration in Linux SIGNALS Version 1 0 Driving Wireless Convergence perror Socket exit errno Initialize server address port struct bzero amp dest sizeof dest dest sin_family AF_INET dest sin_port htons PORT_FTP if inet_aton SERVER_ADDR amp dest sin_addr s_addr 0 perror SERVER_ADDR exit errno Connect t
3. Wireless Extensions WE A K A tools for Linux are provided by Linux distributions as a set of commands in the operating system A few sample commands for the extensions are e iwconfig e iwevent e iwlist e iwpriv The detailed description of individual commands support by Redpine Signals is available in LiteFi Driver User Manual document Repdine Signals Wi Fi client driver interfaces with the Linux Wireless Extensions WE The extensions are generic API s which can be used by in user space for configuration and measurement of WLAN parameters 9 Using Wi Fi in an Application The developers can use regular TCP IP and UDP socket programming API s of Linux standard libraries to use the wireless network interface A sample client socket program is provided in Appendix 10 1 Notice that there is no interface ethO or wlanOQ specified in the program The network interface to be used for sending and receiving packets in an application program is determined by the routing table Refer to iproute and ifconfig commands on Linux The OS will route the packet from the application to the relevant networking interface ethO wlanO based on the IP address of the destination packet specified in the program Redpine s interface in Linux is typically WLANO Wireless LAN interface Redpine Signals Inc Proprietary and confidential Page 9 Lite Fi Driver zgrrr Usage and Integration in Linux SIGNALS Versi
4. files for Linux OS The commands are below insmod rsi_client ko insmod rsi_master ko driver_mode 1 firmware_path release o driver_mode 1 loads the driver in regular Wi Fi client mode o driver_mode 2 loads the driver in PER Wi Fi Test mode used only for special cases o firmware_path argument specifies the location of firmware to be loaded on Redpine Wi Fi module The wpa_supplicant binary is used to scan configure and connect to a Wi Fi network The supplicant requires the interface name wlan0 to be provided as an argument The configuration settings for wpa_supplicant are provided in a wifi_settings cfg file Redpine Signals Inc Proprietary and confidential Page 8 Lite Fi Driver Dy Beene Usage and Integration in Linux SIGNALS Version 1 0 Driving Wireless Convergence The Wi Fi client uses SDIO interface between the Wi Fi module and the Host processor The driver depends on the SDIO host controller to communicate with Host processor for commands and configuration items It becomes imperative to reset the SDIO interface also when the Wi Fi module is has to be powered off or reset The installation and un installation scripts provided perform the exact same function by resetting the SDIO stack This procedure does assume that SDIO Stack is also loaded as a module in Linux Kernel Reference commands rmmod sdhci pci rmmod sdhci rmmod mmc_block rmmod mmc_core 8 Wireless Tools for Linux
5. for the Kernel version 2 6 30 The kernel source can be obtained from http www kernel org It has been noted on X86 the DMA is enabled in SDIO host controller which causes instability issues at SDIO host controller level So the following lines in function sdhci_add_host of the file inux 2 6 30 drivers mmc host sdhci c should be commented If host gt quirks amp SDHCI_QUICK_FORCE_DMA host gt flags SDHCI_USE_DMA else if caps amp SDHCI_CAN_DO_DMA DBG controller doesn t have DMA capability n else host gt flags SDHCI_USE_DMA Now configure the kernel s features as given below e cd linux 2 6 30 1 Redpine Signals has performed full functional testing of the driver with Linux kernel 2 6 30 Redpine Signals Inc Proprietary and confidential Page 5 Usage and Integration in Linux Lite Fi Driver D REDPING Driving Wireless Convergence Version 1 0 e Run make menuconfig command and make sure that the following features are enabled in the menu O O O Select lt Device Drivers gt and press Enter Press M to modularize the MMC SD SDIO card support feature Selec Press t lt MMC SD SDIO card support gt and press Enter M to modularize the following in the MMC SD SDIO card support submenu lt M gt Secure Digital Host Controller Interface Support lt M gt SDHCI Support on PCI bus Press Exit button till you get back to the ma
6. Lite Fi driver sh install_driver sh Redpine Signals Inc Proprietary and confidential Page 7 Lite Fi Driver zgr Usage and Integration in Linux SIGNALS Version 1 0 Driving Wireless Convergence Once the driver is successfully loaded a message Lite Fi driver is installed successfully appears on the screen Otherwise follow the instructions as on the screen e Insert the Lite Fi SD card into the appropriate SDIO slot and run the following script to verify that the card is detected correctly sh detection_check sh If the card has been detected a message The Lite Fi card is detected successfully appears on the screen Otherwise follow the instructions as on the screen 6 Uninstalling the Lite Fi Driver For hot plug removal of the Lite Fi card from the SDIO slot you need to perform the following steps e Move to release folder found under RS GENR LNX SD X Y Z_GPL OSD LINUX directory e cd RS GENR LNX SD X Y Z RS GENR LNX SD X Y Z_GPL OSD LINUX release e Run following script sh uninstall_driver sh The script will stop active transmit and receive if any and unload the LiteFi driver At this point a message Lite Fi driver is uninstalled successfully appears on the screen Then you can safely remove the Lite Fi card from the system 7 Using Wi Fi Client Driver The driver compilation procedure described in this document enabled the developer to create a driver module ko
7. UAE Drivi ESIGN ergence Lite Fi Driver Usage and Integration in Linux Version 1 0 September 23 2011 Redpine Signals Inc 2107 N First Street 680 San Jose CA 95131 Tel 408 748 3385 Fax 408 705 2019 Email info redpinesignals com Website www redpinesignals com Redpine Signals Inc Proprietary and Confidential Lite Fi Driver zgr Usage and Integration in Linux SIGNALS Version 1 0 Driving Wireless Convergence Disclaimer The information in this document pertains to information related to Redpine Signals Inc products This information is provided as a service to our customers and may be used for information purposes only Redpine assumes no liabilities or responsibilities for errors or omissions in this document This document may be changed at any time at Redpine s sole discretion without any prior notice to anyone Redpine is not committed to updating these documents in the future Copyright 2011 Redpine Signals Inc All rights reserved Redpine Signals Inc Proprietary and confidential Page 2 Lite Fi Driver Usage and Integration in Linux Version 1 0 Table of Contents DJ REDPINC D SIGNALS Driving Wireless Convergence 1 About This GUS r ssama aa 4 2 Lite Fi Host Driver Setup RequirementsS s 5 2 1 Hardware Requirements ssssssnssuuu222uuuuuunuunnnnnnnnnnnnnnnnnnn 5 2 2 Software Requirements for LINUX ss s
8. in menu e Now exit from the main menu and save the kernel configuration e Run make command This builds the customized kernel e Run make modules_install command e Run make install command This ensures that the customized kernel is installed and the boot loader is updated appropriately e Run reboot command e Select the Linux 2 6 30 kernel Once you have successfully booted The kernel is now ready for use 4 Building the Lite Fi Driver The Lite Fi driver is released in tgz format 1 Example RS GENR LNX SD X Y Z tgz 2 Copy the file into any directory in Linux system For example into work home pau 3 Follow the instructions given below to extract the driver source e cd work home paul tar zxvf RS GENR LNX SD X Y Z tgz 4 A directory RS GENR LNX SD xX y Z should be created 5 Change the current working directory to above created directory using e cd RS GEN R LNX SD X Y Z 6 You should see two more tgz files in this directory RS GENR INX S RS GENR INX S D X Y Z_NON_GPL tgz D X Y Z_GPL tgz 7 Extract the above two files e tar ZXVE RS GENR LNX SD X Y Z_NON_GPL tgz Redpine Signals Inc Proprietary and confidential Page 6 Lite Fi Driver zgr Usage and Integration in Linux SIGNALS Version 1 0 Driving Wireless Convergence e tar zxvf RS GENR LNX SD X Y Z_GPL tgz 8 Two directories with above name should be c
9. o server if connect sockfd struct sockaddr amp dest sizeof dest 0 perror Connect exit errno Get Hello bzero buffer MAXBUF recv sockfd buffer sizeof buffer 0 printf s buffer Clean up close sockfd return 0 KKK OK OK Redpine Signals Inc Proprietary and confidential Page 12
10. on 1 0 Driving Wireless Convergence Each network interface is typically on a different internet subnet The OS routing table determines the packet sending and reception from a network interface based on the IP address specified Redpine Signals Inc Proprietary and confidential Page 10 Lite Fi Driver zgr Usage and Integration in Linux SIGNALS Version 1 0 Driving Wireless Convergence 10 Appendix 10 1 Sample Client Program Reading from Socket simple client c x Copyright c 2000 Sean Walton and Macmillan Publishers Use may be in whole or in part in accordance to the General Public License GPL K THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE JEEE REEE ERREK K EE KAEA EE EEA KEA E E k A EEK E E EKRE EKKE
11. overs the following topics e Lite Fi Host driver setup requirements e Building the Lite Fi driver e Installing the Lite Fi driver e Uninstalling the Lite Fi driver e Using Lite Fi driver e Description of wireless tools on Linux e Using Wi Fi in sample client application Redpine Signals Inc Proprietary and confidential Page 4 Lite Fi Driver zgrrr Usage and Integration in Linux SIGNALS Version 1 0 Driving Wireless Convergence 2 Lite Fi Host Driver Setup Requirements This section describes the hardware and software environment for the installation and operation of the Redpine s Lite Fi RS9110 N 11 02 and RS9110 N 11 03 based evaluation boards The following configuration is required to install and use the Lite Fi SDIO host driver on Linux platforms 2 1 Hardware Requirements e A Microprocessor development platform with SDIO slot o A microprocessor can be Atmel SAM9 platform Freescale i MX platform Nvidia Tegra 2 and many other similar microprocessors e Lite Fi RS9110 N 11 02 or RS9110 N 11 03 Evaluation Board 2 2 Software Requirements for Linux e Fedora Core 10 and above Linux operating system e Linux kernel source code with SDIO stack enabled o Please refer to section Using SDIO in Linux 2 6 30 for details 3 Using SDIO in Linux 2 6 30 The Lite Fi host driver uses the SDIO stack available in Linux 2 6 30 kernel To configure the SDIO stack in Linux 2 6 30 you need the kernel source code
12. reated Note The Lite Fi driver comprises of two drivers namely the client driver and the master driver The folder RS GENR LNX SD X Y Z_NON_GPL contains the client driver source and the folder RS GENR LNX SD X Y Z_GPL contains the master driver source 9 Run the following commands in the same order to build the Lite Fi driver 10 To build the client module run the following commands e cd RS GENR LNX SD X Y 2Z2 NON _GPL OSD LINUX client e make clean e make 11 To build the master module run the following commands cd RS GENR LNX SD X Y Z_GPL OSD LINUX master e make clean e make 12 Execute the following to verify that the build process has been completed successfully e cd release e sh build_check sh Note Upon successful compilation a message Lite Fi driver is built compiled successfully appears on the console Note You may need to change the KERNELDIR macro in the Makefile of the GPL Non GPL directories to point to the kernel sources on the system if the default path as specified by this macro is different for your system 5 Installing the Lite Fi Driver To load the host driver module the following steps should be followed e Login as a super user Make sure that you are in release folder under RS GENR LNX SD X Y Z_GPL OSD LINUX release directory e cd RS GENR LNX SD X Y Z RS GENR LNX SD X Y Z_GPL OSD LINUX release e Run the following script to install the
Download Pdf Manuals
Related Search
Related Contents
油圧ショベル In Brillanz unübertroffen Copyright © All rights reserved.
Failed to retrieve file