Sunday, February 22, 2009

Android: Wifi driver integration

I started looking into Wifi driver integration into Android. Android from one and only Google..which has created a big storm in the mobile platform world. Android is basicaly combination of Linux kernel with Java stack. It has got cutstomoized and optmized libc (bionic) and java virtual machine (Dalvik).

Wifi conifiguration in Android starts from Java application and goes till driver/firmware insertion through JNI interface and wifi native component. Before starting modification for these components, I wanted to verify whether Wifi driver for my target will work under Android or not.

wpa_supplicant component was not enabled by default in android 1.0 release. So to enable
Add HAVE_CUSTOM_WIFI_DRIVER_2 := true to build/target/board/generic/BoardConfig.mk file.


2. make sure external/wpa_supplicant/.config has got below entries

CONFIG_WIRELESS_EXTENSION=y

CONFIG_CTRL_IFACE=y

CONFIG_DRIVER_WEXT=y
3. Build android with this to get support for WEXT and wpa_supplicant client.

4. After the system boot, insert driver and know the interface (in my case it is eth1)

5. Modify wpa_supplicant.conf file for AP configuration and Run

/system/bin/wpa_supplicant -Dwext -ieth1 -c/sdcard/wpa_supplicant.conf

6. Run dhcp to get the IP/system/bin/dhcpcd -d eth1

7. Ping to AP to check connectivity.

To automate these steps, put above commands for wpa_supplicant and dhcpcd in init.rc.

Monday, December 8, 2008

bitbake..smart package building tool

Ever tried Linux package building which has got many dependency ??? I will give one example of multimedia player..which depends on middle ware codecs, middleware (gst), kernel, driver modules, X window System, widget sets libs and so and so..
If one starts compiling media player then all dependency packages must be compiled first and last player hoping all the compiler requirements, library versions, proper headers, APi are in place.

Recently I came across "bitbake" one smart tool which fetches source code from the web, unpacks, applies patches, configure as per the system capabilities, compiles, installs and creates binary/dev/debug packages for you..so simple and makes life easy...I got to work extensively with bitbake when porting openembedded based Poky mobile platform.

bitbake parses .bb file which will have following information...
1. License and package description
2. Package dependency tree
3. Package name and its download location URl with method of download (git, cvs, svn, ftp..)
4. List of patches to apply
5. Package configuration options
6. Compiler options
7. Package installation options...

Just imagine all above steps are performed by bitbake through one single command. Life made easy ??