WLAN support

102 views
Skip to first unread message

ramya mohan

unread,
Apr 29, 2011, 2:18:29 AM4/29/11
to pandaboard
I have followed the steps as :


Builing WLAN driver (1271)

* Download the WLAN 1271 Connectivity Package.

It has the patch, firmware binary and BT/FM init scripts.
# 0001-Patch-for-WL1271-driver-for-Blaze-COM6-and-Pandroid.patch /
0001-omap_pm_set_min_mpu_freq-is-not-defined-in-p-android.patch must
be applied to WiLink6 driver in order to load the driver on Blaze +
COM6 setup.

* Apply the patch:

$cd $MYDROID
$cd hardware/ti/wlan/
To check whether the WiLink6 driver is latest, check the git log for
following commit ID: c7e399e2804729c5d271ce58a9f299a2fa2a0631.
$git apply --stat --check -v <Path to patch 0001-Patch-for-WL1271-
driver-for-Blaze-COM6-and-Pandroid.patch > //to check whether old
patch can be applied or not
$git apply -v <Path to patch 0001-Patch-for-WL1271-driver-for-Blaze-
COM6-and-Pandroid.patch > //to actually apply patch
$git apply --stat --check -v <Path to patch 0001-
omap_pm_set_min_mpu_freq-is-not-defined-in-p-android.patch > //to
check whether old patch can be applied or not
$git apply -v <Path to patch 0001-omap_pm_set_min_mpu_freq-is-not-
defined-in-p-android.patch > //to actually apply patch
# Building WLAN Driver
Update following environment variables in wl_env.bash file located at
$MYDROID/hardware/ti/wlan/wl1271/platforms/os/linux/
export CROSS_COMPILE=arm-none-linux-gnueabi-
export ARCH=arm
export HOST_PLATFORM=blaze
export KERNEL_DIR=<path to the kernel folder which was built above>
(e.g.) export KERNEL_DIR=/home/name/omap4/pandroid/L27.8.2_panda/
kernel-omap
$cd $MYDROID/hardware/ti/wlan/wl1271/platforms/os/linux/
$source wl_env.bash $make
We will get tiwlan_drv.ko in $MYDROID/hardware/ti/wlan/wl1271/
platforms/os/linux/
# Configuration for WLAN
Make sure the file vendor device $MYDROID/ti/blaze/BoardConfig.mk has
all wifi related definitions:

1. Wifi

BOARD_WPA_SUPPLICANT_DRIVER := CUSTOM
BOARD_WLAN_DEVICE := wl1271
WPA_SUPPLICANT_VERSION := VER_0_6_X
WIFI_DRIVER_MODULE_PATH := "/system/etc/wifi/tiwlan_drv.ko"
WIFI_DRIVER_MODULE_NAME := "tiwlan_drv"
WIFI_FIRMWARE_LOADER := "wlan_loader"
Make sure the system property file $MYDROID/device/ti/blaze/
system.prop has definition for wifi interface
wifi.interface=tiwlan0

[edit] Installing 1271 WLAN firmware from the package

Place the file tiwlan_drv.ko build from previous step to system/etc/
wifi. Go to platform/os/linux folder and copy the required files to
file system:
$ cd $MYDROID/hardware/ti/wlan/wl1271/platforms/os/linux
$ cp tiwlan_drv.ko $MYDROID/out/target/product/blaze/system/etc/wifi

Another file, firmware.bin is also required but this must be obtained
from the package from the below link.
Please download the package WLAN 1271 Connectivity Package

$ chmod 777 Froyo_L27.8.2_Connectivity_1271-1.0-Linux-x86-Install
$./Froyo_L27.8.2_Connectivity_1271-1.0-Linux-x86-Install
$ cd $MYDROID/out/target/product/blaze/system/etc/wifi
$ cp $YOUR_PATH/WLAN_firmware/firmware.bin .
$ chmod 777 $MYDROID/out/target/product/blaze/system/etc/wifi/
firmware.bin


[edit] How to Enable/Test WLAN

Important note for WLAN driver (tiwlan_drv.ko).

First kernel should be built and then WLAN driver. Every time if
kernel is rebuild, the wlan driver must be built again.

Improtant note before starting WLAN testing

1) Make sure the firmware (firmware.bin) and tiwlan_drv.ko (built) are
part of system/etc/wifi folder of filesystem. Firmware.bin can be
obtained from the WLAN 1271 Connectivity Package

2) Please follow the steps mentioned in "Preparing Android binaries"
section to copy WLAN driver (tiwlan_drv.ko) to file system
http://omappedia.org/wiki/OMAP_Pandroid_Main#Android_filesystem

Below video will show you how to enable WLAN drivers on Pandroid :

Test WLAN from Android UI

1. Go to Settings, Wireless and Network
2. Select "Wi-Fi". This will show "Turning On..."
3. Once Wi-Fi is turned On, it will scan for the available networks
and connect
4. If you would want to select a particular network, select "Wi-Fi
settings" and select from the list of "Wi-Fi networks"

