Marvell SDIO 8686 on IGEPv2

286 views
Skip to first unread message

Raphael Fonte Boa

unread,
Aug 17, 2010, 11:03:37 AM8/17/10
to rowboat
Hi all,

I have been trying to make android wifi work on my IGEPv2 board but so
far without success.
I have tried a few different things (e.g.
http://blog.linuxconsulting.ro/2010/04/porting-wifi-drivers-to-android.html)
and what it seems to happen is that for some reason android does not
recognize the device as an mmc device.

During boot I'm supposed to see a message like "mmc1: new SDIO card at
address 0001". However I see nothing. The only mmc message is about
the SDCard that is found on the mmc slot.

The libertas_sdio driver loads up and shows the two first messages
(driver and copyright) and after that nothing else happens. I think
android didn't find my wifi device. dmesg shows nothing interesting
and I don't know where else I could look for problems.

Do you have any idea about what could it be? The
igep0020_android_defconfig does not enable SPI and MMC/SDIO over SPI.
I ran menuconfig and enabled these options but the device is still not
found.

Thanks for any help.

Regards,
Raphael.

hedwin

unread,
Aug 19, 2010, 5:28:54 PM8/19/10
to row...@googlegroups.com
Hi Raphael,

Attached a patch for the igepv2 board file to enable mmc2 which is
needed to access the wifi/bluetooth controller.
When you insmod the libertas driver you should see it requesting the firmware.
Also added the kernel config I used.

But be aware that the android part still needs to be fixed to except
other wifi drivers/firmware.

Hedwin.

> --
> You received this message because you are subscribed to the Google Groups "rowboat" group.
> To post to this group, send email to row...@googlegroups.com.
> To unsubscribe from this group, send email to rowboat+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rowboat?hl=en.
>
>

0001-IGEPv2-Wireless-bluetooth.patch
0001-IGEPv2-Wireless-bluetooth-config.patch

Artemi Ivanov

unread,
Aug 19, 2010, 5:38:05 PM8/19/10
to row...@googlegroups.com, Yegor Yelizarov
Yegor,

Can you share your changes that make igepv2 wifi to work?

Thanks.
Artemi.

Raphael Fonte Boa

unread,
Aug 20, 2010, 5:50:49 AM8/20/10
to rowboat
Hi Hedwin,

Thanks a lot. However, have you tested this? I had previously modified
my board-igep file, adding the vmmc2 stuff and configuring it like you
did in your patch.
Nevertheless, after booting with debug messages turned on, the mmc1
communication goes crazy. It seems to get into a loop where the driver
sends several CMD52's. It never stops. So i guess it is not working
correctly.

I have managed to see my wlan0 on android. and also to have the
libertas_sdio driver loading the binaries but didn't go further
because of the debug messages. With my changes the mmc1 driver would
always spit CMD52's like crazy.

My patch was pretty similar to yours, that's the reason I ask if you
have actually managed to get it working :)

Thanks a lot for the help and regards,
Raphael.

