Porting WLAN SoftAP to Android

From OMAPpedia

(Difference between revisions)
Jump to: navigation, search
(MCP 2.5.1 WiLink Driver: Description)
(Procedures to port WLAN driver on Android File System (AFS))
 
(41 intermediate revisions not shown)
Line 1: Line 1:
=MCP 2.5.1 WiLink Driver: Description=
=MCP 2.5.1 WiLink Driver: Description=
-
MCP WiLink 2.5.1 source code was tested as a standalone component on OMAP4 Blaze / OMAP4 BlazeTablet platforms with WiLink 1283 PG2.21 connectivity hardware.
+
MCP WiLink Driver 2.5.1 source code was tested as a standalone component on OMAP4 Blaze / OMAP4 BlazeTablet platforms with WiLink 1283 PG2.21 connectivity hardware.
-
 
+
-
== WLAN features are supported ==
+
-
 
+
-
* Scanning for and listing AP's SSID
+
-
* Connecting to the available AP
+
-
* Web browsing
+
-
* WLAN security (WEP40, WEP128, WPA, WPA2)
+
-
* Roaming (WLAN TI CLI)
+
-
* QoS
+
-
* BT-WLAN Coexistence
+
-
* STA WPS Security
+
-
* HotSpot(aka: SoftAP)
+
-
* SoftAP WPS(supported via TIAP CLI)
+
-
* EAP PEAP and TLS
+
-
* 802.11a
+
-
* Ad-hoc(WLAN TI CLI)
+
== Improvements in SoftAP 2.09 ==
== Improvements in SoftAP 2.09 ==
Line 29: Line 13:
= Procedures to port WLAN driver on Android File System (AFS) =
= Procedures to port WLAN driver on Android File System (AFS) =
-
This section explains the build procedure of porting WLAN driver in Android on OMAP4 platform.
+
This section explains the build procedure of porting WLAN SoftAP driver in Android on OMAP4 platform, Blaze.
Refer to www.omapzoom.org website for instructions on how to create a repo. Once you have the repo
Refer to www.omapzoom.org website for instructions on how to create a repo. Once you have the repo
ready, follow the steps below.
ready, follow the steps below.
*Step1: Build the kernel with WLAN specific configurations
*Step1: Build the kernel with WLAN specific configurations
-
*Step2: Build the WLAN driver
+
*Step2: Build the WLAN SoftAP driver
-
*Step3: Builds Android File System which includes wlan_loader, wlan_cu. Also places tiwlan.ini and other wifi related files under the path of /system/etc/wifi.
+
*Step3: Build Android File System including firmware loader, <b style="color:brown"> wlan_ap_loader </b>, and configuration tool, <b style="color:brown"> tiap_cu </b>, then  place <b style="color:brown"> tiwlan_ap.ini </b> and other SoftAP related files under the path of /system/etc/wifi/softap on target platform.
Note:
Note:
-
* Step1 and step2 needs to be done in order and use the same kernel.  
+
* Step1 and step2 need to be done in order and use the same kernel.  
 +
 
== To Enable WLAN on Linux Kernel ==
== To Enable WLAN on Linux Kernel ==
Line 72: Line 57:
   # make uImage
   # make uImage
-
== To Build WLAN Driver Procedures ==
 
-
* How to build WLAN driver:
+
== To Build SoftAP Driver Procedure ==  
-
: Go to WLAN Driver location:
+
-
# cd hardware/ti/wlan/wl1283
+
-
 
+
-
:Go to the build path:
+
-
# cd platform/os/linux
+
-
 
+
-
:Update following environment variables:
+
-
# export KERNEL_DIR = ${YOUR_PATH}/kernel/android-2.6.35
+
-
 
+
-
:Start the build:
+
-
# make TNETW=1283
+
-
 
+
-
:Place where the target files are placed after build:
+
-
Module File Name Location
+
-
------------------------------------------------------
+
-
WLAN Driver tiwlan_drv.ko platform/os/linux/
+
-
INI File tiwlan.ini config/
+
-
FIRMWARE firmware.bin downloaded from https://gforge.ti.com/gf/project/wilink_drivers/
+
-
 
+
-
== To Build WLAN SOFTAP Procedure ==  
+
* How to build SOftAP Driver:
* How to build SOftAP Driver:
-
:Go to WLAN Driver location:  
+
:Go to WLAN SoftAP Driver location:  
  # cd hardware/ti/wlan/wl1283_softAP/
  # cd hardware/ti/wlan/wl1283_softAP/
:Go to the build path:
:Go to the build path:
  # cd platforms/os/linux
  # cd platforms/os/linux
 +
 +
