Tuesday, February 1, 2011

Guide on adding WIFI drivers on Android.

I struggled couple of days to run successfully WIFI driver on Android Froyo version, Below are the Steps which includes porting of Wifi Drivers to Android:-


Step1:-Modified  "wpa_supplicant.conf " ,ctrl_interface modification is important here..,This file actually will be loaded to device @ path /etc/wifi/


##### wpa_supplicant configuration file template #####
update_config=1
ctrl_interface=DIR=/data/misc/wifi GROUP=wifi
eapol_version=1
ap_scan=1
fast_reauth=1

Step2:-Modification of  file BoardConfig.mk ,Modify Module path and FW path depending on the requirement.BOARD_WPA_SUPPLICANT_DRIVER should be WEXT..,if its custom change it.


BOARD_WPA_SUPPLICANT_DRIVER := WEXT
WPA_SUPPLICANT_VERSION      := VER_0_6_X
#BOARD_WLAN_DEVICE           := bcm4329
WIFI_DRIVER_MODULE_PATH     := "/system/lib/modules/bcm4329.ko"
WIFI_DRIVER_FW_STA_PATH     := "/system/vendor/firmware/fw_bcm4329.bin"
WIFI_DRIVER_FW_AP_PATH      := "/system/vendor/firmware/fw_bcm4329_apsta.bin"
WIFI_DRIVER_MODULE_ARG      := "firmware_path=/system/vendor/firmware/fw_bcm4329.bin nvram_path=/system/etc/nvram.txt"
WIFI_DRIVER_MODULE_NAME     := "bcm4329"

Step3:-Modification of system.prop file

wifi.interface=eth0

Step4:-Modifiication of init.rc file

 mkdir /data/misc/wifi 0770 wifi wifi
    chmod 0770 /data/misc/wifi
    mkdir /data/misc/wifi/sockets 0770 wifi wifi
    mkdir /data/misc/dhcp 0770 dhcp dhcp
    mkdir /data/wifi 0770 wifi wifi
    chmod 0660 /data/misc/wifi/wpa_supplicant.conf

setprop wifi.interface "eth0"
    setprop wlan.driver.status "ok" 
    setprop wlan.interface "eth0"

service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -ieth0 -c/system/etc/wifi/wpa_supplicant.conf -dd 
   disabled
   oneshot
group system 

service dhcpcd /system/bin/logwrapper /system/bin/dhcpcd -d eth0
   disabled
   oneshot



10 comments:

  1. thanks this worked! had to install the driver first though -> http://www.androidsim.net/2009/08/how-to-1-how-to-install-usb-driver-on.html

    ReplyDelete
  2. will this work for all wifi drivers, say for instance I wanted to use an external USB WiFi NIC through the USB OTG cable?

    ReplyDelete
  3. It will not work for Jellybean,this upGdate was for GB.

    ReplyDelete
    Replies
    1. Hi Nagaraj,

      Can you create driver for Galaxy S3 to Allow TPLINK WN821N USB WiFi NIC to work via OTG cable.

      I'm happy to pay you.
      Email me on himanshu181in@live.com.au

      Delete
  4. Help please. How to add a driver usb Wi-Fi adapter (via usb OTG) for androdia 4.1.1. If there is a driver for Linux. Can this be done? And where to find both.

    ReplyDelete
  5. It can be done...with some tweaks

    ReplyDelete
  6. Hi, could you please let me know how to load firmware, I have successfully build driver and able to detect Wifi chipset, but don't know how to load firmware. I am building for GB.

    ReplyDelete
  7. Can I recover deleted text messages from my device/phone number?

    ReplyDelete
  8. how to install all these commands.please answer me

    ReplyDelete
  9. could you please update instructions to Marshmallow? thanks.

    ReplyDelete