This will enable WLAN and you should be able to use Browser to connect
to internet.


But WHEN I try to enable the module it is crashing as Unable to
insmod the driver.
Anybody please help.
Thanks in advance.

orbarron

unread,
Apr 29, 2011, 12:06:57 PM4/29/11
to pandaboard
do you need to stay on this release?

You could move to http://www.omappedia.com/wiki/PandaBoard_L27.10.2-P1_Release_Notes

This has better support for wlan.

~orbarron
> section to copy WLAN driver (tiwlan_drv.ko) to file systemhttp://omappedia.org/wiki/OMAP_Pandroid_Main#Android_filesystem

Michael

unread,
May 8, 2011, 10:09:10 PM5/8/11
to pandaboard
Hi, Orbarron,

I tried to build the wifi for L27.10.2-P1. I have tried the
instructions in http://www.omappedia.com/wiki/PandaBoard_L27.10.2-P1_Release_Notes
and http://www.omapedia.org/wiki/OMAP_Pandroid_Main#WLAN. But I still
get compile error as follows. Do you have any idea how to compile the
wifi?

michaelzhenwang@felix:~/pandroid.froyo/L27.10.2-P1/mydroid/hardware/ti/
wlan/wl1283/platforms/os/linux$ make ARCH=arm TNETW=1273
rm -f ../../../platforms/os/linux/tiwlan_drv.ko ../../../stad/build/
linux/libestadrv.a ../../../platforms/os/common/build/linux/
libuadrv.a ../../../platforms/os/linux/build/
tiwlan_drv_stub.o ../../../CUDK/output/wlan_cu ../../../CUDK/output/
tiwlan_loader ../../../CUDK/output/wlan_logger
make -C ../../../stad/build/linux CROSS_COMPILE= DEBUG=y BUILD_SUPPL=n
SUPPL=ANDROID WSPI=n INTR=y XCC=n INFO=n STATIC_LIB=y
make[1]: Entering directory `/home/michaelzhenwang/pandroid.froyo/
L27.10.2-P1/mydroid/hardware/ti/wlan/wl1283/stad/build/linux'
rm -f ../../../stad/build/linux/libestadrv.a
EXTRA_CFLAGS = -fsigned-char -Werror -D __LINUX__ -D GEM_SUPPORTED -D
TI_RANDOM_DEFAULT_MAC -D TI_DBG -D REPORT_LOG -O2 -D
__BYTE_ORDER_LITTLE_ENDIAN -D SUPPL_WPS_SUPPORT -D OMAP_LEVEL_INT -D
HOST_COMPILE -D FW_RUNNING_AS_STA -D TNETW1273
make -C /home/michaelzhenwang/pandroid.froyo/L27.10.2-P1/kernel/
android-2.6.35 M=`pwd` ARCH=arm CROSS_COMPILE= modules
make[2]: Entering directory `/home/michaelzhenwang/pandroid.froyo/
L27.10.2-P1/kernel/android-2.6.35'
CC [M] /home/michaelzhenwang/pandroid.froyo/L27.10.2-P1/mydroid/
hardware/ti/wlan/wl1283/stad/build/linux/../../../stad/src/
Ctrl_Interface/DrvMain.o
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
/home/michaelzhenwang/pandroid.froyo/L27.10.2-P1/mydroid/hardware/ti/
wlan/wl1283/stad/build/linux/../../../stad/src/Ctrl_Interface/
DrvMain.c:1: error: unknown ABI (aapcs-linux) for -mabi= switch
/home/michaelzhenwang/pandroid.froyo/L27.10.2-P1/mydroid/hardware/ti/
wlan/wl1283/stad/build/linux/../../../stad/src/Ctrl_Interface/
DrvMain.c:1: error: bad value (armv5t) for -march= switch
/home/michaelzhenwang/pandroid.froyo/L27.10.2-P1/mydroid/hardware/ti/
wlan/wl1283/stad/build/linux/../../../stad/src/Ctrl_Interface/
DrvMain.c:1: error: bad value (armv5t) for -mtune= switch
make[3]: *** [/home/michaelzhenwang/pandroid.froyo/L27.10.2-P1/mydroid/
hardware/ti/wlan/wl1283/stad/build/linux/../../../stad/src/
Ctrl_Interface/DrvMain.o] Error 1
make[2]: *** [_module_/home/michaelzhenwang/pandroid.froyo/L27.10.2-P1/
mydroid/hardware/ti/wlan/wl1283/stad/build/linux] Error 2
make[2]: Leaving directory `/home/michaelzhenwang/pandroid.froyo/
L27.10.2-P1/kernel/android-2.6.35'
make[1]: *** [../../../stad/build/linux/libestadrv.a] Error 2
make[1]: Leaving directory `/home/michaelzhenwang/pandroid.froyo/
L27.10.2-P1/mydroid/hardware/ti/wlan/wl1283/stad/build/linux'
make: *** [../../../stad/build/linux/libestadrv.a] Error 2