: Update the environment variable of kernel:
 +
# export KERNEL_DIR = ${YOUR_PATH}/kernel/android-2.6.35
:Make sure the following environment variables:
:Make sure the following environment variables:
Line 119: Line 86:
  FIRMWARE firmware_ap.bin downloaded from https://gforge.ti.com/gf/project/wilink_drivers/
  FIRMWARE firmware_ap.bin downloaded from https://gforge.ti.com/gf/project/wilink_drivers/
-
== Porting WLAN Driver To ANDROID File system (AFS) ==
+
== Porting SoftAP Driver To ANDROID File system (AFS) ==
-
* How to build up Android File System with TI WLAN Driver
+
 
-
This section we showed how to build ANDROID file system with all configuration files required for WLAN are placed in appropriate locations. And also wlan_loader and wlan_cu are built as part of Android file system. The functionality of wlan loader is used to download the WLAN firmware. The configuration utility (wlan_cu) provided by TI is used to configure WLAN driver and firmware, and to perform most WLAN operations, such as scanning, connecting, TX, RX, and calibration procedures.
+
* How to build up Android File System with TI WLAN SoftAP Driver
 +
This section we showed how to build ANDROID file system with all configuration files required for WLAN SoftAP are placed in appropriate locations. And also <b style="color:brown"> wlan_ap_loader </b> and <b style="color:brown"> tiap_cu </b> are built as part of Android file system.  
 +
 
 +
The functionality of wlan_ap_loader is used to download the WLAN SoftAP firmware. The configuration utility (tiap_cu) provided by TI is used to configure WLAN SoftAP driver and firmware, and to perform most SoftAP operations, such as signal channel, SSID, and beacon rate. Besides, Android uses a <b style="color:brown"> hostapd </b> daemon for Hotspot support.  
-
Android uses a modified wpa_supplicant daemon for wifi support which is controlled through a socket by WiFiHW that gets controlled from Android UI through android.net.wifi package.
 
: Location and versions:
: Location and versions:
-
  wpa_supplicant ver 0.5.x --> ${YOUR_PATH}/external/wpa_supplicant
+
  hostapd ver 0.6.x --> ${YOUR_PATH}/external/hostapd
-
wpa_supplicant ver 0.6.x --> ${YOUR_PATH}/external/wpa_supplicant_6
+
-
wpa_supplicant library --> ${YOUR_PATH}/hardware/ti/wlan/wl1283/wpa_supplicant_lib/
+
-
: To tell the Android build system to build supplicant with custom wpa_supplicant_library we add below lines to BoardConfig.mk file
+
: choose the hostapd version for GingerBread:
-
BOARD_WPA_SUPPLICANT_DRIVER := CUSTOM
+
  HOSTAPD_VERSION            := VER_0_6_X
-
: choose the supplicant version for GingerBread:
+
-
  WPA_SUPPLICANT_VERSION := VER_0_6_X
+
-
: The way WiFi driver in Gingerbread is selected by the variable of BOARD_WLAN_DEVICE in BoardConfig.mk file. We just specify the folder name of driver located in mydroid/hardware/ti/wlan folder as value of the variable:
+
: The way SoftAP driver in Gingerbread is selected by the variable of BOARD_SOFTAP_DEVICE in BoardConfig.mk file. We just specify the folder name of driver located in mydroid/hardware/ti/wlan folder as value of the variable:
-
  BOARD_WLAN_DEVICE := wl1283
+
 
 +
  BOARD_SOFTAP_DEVICE        := wl1283
:In our case, Android builds the following components
:In our case, Android builds the following components
-
*    wlan_loader 
+
*    wlan_ap_loader
-
*    wlan_cu
+
*    tiap_cu
-
*    wpa_supplicant_lib (driver_ti.c) and automatically copies tiwlan.ini and other configuration files to the appropriate location on target file system
+
*    hostapd and automatically copies tiwlan_ap.ini and hostapd.conf configuration files to the appropriate location on target file system
-
:So We specify the folder and name of the driver module and SoftAP in BoardConfig.mk:  
+
 
 +
:We have related SoftAP variables in BoardConfig.mk:  
 +
HOSTAPD_VERSION    := VER_0_6_X
  BOARD_SOFTAP_DEVICE := wl1283
  BOARD_SOFTAP_DEVICE := wl1283
-
WIFI_DRIVER_MODULE_PATH := "/system/etc/wifi/tiwlan_drv.ko"
 
-
WIFI_DRIVER_MODULE_NAME := "tiwlan_drv"
 
-
WIFI_FIRMWARE_LOADER := "wlan_loader"
 