On Aug 19, 11:38 pm, Artemi Ivanov <artemi.iva...@gmail.com> wrote:
> Yegor,
>
> Can you share your changes that make igepv2 wifi to work?
>
> Thanks.
> Artemi.
>
> hedwin wrote:
> > Hi Raphael,
>
> > Attached a patch for the igepv2 board file to enable mmc2 which is
> > needed to access the wifi/bluetooth controller.
> > When you insmod the libertas driver you should see it requesting the firmware.
> > Also added the kernel config I used.
>
> > But be aware that the android part still needs to be fixed to except
> > other wifi drivers/firmware.
>
> > Hedwin.
>
> > On Tue, Aug 17, 2010 at 5:03 PM, Raphael Fonte Boa <rfonte...@gmail.com> wrote:
> >> Hi all,
>
> >> I have been trying to make android wifi work on my IGEPv2 board but so
> >> far without success.
> >> I have tried a few different things (e.g.
> >>http://blog.linuxconsulting.ro/2010/04/porting-wifi-drivers-to-androi...)

hedwin

unread,
Aug 20, 2010, 8:01:00 AM8/20/10
to row...@googlegroups.com
What I did see was that the module starts requesting the firmware but
since currently there is nothing that provides
the firmware it stops there.

I'm looking at the wifi part on the android side to get the module loaded.

One thing though I have combined the libertas.ko and libertas_sdio.ko
into one kernel module (just some config tweaking)
because the current android wifi stuff only handles one kernel module.

Yegor Yelizarov

unread,
Aug 20, 2010, 8:26:54 AM8/20/10
to rowboat
Hi,

Unfortunately I still couldn't enable wifi with SD8686, but maybe my
results will help somebody.

To avoid problems with kernel modules, I've compiled kernel with built-
in libertas support, and skip module loading in android (will be
described in the article below)
The next step is to put firmware to /system/etc/firmware. Now if the
kernel is properly configured and firmware is in right place, you can
see "libertas: wlan0: Marvell WLAN 802.11 adapter" in dmesg".

From android side to enable wifi I use this manual
http://blog.linuxconsulting.ro/2010/04/porting-wifi-drivers-to-android.html
For wpa_supplicant I use AWEXT driver. (After patching wpa_suplicant
with the patch from the article, awext should be added to drivers.c)

Regards,
Yegor




On Aug 20, 4:01 pm, hedwin <hedwin.kon...@gmail.com> wrote:
> What I did see was that the module starts requesting the firmware but
> since currently there is nothing that provides
> the firmware it stops there.
>
> I'm looking at the wifi part on the android side to get the module loaded.
>
> One thing though I have combined the libertas.ko and libertas_sdio.ko
> into one kernel module (just some config tweaking)
> because the current android wifi stuff only handles one kernel module.
>

hedwin

unread,
Aug 20, 2010, 9:09:17 AM8/20/10
to row...@googlegroups.com
I'm currently looking at how wifi is handled in android x86 and also
read through the mentioned article.
Any thougth on what to use to get wifi running in rowboat?. I myself
am thinking about leveraging from
what the android x86 guys did.

Hedwin

Raphael Fonte Boa

unread,
Aug 20, 2010, 2:58:25 PM8/20/10
to rowboat
could any of you tell me if you even got to see wlan0
after booting android?

if yes, what is printed with ethtool wlan0?

also, if you have seen the interface, could you please enable mmc
debugging (compile with CFLAGS=-DDEBUG) and past the output for mmc1?

thanks,
Raphael.

On Aug 20, 3:09 pm, hedwin <hedwin.kon...@gmail.com> wrote:
> I'm currently looking at how wifi is handled in android x86 and also
> read through the mentioned article.
> Any thougth on what to use to get wifi running in rowboat?. I myself
> am thinking about leveraging from
> what the android x86 guys did.
>
> Hedwin
>
> On Fri, Aug 20, 2010 at 2:26 PM, Yegor Yelizarov
>
> <yegor.yeliza...@gmail.com> wrote:
> > Hi,
>
> > Unfortunately I still couldn't enable wifi with SD8686, but maybe my
> > results will help somebody.
>
> > To avoid problems with kernel modules, I've compiled kernel with built-
> > in libertas support, and skip module loading in android (will be
> > described in the article below)
> > The next step is to put firmware to /system/etc/firmware. Now if the
> > kernel is properly configured and firmware is in right place, you can
> > see "libertas: wlan0: Marvell WLAN 802.11 adapter" in dmesg".
>
> > From android side to enable wifi I use this manual
> >http://blog.linuxconsulting.ro/2010/04/porting-wifi-drivers-to-androi...

Raphael Fonte Boa

unread,
Aug 20, 2010, 9:04:34 PM8/20/10
to rowboat
So, i tested the mmc driver with the stable kernel for igep and the
same thousand of CMD52 are present.
This is no problem I assume.

Using the libertas_sdio driver as built-in makes the firmware not to
load. I found that the firmware names passed to the driver are being
seen as NULL.
If I compile the driver as a module and then load it using

# insmod libertas_sdio.ko fw_name=sd8686.bin
helper_name=sd8686_helper.bin

and if I have both of these files inside /etc/firmware I got the
following output:

libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
libertas_sdio mmc1:0001:1: firmware: requesting sd8686_helper.bin
init: untracked pid 1295 exited
libertas_sdio mmc1:0001:1: firmware: requesting sd8686.bin
init: untracked pid 1298 exited
libertas: 00:0b:6c:90:94:3e, fw 9.70.3p24, cap 0x00000303
libertas: unidentified region code; using the default (USA)
libertas: wlan0: Marvell WLAN 802.11 adapter


# ethtool wlan0
Settings for wlan0:
Supports Wake-on: d
Wake-on: d

Note that something dies. Looking at logcat output I see that the mmc0
(sdcard) cannot be mounted anymore and vold is constantly crashing:

I/vold ( 902): Android Volume Daemon version 2.0
E/vold ( 902): Unable to chdir to /sys/class/mmc_host/mmc0/
slot_name (Not a directory)
E/vold ( 902): Error bootstrapping card '/sys/class/mmc_host/mmc0/
slot_name' (Not a directory)
I/vold ( 902): New MMC card 'SU04G' (serial 1901927816) added @ /
devices/platform/mmci-omap-hs.0
/mmc_host/mmc0/mmc0:a725
E/vold ( 902): Error making device nodes for '/dev/block//vold/
179:0' (File exists)
I/vold ( 902): Disk (blkdev 179:0), 7744512 secs (3781 MB) 1
partitions
I/vold ( 902): New blkdev 179.0 on media SU04G, media path /
devices/platform/mmci-omap-hs.0/mmc_
host/mmc0/mmc0:a725, Dpp 1
E/vold ( 902): Error making device nodes for '/dev/block//vold/
179:1' (File exists)
I/vold ( 902): Partition (blkdev 179:1), 7736320 secs (3777 MB)
type 0xb
I/vold ( 902): New blkdev 179.1 on media SU04G, media path /
devices/platform/mmci-omap-hs.0/mmc_
host/mmc0/mmc0:a725, Dpp 0
I/vold ( 902): Evaluating dev '/devices/platform/mmci-omap-hs.0/
mmc_host/mmc0/mmc0:a725/block/mm
cblk0' for mountable filesystems for '/sdcard'
I/vold ( 902): Aborting start of /sdcard (bootstrap = 1)
I/vold ( 902): Volmgr not ready to handle device
E/vold ( 902): Unable to chdir to /sys/class/mmc_host/mmc1/
slot_name (Not a directory)
E/vold ( 902): Error bootstrapping card '/sys/class/mmc_host/mmc1/
slot_name' (Not a directory)
I/DEBUG ( 825): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG ( 825): Build fingerprint: 'TI/igepv2/igepv2/igepv2:2.1-
update1/ECLAIR/eng.rfonteboa.20100811.140433:tests/test-keys'
I/DEBUG ( 825): pid: 902, tid: 902 >>> /system/bin/vold <<<

I will try to investigate further, if you have any ideas, let me know.

Cheers,
Raphael.

hedwin

unread,
Aug 22, 2010, 5:46:51 PM8/22/10
to row...@googlegroups.com
when the volume manager starts it reads all mmc related interfaces and
treeds them as were sd cards attached.
basically the volume manager should ignore mmc1

btw you do not have to provide the firmware as an argument to the
module. when fw_name and helper_name are NULL it will
use the defaults, otherwise providing a fw_name and helper_name will
overrule the defaults.
Did not use the module arguments result is the same as you have.

Hedwin

On Sat, Aug 21, 2010 at 3:04 AM, Raphael Fonte Boa <rfon...@gmail.com> wrote:
> So, i tested the mmc driver with the stable kernel for igep and the
> same thousand of CMD52 are present.
> This is no problem I assume.
>

> Using the libertas_sdio driver as btuilt-in makes the firmware not to

hedwin

unread,
Aug 24, 2010, 3:26:13 AM8/24/10
to row...@googlegroups.com
Fixed the crash I had in the volume manager. No crash seen anymore
when android boots and the drivers are insmoded.
Also the driver are correctly insmod when press the "Enable Wifi" item
in the settings window.
Issue I am facing now is that I get either an "IO error reading
wpa_supplicant.conf" or a permission denied on the same file.
Also added hopefully the necessary stuff for wifi in init.rc

Hedwin

Raphael Fonte Boa

unread,
Aug 30, 2010, 4:24:20 PM8/30/10
to rowboat
Hi Hedwin,

Did you get any further?

I think I got everything up (although I cannot activate wifi via
settings) and it seems the driver is running. However when
wpa_supplicant tries to talk to the device it fails.

the output is:
<6>libertas_sdio: Libertas SDIO driver
<6>libertas_sdio: Copyright Pierre Ossman
<6>libertas_sdio mmc1:0001:1: firmware: requesting sd8686_helper.bin
<3>init: untracked pid 1124 exited /**(this is the fork from init
quitting successfully)**/
<6>libertas_sdio mmc1:0001:1: firmware: requesting sd8686.bin
<3>init: untracked pid 1127 exited /**(this is the fork from init
quitting successfully)**/
<6>libertas: 00:0b:6c:90:94:3e, fw 9.70.3p24, cap 0x00000303
<6>libertas: unidentified region code; using the default (USA)
<6>libertas: wlan0: Marvell WLAN 802.11 adapter
<6>libertas: command 0x0006 timed out
<6>libertas: requeueing command 0x0006 due to timeout (#1)
<6>libertas: Received result 0 to command 6 after 1 retries
<6>libertas: command 0x0013 timed out
<6>libertas: requeueing command 0x0013 due to timeout (#1)
<6>libertas: command 0x0013 timed out
<6>libertas: requeueing command 0x0013 due to timeout (#2)
<6>libertas: command 0x0013 timed out
<6>libertas: requeueing command 0x0013 due to timeout (#3)
<6>libertas: command 0x0013 timed out
<6>libertas: Excessive timeouts submitting command 0x0013
<6>libertas: PREP_CMD: command 0x0013 failed: -110
<6>libertas: command 0x0006 timed out
<6>libertas: requeueing command 0x0006 due to timeout (#1)
<6>libertas: command 0x0006 timed out
<6>libertas: requeueing command 0x0006 due to timeout (#2)
<6>libertas: command 0x0006 timed out
<6>libertas: requeueing command 0x0006 due to timeout (#3)
<6>libertas: command 0x0006 timed out
<6>libertas: Excessive timeouts submitting command 0x0006
<6>libertas: PREP_CMD: command 0x0006 failed: -110
<3>libertas: SCAN_CMD failed

it goes on and one with this timeout and will not do anything else.

On Aug 24, 9:26 am, hedwin <hedwin.kon...@gmail.com> wrote:
> Fixed the crash I had in the volume manager. No crash seen anymore
> when android boots and the drivers are insmoded.
> Also the driver are correctly insmod when press the "Enable Wifi" item
> in the settings window.
> Issue I am facing now is that I get either an "IO error reading
> wpa_supplicant.conf" or a permission denied on the same file.
> Also added hopefully the necessary stuff for wifi in init.rc
>
> Hedwin
>
> On Sun, Aug 22, 2010 at 11:46 PM, hedwin <hedwin.kon...@gmail.com> wrote:
> > when the volume manager starts it reads all mmc related interfaces and
> > treeds them as were sd cards attached.
> > basically the volume manager should ignore mmc1
>
> > btw you do not have to provide the firmware as an argument to the
> > module. when fw_name and helper_name are NULL it will
> > use the defaults, otherwise providing a fw_name and helper_name will
> > overrule the defaults.
> > Did not use the module arguments result is the same as you have.
>
> > Hedwin
>
> > On Sat, Aug 21, 2010 at 3:04 AM, Raphael Fonte Boa <rfonte...@gmail.com> wrote:
> >> So, i tested the mmc driver with the stable kernel for igep and the
> >> same thousand of CMD52 are present.
> >> This is no problem I assume.
>
> >> Using the libertas_sdio driver as btuilt-in makes the firmware not to
> >> load. I found that the firmware names passed to the driver are being
> >> seen as NULL.
> >> If I compile the driver as a module and then load it using
>
> >> # insmod libertas_sdio.ko fw_name=sd8686.bin
> >> helper_name=sd8686_helper.bin
>
> >> and if I have both of these files inside /etc/firmware I got the
> >> following output:
>
> >> libertas_sdio: Libertas SDIO driver
> >> libertas_sdio: Copyright Pierre Ossman
> >> libertas_sdio mmc1:0001:1: firmware: requesting sd8686_helper.bin
> >> init: untracked pid 1295 exited
> >> libertas_sdio mmc1:0001:1: firmware: requesting sd8686.bin
> >> init: untracked pid 1298 exited
> >> libertas: 00:0b:6c:90:94:3e, fw 9.70.3p24, cap 0x00000303
> >> libertas: unidentified region code; using the default (USA)
> >> libertas: wlan0:MarvellWLAN 802.11 adapter
> >>> > > see "libertas: wlan0:MarvellWLAN 802.11 adapter" in dmesg".
> ...
>
> read more »

hedwin

unread,
Aug 31, 2010, 5:39:40 AM8/31/10
to row...@googlegroups.com
Hi,

Making very small steps. Had a lot of permission kind of errors, files
not found errors (started wondering how it can ever work).
The permission errors seem to be related with the fact that when wifi
activation starts the uid and gid are system,system while
the file ownership in most cases is wifi, wifi.
Pushing the wifi enable button in the UI now loads the drivers and
firmware correctly .
Communication with wpa_supplicant is also failing at my side, so
looking into this one.

If have updated the init.rc (file location and permission, adding
wpa_supplicant and dhcpd service) and the
BoardConfig.mk/AndroidBoard.mk (added the kernel driver and firmware
and wpa_supplicant build).

Still lots to investigate .....

Hedwin

hedwin

unread,
Aug 31, 2010, 8:27:07 PM8/31/10
to row...@googlegroups.com
Logging of the situation I have now:

I/power ( 870): *** set_screen_state 1
I/power ( 870): *** set_screen_state 1
I/power ( 870): *** set_screen_state 1


libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
libertas_sdio mmc1:0001:1: firmware: requesting sd8686_helper.bin

init: untracked pid 1029 exited


libertas_sdio mmc1:0001:1: firmware: requesting sd8686.bin

init: untracked pid 1032 exited
D/SettingsWifiEnabler( 940): Received wifi state changed from
Disabled to Enabling
libertas: 00:26:e8:90:ba:8b, fw 9.70.3p24, cap 0x00000303


libertas: unidentified region code; using the default (USA)
libertas: wlan0: Marvell WLAN 802.11 adapter

I/WifiHW ( 870): ensure_config_file_exists: uid = 1000 gid = 1000
E/WifiHW ( 870): Error changing group ownership of
/data/misc/wifi/wpa_supplicant.conf to 1010: Operation not permitted
D/WifiService( 870): ACTION_BATTERY_CHANGED pluggedType: 1
E/WifiHW ( 870): Unable to open connection to supplicant on
"/data/system/wpa_supplicant/wlan0": No such file or directory
D/SettingsWifiEnabler( 940): Received wifi state changed from
Enabling to Enabled
D/wpa_supplicant( 1040): Initializing interface 'wlan0' conf
'/system/etc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface
'N/A' bridg'
D/wpa_supplicant( 1040): Configuration file
'/system/etc/wifi/wpa_supplicant.conf' ->
'/system/etc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 1040): Reading configuration file
'/system/etc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 1040): update_config=1
D/wpa_supplicant( 1040): ctrl_interface='wlan0'
D/wpa_supplicant( 1040): eapol_version=1
D/wpa_supplicant( 1040): ap_scan=1
D/wpa_supplicant( 1040): fast_reauth=1
D/wpa_supplicant( 1040): Initializing interface (2) 'wlan0'
D/wpa_supplicant( 1040): EAPOL: SUPP_PAE entering state DISCONNECTED
D/wpa_supplicant( 1040): EAPOL: KEY_RX entering state NO_KEY_RECEIVE
D/wpa_supplicant( 1040): EAPOL: SUPP_BE entering state INITIALIZE
D/wpa_supplicant( 1040): EAP: EAP entering state DISABLED
D/wpa_supplicant( 1040): EAPOL: External notification - portEnabled=0
D/wpa_supplicant( 1040): EAPOL: External notification - portValid=0
D/wpa_supplicant( 1040): SIOCGIWRANGE: WE(compiled)=22 WE(source)=15
enc_capa=0xf
D/wpa_supplicant( 1040): capabilities: key_mgmt 0xf enc 0xf
D/wpa_supplicant( 1040): WEXT: Operstate: linkmode=1, operstate=5
D/wpa_supplicant( 1040): Own MAC address: 00:26:e8:90:ba:8b
D/wpa_supplicant( 1040): wpa_driver_wext_set_wpa
D/wpa_supplicant( 1040): wpa_driver_wext_set_key: alg=0 key_idx=0
set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant( 1040): wpa_driver_wext_set_key: alg=0 key_idx=1
set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant( 1040): wpa_driver_wext_set_key: alg=0 key_idx=2
set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant( 1040): wpa_driver_wext_set_key: alg=0 key_idx=3
set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant( 1040): wpa_driver_wext_set_countermeasures
D/wpa_supplicant( 1040): wpa_driver_wext_set_drop_unencrypted
D/wpa_supplicant( 1040): Setting scan request: 0 sec 100000 usec
E/wpa_supplicant( 1040): Failed to initialize control interface 'wlan0'.
E/wpa_supplicant( 1040): You may have another wpa_supplicant process
already running or the file was
E/wpa_supplicant( 1040): left by an unclean termination of
wpa_supplicant in which case you will need
E/wpa_supplicant( 1040): to manually remove this file before starting
wpa_supplicant again.
D/wpa_supplicant( 1040): Failed to add interface wlan0
D/wpa_supplicant( 1040): State: DISCONNECTED -> DISCONNECTED
I/wpa_supplicant( 1040): CTRL-EVENT-STATE-CHANGE id=-1 state=0
D/wpa_supplicant( 1040): wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant( 1040): WEXT: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant( 1040): No keys have been configured - skip key clearing
D/wpa_supplicant( 1040): EAPOL: External notification - portEnabled=0
D/wpa_supplicant( 1040): EAPOL: External notification - portValid=0
D/wpa_supplicant( 1040): wpa_driver_wext_set_wpa
D/wpa_supplicant( 1040): wpa_driver_wext_set_drop_unencrypted
D/wpa_supplicant( 1040): wpa_driver_wext_set_countermeasures
D/wpa_supplicant( 1040): No keys have been configured - skip key clearing
D/wpa_supplicant( 1040): Cancelling scan request
D/wpa_supplicant( 1040): Cancelling authentication timeout
D/wpa_supplicant( 1040): WEXT: Operstate: linkmode=0, operstate=6
I/power ( 870): *** set_screen_state 1
E/WifiHW ( 870): Supplicant not running, cannot connect
E/WifiHW ( 870): Supplicant not running, cannot connect
E/WifiHW ( 870): Supplicant noinit: no such service 'dhcpcd'
t running, cannot connect
V/WifiStateTracker( 870): Supplicant died unexpectedly
E/WifiStateTracker( 870): Could not stop DHCP
D/NetworkStateTracker( 870): setDetailed state, old =IDLE and new
state=DISCONNinit: no such service 'dhcpcd'
ECTED
D/SettingsWifiEnabler( 940): Received wifi state changed from Enabled
to Disabling
D/ConnectivityService( 870): ConnectivityChange for WIFI:
DISCONNECTED/DISCONNECTED
W/MobileDataStateTracker( 870): Ignoring feature request because
could not acquire PhoneService
W/MobileDataStateTracker( 870): Could not enable APN type "default"
E/WifiStateTracker( 870): Could not stop DHCP
D/SettingsWifiEnabler( 940): Received wifi state changed from
Disabling to Disabled
D/dalvikvm( 940): GC freed 4239 objects / 240312 bytes in 42ms
D/dalvikvm( 870): GC freed 17443 objects / 777384 bytes in 88ms

Raphael Fonte Boa

unread,
Sep 1, 2010, 3:57:56 AM9/1/10
to rowboat
Hi Hedwin,

could you try to bring your interface up using wpa_supplicant via
console?
or maybe paste the dmesg output.

Because I think the problem might lie in the communication made by the
libertas driver and the device.
Also, if you have some time, try running some of the commands
available in ethtool (like reading registers).

Most of the ethtool commands i executed failed. I think this might
have something to do with not being able to set up the interface.
If this is the problem, it seems to be an issue with commands sent
from the libertas driver to the firmware, which for some reason is
either not accepting the commands or not responding.
> On Tue, Aug 31, 2010 at 11:39 AM, hedwin <hedwin.kon...@gmail.com> wrote:
> > Hi,
>
> > Making very small steps. Had a lot of permission kind of errors, files
> > not found errors (started wondering how it can ever work).
> > The permission errors seem to be related with the fact that when wifi
> > activation starts the uid and gid are system,system while
> > the file ownership in most cases is wifi, wifi.
> > Pushing the wifi enable button in the UI now loads the drivers and
> > firmware correctly .
> > Communication with wpa_supplicant is also failing at my side, so
> > looking into this one.
>
> > If have updated the init.rc (file location and permission, adding
> > wpa_supplicant and dhcpd service) and the
> > BoardConfig.mk/AndroidBoard.mk (added the kernel driver and firmware
> > and wpa_supplicant build).
>
> > Still lots to investigate .....
>
> > Hedwin
>
> ...
>
> read more »

hedwin

unread,
Sep 2, 2010, 4:34:49 AM9/2/10
to row...@googlegroups.com
Raphael, do you use a SD-card or NFS?

Raphael Fonte Boa

unread,
Sep 2, 2010, 4:41:56 AM9/2/10
to rowboat
Hi Hedwin,

I use NFS, and I just thought that your problem with permissions could
be with NFS.
Since the WifiService tries to change ownership of the files, if the
folder is NFSed it will fail because root user is a different user.

I managed to have my settings load and unload the kernel module, I
don't know what was wrong with it. Now it is working, however it fails
to load it because of ownership (and I guess it's the problem with the
NFS system).
However, when the android system removes the module (because it failed
to change group ownership) loading it back again does not work
anymore. I don't know why, but it loads the firmware first time OK if
it removes the module, next time it tries to load the module it fails.
Do you have this problem or did you fix this with merging both
libertas modules?

Nevertheless, When loading the module manually and then running
wpa_supplicant, it does not work. I also tried with an older firmware
for the marvell device, it has the same problems.

Have you tried loading the module manually and then executing
wpa_supplicant? Does it also fails?

On Sep 2, 10:34 am, hedwin <hedwin.kon...@gmail.com> wrote:
> Raphael, do you use a SD-card or NFS?
>
> ...
>
> read more »

hedwin

unread,
Sep 2, 2010, 7:15:39 AM9/2/10
to row...@googlegroups.com
Hi,

Regarding NFS, that is what crossed my mind as well.

Will check on my side what happens with loading/unloading the libertas
kernel module.

Did try it manually but left the services in init.rc. Will try again
with the wpa_supplicant/dhcpd removed from the init.rc

Hedwin.

hedwin

unread,
Sep 3, 2010, 7:12:37 PM9/3/10
to row...@googlegroups.com
Made a change in the wpa_supplicant code where the UID is set to AID_SYSTEM.
When I skip the dhcpd service in init.rc I see in the UI that Wifi
gets enabled and a scan is started.
Ultimatly I get a message telling that it is unable to scan and Wifi
is disabled again.
Hopefully this is an indication that I move towards in the right direction.
Log is below.

Oh yes, tried the command line also but I get permission errors. Also
still don't understand why I should
use AID_SYSTEM to get to work.

Hedwin

Log >>>>>>>>>


ibertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
libertas_sdio mmc1:0001:1: firmware: requesting sd8686_helper.bin

init: untracked pid 1040 exited


libertas_sdio mmc1:0001:1: firmware: requesting sd8686.bin

init: untracked pid 1043 exited
D/SettingsWifiEnabler( 939): Received wifi state changed from


Disabled to Enabling
libertas: 00:26:e8:90:ba:8b, fw 9.70.3p24, cap 0x00000303
libertas: unidentified region code; using the default (USA)
libertas: wlan0: Marvell WLAN 802.11 adapter

I/WifiHW ( 865): ensure_config_file_exists: uid = 1000 gid = 1000
D/dalvikvm( 865): GC freed 14958 objects / 696760 bytes in 132ms
E/WifiHW ( 865): Unable to open connection to supplicant on
"/data/system/wpa_supplicany
D/wpa_supplicant( 1053): Initializing interface 'wlan0' conf
'/system/etc/wifi/wpa_suppli'
D/wpa_supplicant( 1053): Configuration file
'/system/etc/wifi/wpa_supplicant.conf' -> '/s'
D/wpa_supplicant( 1053): Reading configuration file
'/system/etc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 1053): update_config=1
D/wpa_supplicant( 1053): ctrl_interface='wlan0'
D/wpa_supplicant( 1053): eapol_version=1
D/wpa_supplicant( 1053): ap_scan=1
D/wpa_supplicant( 1053): fast_reauth=1
D/WifiService( 865): ACTION_BATTERY_CHANGED pluggedType: 1
D/wpa_supplicant( 1053): Initializing interface (2) 'wlan0'
D/wpa_supplicant( 1053): EAPOL: SUPP_PAE entering state DISCONNECTED
D/wpa_supplicant( 1053): EAPOL: KEY_RX entering state NO_KEY_RECEIVE
D/wpa_supplicant( 1053): EAPOL: SUPP_BE entering state INITIALIZE
D/wpa_supplicant( 1053): EAP: EAP entering state DISABLED
D/wpa_supplicant( 1053): EAPOL: External notification - portEnabled=0
D/wpa_supplicant( 1053): EAPOL: External notification - portValid=0
D/SettingsWifiEnabler( 939): Received wifi state changed from
Enabling to Enabled
D/wpa_supplicant( 1053): SIOCGIWRANGE: WE(compiled)=22 WE(source)=15
enc_capa=0xf
D/wpa_supplicant( 1053): capabilities: key_mgmt 0xf enc 0xf
D/wpa_supplicant( 1053): WEXT: Operstate: linkmode=1, operstate=5
D/wpa_supplicant( 1053): Failed to add interface wlan0
D/wpa_supplicant( 1053): State: DISCONNECTED -> DISCONNECTED
I/wpa_supplicant( 1053): CTRL-EVENT-STATE-CHANGE id=-1 state=0
D/wpa_supplicant( 1053): wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant( 1053): WEXT: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant( 1053): wpa_driver_wext_set_key: alg=0 key_idx=0
set_tx=0 seq_len=0 key_0
D/wpa_supplicant( 1053): Driver did not support SIOCSIWENCODEEXT
D/wpa_supplicant( 1053): wpa_driver_wext_set_key: alg=0 key_idx=1
set_tx=0 seq_len=0 key_0
D/wpa_supplicant( 1053): Driver did not support SIOCSIWENCODEEXT
D/wpa_supplicant( 1053): wpa_driver_wext_set_key: alg=0 key_idx=2
set_tx=0 seq_len=0 key_0
D/wpa_supplicant( 1053): Driver did not support SIOCSIWENCODEEXT
D/wpa_supplicant( 1053): wpa_driver_wext_set_key: alg=0 key_idx=3
set_tx=0 seq_len=0 key_0
D/wpa_supplicant( 1053): Driver did not support SIOCSIWENCODEEXT
D/wpa_supplicant( 1053): EAPOL: External notification - portEnabled=0
D/wpa_supplicant( 1053): EAPOL: External notification - portValid=0
D/wpa_supplicant( 1053): wpa_driver_wext_set_wpa
D/wpa_supplicant( 1053): WEXT: SIOCSIWAUTH(param 7 value 0x0) failed:
Operation not permi)
E/wpa_supplicant( 1053): Failed to disable WPA in the driver.
D/wpa_supplicant( 1053): wpa_driver_wext_set_drop_unencrypted
D/wpa_supplicant( 1053): WEXT: SIOCSIWAUTH(param 5 value 0x0) failed:
Operation not permi)
D/wpa_supplicant( 1053): wpa_driver_wext_set_countermeasures
D/wpa_supplicant( 1053): WEXT: SIOCSIWAUTH(param 4 value 0x0) failed:
Operation not permi)
D/wpa_supplicant( 1053): No keys have been configured - skip key clearing
D/wpa_supplicant( 1053): Cancelling scan request
D/wpa_supplicant( 1053): Cancelling authentication timeout
D/wpa_supplicant( 1053): WEXT: Operstate: linkmode=0, operstate=6
I/power ( 865): *** set_screen_state 1
E/WifiHW ( 865): Supplicant not running, cannot connect
E/WifiHW ( 865): Supplicant not running, cannot connect
E/WifiHW ( 865): Supplicant not running, cannot connect
V/WifiStateTracker( 865): Supplicant died unexpectedly
D/NetworkStateTracker( 865): setDetailed state, old =IDLE and new
state=DISCONNECTED
D/ConnectivityService( 865): ConnectivityChange for WIFI:
DISCONNECTED/DISCONNECTED
W/MobileDataStateTracker( 865): Ignoring feature request because
could not acquire Phonee
W/MobileDataStateTracker( 865): Could not enable APN type "default"
D/SettingsWifiEnabler( 939): Received wifi state changed from Enabled
to Disabling
D/SettingsWifiEnabler( 939): Received wifi state changed from
Disabling to Disabled

hedwin

unread,
Sep 25, 2010, 6:45:37 AM9/25/10
to row...@googlegroups.com
Finally I'm getting there. AP's are showing up in the wifi settings menu.

Some small bugfixes are needed.

- volume manager to not to see the SDIO wifi as a SD card
- extend the sd8686 dirver to handle more or less the SIOCSIWPRIV command
- there is a problem in the omap_hsmmc driver that for some reason
switches off the mmc_fclk clock, big workaround here I commented out
the line


The second needs some cleaning up, the last I need to figure out who
is requesting the clk to be disable.

What I have now is that scanning for AP seems to work. Android is
showing some APs I have.
Still needs to see if I can connect but considering the long run of
gettings this to work I happy
with the result sofar.

Hedwin

hedwin

unread,
Sep 30, 2010, 8:02:08 AM9/30/10
to row...@googlegroups.com
Can connect through DHCP but don't get valid DNS addresses.
Seems getting a DNS address is the last item to solve.

hedwin

unread,
Sep 30, 2010, 7:05:55 PM9/30/10
to row...@googlegroups.com
Wifi is working on IGEP board.

Artemi Ivanov

unread,
Sep 30, 2010, 7:12:22 PM9/30/10
to row...@googlegroups.com
Congratulations!!! Great news!!!

Hedwin, will you be able to re-post clean patches (or shall we look at
your previous post?)

Thanks.
Artemi.

hedwin

unread,
Oct 1, 2010, 3:04:32 AM10/1/10
to row...@googlegroups.com
Artime.

Plan to clean up what I have next week and post the correct patches.
Also in the process off cloning the required gitorius repos and push
to these as well.

Hedwin

Raphael Fonte Boa

unread,
Oct 4, 2010, 5:07:39 AM10/4/10
to rowboat
Hi Hedwin,

Great that you've managed to get wifi working, congrats ;)
I was on vacation for the last month and had no access to my board at
all.

Could you comment a little on the problems you've found with the
SIOCSIWPRIV command and the clock?

Thanks,
Raphael.

On Oct 1, 9:04 am, hedwin <hedwin.kon...@gmail.com> wrote:
> Artime.
>
> Plan to clean up what I have next week and post the correct patches.
> Also in the process off cloning the required gitorius repos and push
> to these as well.
>
> Hedwin
>
> On Fri, Oct 1, 2010 at 1:12 AM, Artemi Ivanov <artemi.iva...@gmail.com> wrote:
> > Congratulations!!! Great news!!!
>
> > Hedwin, will you be able to re-post clean patches (or shall we look at your
> > previous post?)
>
> > Thanks.
> > Artemi.
>
> > hedwin wrote:
>
> >> Wifi is working on IGEP board.
>
> >> On Thu, Sep 30, 2010 at 2:02 PM, hedwin <hedwin.kon...@gmail.com> wrote:
>
> >>> Can connect through DHCP but don't get valid DNS addresses.
> >>> Seems getting a DNS address is the last item to solve.
>
> >>> On Sat, Sep 25, 2010 at 12:45 PM, hedwin <hedwin.kon...@gmail.com> wrote:
>
> >>>> Finally I'm getting there. AP's are showing up in the wifi settings
> >>>> menu.
>
> >>>> Some small bugfixes are needed.
>
> >>>> - volume manager to not to see the SDIO wifi as a SD card
> >>>> - extend the sd8686 dirver to handle more or less the SIOCSIWPRIV
> >>>> command
> >>>> - there is a problem in the omap_hsmmc driver that for some reason
> >>>> switches off the mmc_fclk clock, big workaround here I commented out
> >>>> the line
>
> >>>> The second needs some cleaning up, the last I need to figure out who
> >>>> is requesting the clk to be disable.
>
> >>>> What I have now is that scanning for AP seems to work. Android is
> >>>> showing some APs I have.
> >>>> Still needs to see if I can connect but considering the long run of
> >>>> gettings this to work I happy
> >>>> with the result sofar.
>
> >>>> Hedwin
>
> ...
>
> read more »

hedwin

unread,
Oct 5, 2010, 6:16:54 PM10/5/10
to row...@googlegroups.com
Small summary about the changes made:

- SIOCSIWPRIV
Android needs the SIOCSIWPRIV command to be available, without it will
not work. I have looked at some
ways to add this but in the end the best way was to add this to the
libertas wifi driver. So that is what I did.
What is implemented now is the minimum required so it needs some
further looking into
but Wifi will still work.

- clock
What I started to notice is that after one scan the driver seemed to
stop working giving
lots of timeout warnings. Digging a bit further I found out that the
mmc driver always
was asked to disable the main clock, fclk. Why this happens is not
clear yet. Needs further looking into
Once I commented out the disabling of the clk, communication between
the driver and the
marvel firmware was ok and things started to get alive.

- vold
Vold as it is implemented now can only handle a mmc interface that has
sd-cards connected.
Connecting sometime other than an sd-card to the mmc resulted in a
crash in vold.
This problem is solved.

- socket
Had a lot of issue getting the sockets setup correctly. One way or
another it always got me into
a " permission denied" error. One thing here is that I assumed Wifi
would use uid= wifi and gid=wifi
, the init.rc is also setup according this assumption, but it turned
out not to be the case. uid and gid
when Wifi starts is system, system so I updated init.rc accordingly.
I also started to use sockets in the android socket namespace, this
made live much easier when it gets
to getting the correct permission.
No change in the code is needed for this, only changes are done in init.rc

Ok, this was my short summary.

I am now in the process of cleaning up, build is running as we "speak".
Once this is done I will start posting the patches.

Hedwin

Reply all
Reply to author
Forward
0 new messages