On Apr 29, 11:06 am, orbarron <orbarro...@gmail.com> wrote:
> do you need to stay on this release?
>
> You could move tohttp://www.omappedia.com/wiki/PandaBoard_L27.10.2-P1_Release_Notes
>
> This has better support forwlan.
>
> ~orbarron
>
> On Apr 29, 1:18 am, ramya mohan <jira...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I have followed the steps as :
>
> > BuilingWLANdriver(1271)
>
> >     * Download theWLAN1271 Connectivity Package.
>
> > It has the patch, firmware binary and BT/FM init scripts.
> > # 0001-Patch-for-WL1271-driver-for-Blaze-COM6-and-Pandroid.patch /
> > 0001-omap_pm_set_min_mpu_freq-is-not-defined-in-p-android.patch must
> > be applied to WiLink6driverin order to load thedriveron Blaze +
> > COM6 setup.
>
> >     * Apply the patch:
>
> > $cd $MYDROID
> > $cd hardware/ti/wlan/
> > To check whether the WiLink6driveris latest, check the git log for
> > [edit] Installing 1271WLANfirmware from the package
>
> > Place the file tiwlan_drv.ko build from previous step to system/etc/
> > wifi. Go to platform/os/linux folder and copy the required files to
> > file system:
> > $ cd $MYDROID/hardware/ti/wlan/wl1271/platforms/os/linux
> > $ cp tiwlan_drv.ko $MYDROID/out/target/product/blaze/system/etc/wifi
>
> > Another file, firmware.bin is also required but this must be obtained
> > from the package from the below link.
> > Please download the packageWLAN1271 Connectivity Package
>
> > $ chmod 777 Froyo_L27.8.2_Connectivity_1271-1.0-Linux-x86-Install
> > $./Froyo_L27.8.2_Connectivity_1271-1.0-Linux-x86-Install
> > $ cd $MYDROID/out/target/product/blaze/system/etc/wifi
> > $ cp $YOUR_PATH/WLAN_firmware/firmware.bin .
> > $ chmod 777 $MYDROID/out/target/product/blaze/system/etc/wifi/
> > firmware.bin
>
> > [edit] How to Enable/TestWLAN
>
> > Important note forWLANdriver(tiwlan_drv.ko).
>
> > First kernel should be built and thenWLANdriver. Every time if
> > kernel is rebuild, thewlandrivermust be built again.
>
> > Improtant note before startingWLANtesting
>
> > 1) Make sure the firmware (firmware.bin) and tiwlan_drv.ko (built) are
> > part of system/etc/wifi folder of filesystem. Firmware.bin can be
> > obtained from theWLAN1271 Connectivity Package
>
> > 2) Please follow the steps mentioned in "PreparingAndroidbinaries"
> > section to copyWLANdriver(tiwlan_drv.ko) to file systemhttp://omappedia.org/wiki/OMAP_Pandroid_Main#Android_filesystem
>
> > Below video will show you how to enableWLANdrivers on Pandroid :
>
> > TestWLANfromAndroidUI
>
> > 1. Go to Settings, Wireless and Network
> > 2. Select "Wi-Fi". This will show "Turning On..."
> > 3. Once Wi-Fi is turned On, it will scan for the available networks
> > and connect
> > 4. If you would want to select a particular network, select "Wi-Fi
> > settings" and select from the list of "Wi-Fi networks"
>
> > This will enableWLANand you should be able to use Browser to connect

Pavan Savoy

unread,
May 9, 2011, 7:56:09 AM5/9/11
to panda...@googlegroups.com
On Mon, May 9, 2011 at 7:39 AM, Michael <wangz...@gmail.com> wrote:
> Hi, Orbarron,
>
> I tried to build the wifi for L27.10.2-P1. I have tried the
> instructions in http://www.omappedia.com/wiki/PandaBoard_L27.10.2-P1_Release_Notes
> and http://www.omapedia.org/wiki/OMAP_Pandroid_Main#WLAN. But I still
> get compile error as follows. Do you have any idea how to compile the
> wifi?

I don't think you've set the CROSS_COMPILE=
There must be export CROSS_COMPILE= step in the release notes.

--
--Pavan Savoy

Michael

unread,
May 9, 2011, 5:29:45 PM5/9/11
to pandaboard
Thanks for the reply. :) I think I did set CROSS_COMPILE.

I repo the source and compile again from scratch. And it seems to
work. But this time I ignored the patch fail while I apply the kernel
patches as required in the release note. Last time, I manually applied
those failed patches. I am not sure whether this causes the problem...


On May 9, 6:56 am, Pavan Savoy <pavan.sa...@gmail.com> wrote:
> On Mon, May 9, 2011 at 7:39 AM, Michael <wangzhen...@gmail.com> wrote:
> > Hi, Orbarron,
>
> > I tried to build the wifi for L27.10.2-P1. I have tried the
> > instructions inhttp://www.omappedia.com/wiki/PandaBoard_L27.10.2-P1_Release_Notes
> > andhttp://www.omapedia.org/wiki/OMAP_Pandroid_Main#WLAN. But I still
Reply all
Reply to author
Forward
0 new messages