-
:By the way, make sure the system property file (device/ti/blaze/system.prop)has definition for wifi interface:
+
:Ensure the interface defined in hostapd.conf (...system/etc/wifi/softap/)
-
  wifi.interface=tiwlan0
+
  interface=tiap0
:Finally, these files need to be placed in properly locations on target platform before testing:
:Finally, these files need to be placed in properly locations on target platform before testing:
  Kernel image        --> /root/uImage
  Kernel image        --> /root/uImage
-
  Driver module       --> /system/etc/wifi/tiwlan_drv.ko
+
  SoftAP Driver module --> /system/etc/wifi/softap/tiap_drv.ko
-
SoftAP Driver module --> /system/etc/wifi/tiap_drv.ko
+
-
WLAN Firmware file  --> /system/etc/wifi/firmware.bin
+
  SoftAP firmware file --> /system/etc/wifi/softap/firmware_ap.bin
  SoftAP firmware file --> /system/etc/wifi/softap/firmware_ap.bin
-
= Testing WiFi on Blaze Platform with GingerBread =
+
= Testing SoftAP on Blaze Platform with GingerBread =
-
=== TxBiP Calibration ===
+
===SOFT AP Setup and Testing===
-
Congratulation! Now you have the kernel, WLAN driver and file system built, follow the procedure below to
+
# Once you have the kernel, SoftAP driver and file system built, follow the procedure below to set up and test SoftAP on Blaze.
-
calibrate and set up testing WLAN on Android platform.
+
# Place the files <b style="color:brown"> tiap_drv.ko </b> and <b style="color:brown"> firmware_ap.bin </b> in the folder of /system/etc/wifi/softap
 +
# Make sure /system/etc/wifi/softap folder also has <b style="color:brown"> tiwlan_ap.ini </b> and <b style="color:brown"> hostapd.conf </b>. These are placed in the location when file system is built.
 +
Note:
 +
Make sure you use the same kernel that you built the kernel image as the SoftAP drivers.
-
* Place the files <b style="color:brown"> tiwlan_drv.ko </b> and <b style="color:brown"> firmware.bin </b> in the folder /system/etc/wifi of file system
 
-
* Make sure /system/etc/wifi folder also has <b style="color:brown"> tiwlan.ini </b> and <b style="color:brown"> wpa_supplicant.conf </b> file. These are placed in the location when file system is built.
 
-
* Make sure you use the same kernel that you built the kernel image as the WLAN drivers.
 
-
==== TxBiP Calibration Procedure ====
+
====SOFTAP Testing by Gingerbread GUI====
-
The TX calibration aims to reduce/eliminate any temperature/voltage/process variations and to optimize the wireless performance. It is mandatory for every hardware plaform to have TxBip calibration before any testing or using. WLAN calibrations need to be applied by the customer as part of a TX BiP (TX Built In Production line testing).
+
Note:
 +
Before making OMAP4(Blaze) in AP mode, make sure normal WiFi is turned off and similarly if you want to use normal WiFi, turn off SoftAP.
-
Before executing calibration, you could see the following lines on your console as you turn on Wi-Fi:
+
* SoftAP can now be turned on through Tethering (HotSpot) option in Android UI:
-
<pre>
+
Settings --> Wireless & network settings --> Tethering & portable hotspot --> Portable Wi-Fi hotspot
-
TIWLAN: 1089.979242: Starting to process NVS...
+
:to configure and start to configure the property...
-
TIWLAN: 1089.983698: No Nvs, Setting default MAC address
+
-
TIWLAN: 1089.989007: pHwInit->uEEPROMCurLen: 1c
+
-
TIWLAN: 1089.993462: ERROR: If you are not calibating the device, you will soon get errors !!!
+
-
</pre>
+
-
:Follow the procedures to perform calibration for your Blaze:
+
* Followed by the procedure above, confige Wi-Fi hotspot SSID and security by:
 +
Settings --> Wireless & network settings --> Tethering & portable hotspot
 +
--> Portable Wi-Fi hotspot settings --> Configure Wi-Fi hotspot
 +
:define the "Network SSID" as ‘AndroidAP’ and choose "Security" option on the drop-down menu:
 +
Open or WPA2 PSK //They are only secury options of portable hotspot supported by Gingerbread
 +
