About the bcm4329 WiFi driver in AOSP

541 views
Skip to first unread message

ffxx68

unread,
May 25, 2012, 5:12:33 AM5/25/12
to renesas-...@googlegroups.com
Hi all,

I'm investigating about the the customization steps required to enable the WiFi driver, in the Android AOSP.

The AOSP includes "hardware/broadcom/wlan/bcm4329/...", but I think what we miss there is the code to enable/disable the driver thorugh GPIO ports. What is the main customization point? Also, the same bcm4329 driver can be found in the kernel sources as well. Which is the one to be used?

Anyone with useful info, please share it over here.

 thanks
 Fabio

ffxx68

unread,
May 25, 2012, 5:52:06 AM5/25/12
to renesas-...@googlegroups.com
I think some of the answers can be found here:

https://groups.google.com/forum/?fromgroups#!topic/android-porting/MFx7AmywBO4

There's still something to be customized at kernel level, to address the GPIO-driven swithching of the WiFi dongle...

ffxx68

unread,
May 25, 2012, 12:03:57 PM5/25/12
to renesas-...@googlegroups.com
Ever better going to the source of that discussion:

http://blog.linuxconsulting.ro/2010/04/porting-wifi-drivers-to-android.html

I'm now trying to follow his tutorial... though not everything is clear to me.

ffxx68

unread,
May 30, 2012, 12:18:09 PM5/30/12
to renesas-...@googlegroups.com
Following closely the instructions from the link, and pulling the dhd.ko (wifi module driver) from stock firmware, I managed to recompile the AOSP including the wpa_supplicant.

I fixed the wifi.c, the init.c and full_emev.mk as suggested and used the stock kernel (which is the one the dhd.ko integrates with).

But, during Android boot now I get this error:

I/SystemServer(  193): Account Manager
I/SystemServer(  193): Content Manager
I/SystemServer(  193): System Content Providers
I/SystemServer(  193): Battery Service
I/SystemServer(  193): Lights Service
I/SystemServer(  193): Vibrator Service
W/dalvikvm(  193): threadid=18: thread exiting with uncaught exception (group=0x40015560)
I/Process (  193): Sending signal. PID: 193 SIG: 9
E/ActivityThread(  193): Failed to find provider info for settings
E/AndroidRuntime(  193): *** FATAL EXCEPTION IN SYSTEM PROCESS: PowerManagerService
E/AndroidRuntime(  193): java.lang.NullPointerException
E/AndroidRuntime(  193):     at android.content.ContentQueryMap.<init>(ContentQueryMap.java:65)
E/AndroidRuntime(  193):     at com.android.server.PowerManagerService.initInThread(PowerManagerService.java:616)
E/AndroidRuntime(  193):     at com.android.server.PowerManagerService$2.onLooperPrepared(PowerManagerService.java:541)
E/AndroidRuntime(  193):     at android.os.HandlerThread.run(HandlerThread.java:59)
E/AndroidRuntime(  193): Error reporting crash
E/AndroidRuntime(  193): java.lang.NullPointerException
E/AndroidRuntime(  193):     at android.os.DropBoxManager.isTagEnabled(DropBoxManager.java:288)
E/AndroidRuntime(  193):     at com.android.server.am.ActivityManagerService.addErrorToDropBox(ActivityManagerService.java:6776)
E/AndroidRuntime(  193):     at com.android.server.am.ActivityManagerService.handleApplicationCrash(ActivityManagerService.java:6492)
E/AndroidRuntime(  193):     at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
E/AndroidRuntime(  193):     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:854)
E/AndroidRuntime(  193):     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:851)

which I don't understand the reason of. Boot keep cycling over and over. The GUI is never reached, while I see the animated 'android' logo on the screen.

Looking on Google for it a found a few posts telling about clearing the /data partition, which is what I do every time I rebuild Android and reinstall... So, no help.

Anyone here with any idea?

On Friday, 25 May 2012 11:12:33 UTC+2, ffxx68 wrote:

ffxx68

unread,
May 31, 2012, 5:26:51 AM5/31/12
to renesas-...@googlegroups.com
Ok, this is solved... I'm used now to ask questions and provide answers all by myself :)

I messed up with the init.rc while making the changes for the WiFi and removed the creation of /data/data dir. That was why the PowerManagerSerivces failed (but a number of other errors for a missing /data/data/.... files made me check and fix that.

Anyhow. Just to report my progress here with the WiFi, When I try to enable it through the Settings menu I get these errors now:


E/WifiHW  (  265): Unable to open connection to supplicant on "eth0": No such file or directory
D/wpa_supplicant(  634): Initializing interface 'eth0' conf '/system/etc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
D/wpa_supplicant(  634): Configuration file '/system/etc/wifi/wpa_supplicant.conf' -> '/system/etc/wifi/wpa_supplicant.conf'
D/wpa_supplicant(  634): Reading configuration file '/system/etc/wifi/wpa_supplicant.conf'
E/wpa_supplicant(  634): Failed to read or parse configuration '/system/etc/wifi/wpa_supplicant.conf'.
D/wpa_supplicant(  634): Failed to add interface eth0
D/wpa_supplicant(  634): Cancelling scan request
D/wpa_supplicant(  634): Cancelling authentication timeout
E/WifiHW  (  265): Supplicant not running, cannot connect


which also makes the system reboot indefinitely.

I'm checking about these and will let you know if/when I mange to fix this too...

On Friday, 25 May 2012 11:12:33 UTC+2, ffxx68 wrote:

ffxx68

unread,
May 31, 2012, 8:40:59 AM5/31/12
to renesas-...@googlegroups.com
To stop android from re-booting, I did this:

adb shell
# cd /data/data/com.android.providers.settings/databases
# sqlite3 settings.db
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> INSERT INTO secure VALUES (8, 'wifi_on', '0');
sqlite> .exit

The main issue is still there:

...
D/wpa_supplicant( 2457): Failed to add interface eth0
...

I'm attaching my logcat for reference.


On Friday, 25 May 2012 11:12:33 UTC+2, ffxx68 wrote:
logcat.out
Reply all
Reply to author
Forward
0 new messages