[Galaxy Tab  Android Development] cheatman:
OK guys, so I've been taking a break for like a few hours to relax and stuff... because I'm fresh out of ideas.

Now, I still think there is a problem with A driver. I am unsure if it's the bcm4329.ko module or it has to do with the "wext" driver (the generic wireless driver).

This will be a long post, so brace for impact. As far as I know, here is how the WIFI should start:

1. Set up the service in init.rc. Check!

service wpa_supplicant /system/bin/wpa_supplicant -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
socket wpa_eth0 dgram 0660 wifi wifi
disabled
oneshot

2. That little code there calls on the wpa_supplicant to create the damned eth0 based on the "wpa_eth0" network socket created by loading the bcm4329.ko module, based on the "wpa_supplicant.conf" configuration file. Check!

<5>[ 3752.100170] init: starting 'wpa_supplicant'
<6>[ 3752.108417] init: Created socket '/dev/socket/wpa_eth0' with mode '660', user '1010', group '1010'

3. The build.prop should specify the same eth0 and match the interface we need to play with to enable wifi. Check!

wifi.interface=eth0
wifi.supplicant_scan_interval=20

4. The wpa_supplicant.conf sould also match this entire setup after booting and it should bind to eth0 not something else. Check!

/data/misc/wifi/wpa_supplicant.conf contents:

update_config=1
ctrl_interface=eth0
eapol_version=1
ap_scan=1
fast_reauth=1
device_type=1-0050F204-1
wps_cred_processing=0

All seems to be fine and dandy, yet wpa_supplicant refuses to load up when WIFI is enabled. Now, here is how we stand:

- We boot up fine, build.prop is ok, init.rc is ok.

- bcm4329.ko module inserts nicely into the running kernel, loaded up at boot, perfect.

- starting up wpa_supplicant fails miserably! Nothing past this point works. What this supplicant part does is make sure the kernel module is there, binds to the "/dev/socket/wpa_eth0" socket and tries to configure a pretty wireless interface for us to browse with.

To achieve this it needs proper code in the driver (probably has it), some chipset firmware to be able to talk to the hardware appropriately (this is found in the vendor and firmware folders) and it loads it all up to launch the interface.

This is where s#!t hits the fan. Because this process fails, we have to run it manually and UNDERSTAND what happens and why it fails. SO this is what happens:

/system/bin/wpa_supplicant -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
Could not get interface 'eth0' flags
Could not get interface 'eth0' flags
Could not configure driver to use managed mode
ioctl[SIOCGIFINDEX]: No such device

For anyone knowledgeable in Linux, this should be clear: the device eth0 (in this case) is no where to be found. That means we are stuck at understanding the following:

a) Why is the interface not created?

OR

b) Why is the interface created and then lost?

To get a better idea, looking at the logcat, this is what happens when wpa_supplicant tries to start:

Failed to reload STA firmware java.lang.IllegalStateException: Error communicating to native daemon

and then we get:

Unable to change interface settings: java.lang.IllegalStateException: Unable to communicate with native daemon to interface setcfg - com.android.server.NativeDaemonConnectorException: Cmd {interface setcfg eth0 0.0.0.0 0 [down]} failed with code 400 : {Failed to set address (No such device)}
Supplicant not running, cannot connect

First line should remind you of the "ioctl[SIOCGIFINDEX]: No such device" error we get in the command line.

===========================================

So, if I got the process sideways, let me know. Right now, I am stuck at making "/system/bin/wpa_supplicant -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf" work.

If anyone has any thoughts, I'd love to hear you out and get wifi working for you guys...

Peace,

C.