:'Save' the configuration...
-
:Insert WLAN driver kernel module:
+
* Now on other Blaze board or laptop
-
# insmod system/etc/wifi/tiwlan_drv.ko
+
# Scan for ‘AndroidAP’ AP and click on 'Connect'. You should be now able to connect to it.
-
:Load the firmware and bring the interface up by issuing commands below. Use appropriate IP address:
+
# Browse the PC, connecting to the Ethernet interface of SoftAP, by typing the PC IP address in browser.
-
# start wlan_loader
+
-
# ifconfig tiwlan0 up
+
-
:Launch the WLAN TI CLI with supplicant and start executing WLAN commands:
+
-
# wlan_cu –b // Bypass supplicant and for calibration
+
-
:then, run the following commands:
+
-
For <u>802.11bg/n (2.4 GHz):</u>
+
* Turn off Hotspot by clicking
 +
Menu --> Settings --> Wireless & Networks --> Tethering & portable hotspot --> Portable Wi-Fi hotspot
-
# / w p 1 l 2 f 2        //Activate the power and set default power level to be "Awake"
+
====SOFTAP Testing by TI WLAN SOFTAP CLI (non GUI)====
-
# / t b v 21              //Set the NVS to be Rev 2.1
+
-
# / t b t 1 0 0 0 0 0 0 0 //Filling MAC address to NVS
+
-
For <u>802.11a (5 GHz):</u>
+
* Please follow the procedure to setup SOFTAP and launch SOFTAP CLI:
 +
:Go the path
 +
# cd /system/etc/wifi/softap
 +
:Insert softap kernel modules:
 +
# insmod tiap_drv.ko
 +
:Load the firmware and bring the interface up by issuing commands below. 
 +
# start wlan_ap_loader
 +
# ifconfig tiap0 up
 +
:Ensure you have <b style="color:brown"> hostapd.conf </b> file placed in /data/misc/wifi on target file system, then start <b style="color:brown"> hostapd </b> by this command:
 +
# start hostapd
 +
:Launch the WLAN SOFTAP CLI with supplicant and start executing tiap commands:
 +
# tiap_cu -b
-
  # / w p 1 l 2 f 2
+
:After Launching SOFTAP CLI, do the following configurations:
-
  # / t b v 21
+
*<u> SoftAP with WEP security </u>:
-
  # / t b t 1 1 1 1 1 1 1 1
+
: You can assign 10 digits WEP password (field highlighted).
-
  # / q
+
 +
  # / m e c 13 <b style="color:red"> 1234567890 </b>
 +
  # / m e s
 +
  # / m e r
 +
  # / q
-
:Now you have a NVS File in your setup:
+
*or <u> with WPA1-PSK security </u>:
-
 
+
   
-
:remove the WLAN driver and finish the calibration:
+
  # / m e c 18 1
-
# rmmod tiwlan_drv
+
  # / m e c 20 <b style="color:red"> psk12345 </b>                           //define wpa_passphrase
-
 
+
  # / m e c 21 WPA-PSK                              //define wpa_key_mgmt
-
:Turn off and turn on Wifi to have the NVS file to take effect...
+
  # / m e c 22 TKIP                                //define wpa_pairwise=TKIP
-
 
+
# / m e c 23 TKIP                                //define rsn_pairwise=TKIP
-
<pre>
+
# / m e s                                         //save configuration
-
TIWLAN: 1109.092335: Working on a 1283 PG 2.21 board.
+
# / m e r                                         //restart softap
-
TIWLAN: 1109.126821: Starting to process NVS...
+
  # / q
-
TIWLAN: 1109.131307: NVS found, EEPROM Image addr=0xeed03c00, EEPROM Len=0x0x1d4
+
-
</pre>
+
-
 
+
-
Note:
+
-
* Never turn on wifi using UI for calibration
+
-
* This calibration is board specific so NVS file generated on one board cannot be used on another OMAP4 board. Tx BIP should be run only once per platform. This calibration is board specific and and the data you get from it is saved to the NVS file, which generated on one board cannot be used on another OMAP4 board. By the way, you do not need to run Tx BIP again for costumer modifications in the INI file.
+
-
* Make sure your MAC address is updated and unique.
+
-
* Please refer to [http://omappedia.com/wiki/WLAN_FirmwareCalibration WLAN Firmware and Calibration] for the details.
+
-
 
+
-
 
+
-
=== Setup Android GUI for testings ===
+
-
 
+
-
* Bring up the Android board. Once you have the UI up and running, you can turn on WLAN by going to:
+
-
  Menu --> Settings --> Wireless & Networks --> WiFi Settings
+
-
* Click on
+
-
  Turn on WiFi
+
-
*You should see that wifi is turned on and list of available Access Points (AP) are shown
+
-
*Click on any AP you wish to connect and click on
+
-
Connect
+
-
*You should see that it acquires IP address from that AP and gets connected. If it fails turn off wifi and turn on again.
+
-
 
+
-
==== Web Browsing ====
+
-
 
+
-
*Follow the procedure in section Scan & Connect to connect to a desired AP
+
-
*Now launch the browser and start using it for web browsing
+
-
 
+
-
==== WLAN Security ====
+
-
 
+
-
WLAN driver supports WEP (40 bit), WEP (128bit), WPA-PSK (TKIP) and WPA2-PSK (AES)
+
-
*Configure the AP to one of the security type above with appropriate passkey
+
-
*Follow the procedure in section Scan & Connect to scan for networks
+
-
*Click on the AP SSID that you configured for security, enter the passkey and click connect
+
-
*You should be now connected to AP with security
+
-
 
+
-
==== Enterprise Security: EAP PEAP and TLS ====
+
-
:Please ensure that following lines are present in the init.rc file which are required for storing certification files (credentials) in Android system:
+
-
mkdir /data/misc/keystore 0777 keystore keystore
+
-
  service keystore /system/bin/keystore /data/misc/keystore
+
-
    user keystore
+
-
  group keystore
+
-
  socket keystore stream 666
+
-
 
+
-
* Ensure that the Android system date and time are set appropriately, as the certificate validation is dependent on these parameters.
+
-
* Ensure that a valid certificate is provided to you from the administrator in pkcs12 format.
+
-
* Rename the certificate from <any name>.pfx to <any name>.p12 and place it in root of SD card(1st partition)
+
-
* To install the certificate on the OMAP4 Blaze
+
-
a)Goto
+
-
  Settings -> Location & Security -> Use secure credentials
+
-
  Type credential storage password minimum 8 characters.
+
-
b)Goto
+
-
  Settings -> Location & Security -> Install from SD card
+
-
  Click on <any name>.p12 and give the following credentials
+
-
      -Enter the password to extract the certificates when prompted(password must be same that you specified while exporting the certificate)
+
-
      -Enter <any name> for Name the certificate
+
-
      -Enter credential storage password that you have set in step (a)
+
-
      You should see that certificate installed message is displayed:
+
-
  c)Goto
+
-
  Settings --> Wireless & Networks --> WiFi Settings
+
-
  You must see Access Point (AP) that you have configured in Enterprise security mode.
+
-
  Click on AP that is secured with 802.1x EAP and give the following credentials
+
-
      -Select PEAP or TLS EAP method
+
-
      -Phase 2 authentication None
+
-
      -CA certificate Name that you have installed
+
-
      -Client certificate Name that you have installed
+
-
      -Identity the User Identity
+
-
      -Anonymous Identity blank
+
-
      -Wireless password
+
-
  Click on "Connect".
+
-
  You should see that it acquires IP address from that AP and gets connected
+
-
 
+
-
=== Using WLAN TI CLI interface (non GUI)for testings ===
+
-
 
+
-
NOTE:
+
-
* Before starting to use WLAN TI CLI, turn on wifi once using GUI so that the wpa_supplicant files are placed in appropriate place by the framework.
+
-
 
+
-
:Insert WLAN driver kernel module:
+
-
  # insmod tiwlan_drv.ko
+
-
:Load the firmware and bring the interface up by issuing commands below. Use appropriate IP address:
+
-
# start wlan_loader
+
-
# ifconfig tiwlan0 192.168.0.101 netmask 255.255.255.0
+
-
:Start wpa_supplicant by this command:
+
-
# start wpa_supplicant
+
-
:Launch the WLAN TI CLI with supplicant and start executing wlan commands:
+
-
# wlan_cu –itiwlan0 // Connect with supplicant and start executing wlan commands
+
-
 
+
-
 
+
-
==== Ad-hoc (CLI) ====
+
-
 
+
-
Ad-hoc (IBSS) or peer to peer connection can be tested only with WLAN TI CLI.
+
-
Joining existing Ad-Hoc network
+
-
 
+
-
* Create an Ad-hoc network in any laptop which has wifi.
+
-
# When creating the ad-hoc network choose Network Authentication as "open" and Data Encryption as "disabled":
+
-
# Disable all other wireless interfaces on that laptop:
+
-
# Configure a static IP address for the wifi interface on the laptop:
+
-
 
+
-
* On OMAP4 platform(Blaze), follow the procedure above to launch the WLAN TI CLI
+
-
* After launching the CLI do the following
+
-
# Set management mode to Ad-hoc (/ m m 0)
+
-
# Perform a scan (/ a s)
+
-
# View the list of networks (/ c b)
+
-
# Connect to the Ad-Hoc network you created on laptop (/ c c name)
+
-
* Now you should be connected to Ad-Hoc network
+
-
 
+
-
==== Roaming (CLI) ====
+
-
 
+
-
* Roaming feature of WiFi can also be tested only through WLAN TI CLI.
+
-
# Have 2 AP configured with same SSID.
+
-
# On OMAP4(Blaze), follow the procedure above to launch the WLAN TI CLI
+
-
# After launching the CLI do the following to enable roaming
+
-
# Enable roaming (/ g e)
+
-
# Store the scan policy in scan menu (/ a p s)
+
-
# Start a scan (/ a s)
+
-
# Connect to the AP name that you configured (/ c c SSID)
+
-
 
+
-
* Now if you turn off the AP that Blaze board was connected to it will automatically connect to the other AP with same SSID
+
-
 
+
-
==== Iperf (Throughput Measurement) ====
+
-
 
+
-
Iperf instructions are in separate document. Follow the procedure mentioned in WCG_WLAN_Android_Iperf_Instruction.doc to measure WLAN throughput using iperf
+
-
 
+
-
 
+
-
==== 802.11a (CLI) ====
+
-
 
+
-
802.11a mode can also be tested only through WLAN TI CLI.
+
-
(copy tiwlan_dual.ini from the clearcase and rename to tiwlan.ini into folder system/etc/wifi)
+
-
# Enable 802.11a mode and select the channel (40) in the AP
+
-
# On OMAP4 follow the procedure in "Using WLAN TI CLI interface" to launch the WLAN TI CLI
+
-
# After launching the CLI, do the following procedures
+
-
:Register ScanComplete event (/ v r 5)
+
-
- / a a
+
-
- g <empty> 1 1 3 32 0 12
+
-
- c 0 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 36
+
-
- c 1 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 40
+
-
- c 2 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 44
+
-
- c 3 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 48
+
-
- c 4 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 52
+
-
- c 5 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 56
+
-
- c 6 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 60
+
-
- c 7 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 64
+
-
- c 8 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 149
+
-
- c 9 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 153
+
-
- c 10 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 157
+
-
- c 11 ff:ff:ff:ff:ff:ff 60000 30000 0 0 250 161
+
-
- d
+
-
- ..
+
-
- s
+
-
- / c b
+
-
  - / c c ssid
+
-
Wait for IpcEvent_PrintEvent - received IPC_EVENT_SCAN_COMPLETE message
+
-
View the list of networks (/ c b)
+
-
 
+
-
:You should be able to see the AP that is configured for (1) band and verify the channel it is operating in is 40
+
-
Connect to the network (/ c c name)
+
-
:Now you should be connected to network
+
-
Note: You can refer to [http://omappedia.com/wiki/WLAN_FirmwareCalibration WLAN Firmware and Calibration] for the RF calibration in 802.11a.
+
 +
* On other Blaze boards or laptops:
 +
#Scan for the AP named as ‘AndroidAP’ and click on 'connect' and enter the WEP/WPA1-PSK password configured in previous steps. You should be now able to connect to portable hotspot.
 +
#Browse the PC, connecting to Ethernet interface of SoftAP, by typing the PC IP address in browser.
=Summary=
=Summary=
Line 382: Line 203:
'''Commit Id:'''  263d8ce082a823185ea0e13d8ccd58491b13177a <br>
'''Commit Id:'''  263d8ce082a823185ea0e13d8ccd58491b13177a <br>
-
===SOFT AP Setup and Testing===
 
-
# Once you have the kernel, SOFT AP driver and file system built, follow the procedure below to setup and test SOFT AP on Android.
 
-
# Place the files tiap_drv.ko and firmware_ap.bin in the folder of /system/etc/wifi/softap
 
-
# Make sure /system/etc/wifi/softap folder also has tiwlan_ap.ini and hostapd.conf. These are placed in the location when file system is built.
 
-
Note:
 
-
Make sure you use the same kernel that you built the kernel image as the WLAN drivers.
 
-
 
-
 
-
====SOFT AP Testing by GUI====
 
-
Note:
 
-
Before making OMAP4(Blaze) in AP mode, make sure normal wifi is turned off and similarly if you want to use normal wifi turn off AP mode.
 
-
 
-
# SoftAP can now be tested through HotSpot option in Android UI.
 
-
# Click
 
-
Settings --> Wireless & Networks --> Tethering & HotSpot
 
-
:to configure and start using:
 
-
 
-
====SOFT AP Testing TI CLI(non GUI)====
 
-
 
-
:Please follow section SOFT AP Setup:
 
-
:Go the path of SOFT AP
 
-
# cd /system/etc/wifi/softap
 
-
:Insert soft ap kernel modules:
 
-
# insmod tiap_drv.ko
 
-
:Load the firmware and bring the interface up by issuing commands below. Use appropriate IP address.
 
-
# start wlan_ap_loader
 
-
# ifconfig tiap0 up
 
-
:Start hostapd by this command. Before starting hostapd make sure you have "hostapd.conf" file placed in /data/misc/wifi of target file system:
 
-
# start hostapd
 
-
:Launch the WLAN SOFT API CLI with supplicant and start executing tiap commands:
 
-
# tiap_cu -b
 
[http://www.omappedia.org/wiki/OMAP_WiLink_Connectivity_Home Back to Connectivity Home Page]
[http://www.omappedia.org/wiki/OMAP_WiLink_Connectivity_Home Back to Connectivity Home Page]

Latest revision as of 16:12, 25 April 2011

Contents

[edit] MCP 2.5.1 WiLink Driver: Description

MCP WiLink Driver 2.5.1 source code was tested as a standalone component on OMAP4 Blaze / OMAP4 BlazeTablet platforms with WiLink 1283 PG2.21 connectivity hardware.

[edit] Improvements in SoftAP 2.09

[edit] Procedures to port WLAN driver on Android File System (AFS)

This section explains the build procedure of porting WLAN SoftAP driver in Android on OMAP4 platform, Blaze. Refer to www.omapzoom.org website for instructions on how to create a repo. Once you have the repo ready, follow the steps below.

Note:


[edit] To Enable WLAN on Linux Kernel

 # make menuconfig
Enable wireless extension in networking support (Default setting):
 [*] Networking Support --->
 [*] Wireless --->
Enable MMC5 support in OMAP:
 Device Drivers --->
 <*> MMC/SD/SDIO card Support --->
 <*> TI OMAP High Speed Multimedia Card Interface support
Disable Module Versioning Support:
 [*] Enable loadable module support --->
 [ ] Module versioning support
Enable TI WLAN enhanced SDIO support and interface controller number to 5 in system type:
 System Type --->
 [*] Enable WiFi control function abstraction
 [*] TI WLAN Enhanced SDIO Controller support
 (5) MMC Controller number that TI WLAN chip is connected to
Update following environment variables and build the Kernel:

Please note Toolchain required is 2010q1-202.[1]

 # export YOUR_PATH=`pwd`
 # export PATH=${YOUR_PATH}/u-boot/tools:${PATH} //path of mkimage for uImage
 # export PATH=$PATH:${YOUR_PATH}/toolchain/arm-2010q1/bin //path of cross complier
 # cd ${YOUR_PATH}/kernel/android-2.6.35 
 # export CROSS_COMPILE=arm-none-linux-gnueabi-
 # export ARCH=arm
 # make android_4430_defconfig
 # make uImage


[edit] To Build SoftAP Driver Procedure

Go to WLAN SoftAP Driver location:
# cd hardware/ti/wlan/wl1283_softAP/
Go to the build path:
# cd platforms/os/linux
Update the environment variable of kernel:
# export KERNEL_DIR = ${YOUR_PATH}/kernel/android-2.6.35 
Make sure the following environment variables:
# echo $PATH            //<Location of your compiler>:$PATH
# echo $CROSS_COMPILE   //arm-none-linux-gnueabiexport
# echo $ARCH            //arm
# echo $KERNEL_DIR      //<path to the kernel folder where you performed step1>
Start the build:
# make TNETW=1283
Place where the target files are placed after build:
Module 		File Name 	Location
------------------------------------------------------
WLAN Driver 	tiap_drv.ko 	platform/os/linux/
INI File 	tiwlan_ap.ini 	config/
FIRMWARE 	firmware_ap.bin downloaded from https://gforge.ti.com/gf/project/wilink_drivers/

[edit] Porting SoftAP Driver To ANDROID File system (AFS)

This section we showed how to build ANDROID file system with all configuration files required for WLAN SoftAP are placed in appropriate locations. And also wlan_ap_loader and tiap_cu are built as part of Android file system.

The functionality of wlan_ap_loader is used to download the WLAN SoftAP firmware. The configuration utility (tiap_cu) provided by TI is used to configure WLAN SoftAP driver and firmware, and to perform most SoftAP operations, such as signal channel, SSID, and beacon rate. Besides, Android uses a hostapd daemon for Hotspot support.

Location and versions:
hostapd ver 0.6.x --> ${YOUR_PATH}/external/hostapd
choose the hostapd version for GingerBread:
HOSTAPD_VERSION             := VER_0_6_X
The way SoftAP driver in Gingerbread is selected by the variable of BOARD_SOFTAP_DEVICE in BoardConfig.mk file. We just specify the folder name of driver located in mydroid/hardware/ti/wlan folder as value of the variable:
BOARD_SOFTAP_DEVICE         := wl1283
In our case, Android builds the following components
We have related SoftAP variables in BoardConfig.mk:
HOSTAPD_VERSION     := VER_0_6_X
BOARD_SOFTAP_DEVICE := wl1283
Ensure the interface defined in hostapd.conf (...system/etc/wifi/softap/)
interface=tiap0 
Finally, these files need to be placed in properly locations on target platform before testing:
Kernel image         --> /root/uImage
SoftAP Driver module --> /system/etc/wifi/softap/tiap_drv.ko
SoftAP firmware file --> /system/etc/wifi/softap/firmware_ap.bin

[edit] Testing SoftAP on Blaze Platform with GingerBread

[edit] SOFT AP Setup and Testing

  1. Once you have the kernel, SoftAP driver and file system built, follow the procedure below to set up and test SoftAP on Blaze.
  2. Place the files tiap_drv.ko and firmware_ap.bin in the folder of /system/etc/wifi/softap
  3. Make sure /system/etc/wifi/softap folder also has tiwlan_ap.ini and hostapd.conf . These are placed in the location when file system is built.

Note: Make sure you use the same kernel that you built the kernel image as the SoftAP drivers.


[edit] SOFTAP Testing by Gingerbread GUI

Note: Before making OMAP4(Blaze) in AP mode, make sure normal WiFi is turned off and similarly if you want to use normal WiFi, turn off SoftAP.

Settings --> Wireless & network settings --> Tethering & portable hotspot --> Portable Wi-Fi hotspot
to configure and start to configure the property...
Settings --> Wireless & network settings --> Tethering & portable hotspot 
--> Portable Wi-Fi hotspot settings --> Configure Wi-Fi hotspot
define the "Network SSID" as ‘AndroidAP’ and choose "Security" option on the drop-down menu:
Open or WPA2 PSK //They are only secury options of portable hotspot supported by Gingerbread
'Save' the configuration...
  1. Scan for ‘AndroidAP’ AP and click on 'Connect'. You should be now able to connect to it.
  2. Browse the PC, connecting to the Ethernet interface of SoftAP, by typing the PC IP address in browser.
Menu --> Settings --> Wireless & Networks --> Tethering & portable hotspot --> Portable Wi-Fi hotspot

[edit] SOFTAP Testing by TI WLAN SOFTAP CLI (non GUI)

Go the path
# cd /system/etc/wifi/softap
Insert softap kernel modules:
# insmod tiap_drv.ko
Load the firmware and bring the interface up by issuing commands below.
# start wlan_ap_loader
# ifconfig tiap0 up
Ensure you have hostapd.conf file placed in /data/misc/wifi on target file system, then start hostapd by this command:
# start hostapd
Launch the WLAN SOFTAP CLI with supplicant and start executing tiap commands:
# tiap_cu -b
After Launching SOFTAP CLI, do the following configurations:
You can assign 10 digits WEP password (field highlighted).
#	/ m e c 13  1234567890 
#	/ m e s
#	/ m e r
#	/ q
#	/ m e c 18 1
#	/ m e c 20  psk12345                            //define wpa_passphrase
#	/ m e c 21 WPA-PSK                              //define wpa_key_mgmt
#	/ m e c 22 TKIP                                 //define wpa_pairwise=TKIP
#	/ m e c 23 TKIP                                 //define rsn_pairwise=TKIP
#	/ m e s                                         //save configuration
#	/ m e r                                         //restart softap
#	/ q
  1. Scan for the AP named as ‘AndroidAP’ and click on 'connect' and enter the WEP/WPA1-PSK password configured in previous steps. You should be now able to connect to portable hotspot.
  2. Browse the PC, connecting to Ethernet interface of SoftAP, by typing the PC IP address in browser.

[edit] Summary

OS Kernel: Linux® 2.6.35
WLAN Driver Version: MCP-WiLink_Driver_2.5.3.0.18
WLAN Firmware Version: Rev 7.1.3.10.54
SOFT AP Driver Version: WiLink_Driver_AP_6.2.0.0.50
SOFT AP Firmware Version: Rev 7.2.0.0.48
Hardware: OMAP4 Blaze(ES 2.2) (with 1283 PG 2.21 Connectivity device)

GIT Project: git://git.omapzoom.org/platform/hardware/ti/wlan.git
Commit Id: 263d8ce082a823185ea0e13d8ccd58491b13177a


Back to Connectivity Home Page

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox