WiFi doesn't work on Android Origen

Bug #851006 reported by Zach Pfeffer
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Android
Fix Released
High
Botao
linaro-landing-team-samsung
Fix Released
Medium
Sangwook Lee

Bug Description

WiFi doesn't work on Origen.

Revision history for this message
Zach Pfeffer (pfefferz) wrote :
Download full text (9.6 KiB)

Original thread:

On 15 September 2011 09:50, Angus Ainslie <email address hidden> wrote:
> Thanks Sangwook,
>
>
> On Thu, Sep 15, 2011 at 8:09 AM, Sangwook Lee <email address hidden> wrote:
>>
>> I just compared firmware from Ubuntu archive
>> (http://packages.ubuntu.com/hardy/all/firmware-tools/download)
>> one used in Origen. Both are the same firmware.
>>
>
> @Alexander - so you'll follow up and git it into ALIP and Linaro
> Ubuntu ? Will it be an installable package for nano ?
>
> @Zach - Can it get included for the 11.09 release in Android ?

Yeah, what needs to happen in userspace to enable it?
- Hide quoted text -

> Angus
>
>
>
>> Thanks
>> Sangwook
>>
>>
>> On 15 September 2011 14:43, Angus Ainslie <email address hidden> wrote:
>>>
>>> Sangwook,
>>>
>>> I think asac meant the firmware in the upstream Ubuntu archive not the
>>> linaro one.
>>>
>>> Angus
>>>
>>> --
>>> Angus Ainslie
>>> Samsung landing team lead
>>> Sent from my Android powered device
>>>
>>> On Sep 15, 2011 7:32 AM, "Sangwook Lee" <email address hidden> wrote:
>>> > I took the latest snapshot of Ubuntu
>>> > ( linaro-n-ubuntu-desktop-tar-20110911-0.tar.gz), I found out that there
>>> > is
>>> > no firmware for Atheros AR6003.
>>> >
>>> > Thanks
>>> > Sangwook
>>> >
>>> >
>>> >
>>> > On 15 September 2011 12:13, Alexander Sack
>>> > <email address hidden>wrote:
>>> >
>>> >> On Wed, Sep 14, 2011 at 4:31 PM, Angus Ainslie
>>> >> <email address hidden>wrote:
>>> >>
>>> >>> Hi Sangwook
>>> >>>
>>> >>> Alexander do you want to have this packaged into a Linaro PPA or would
>>> >>> you like to to look into packaging it into the LT PPA
>>> >>>
>>> >>>
>>> >> Is the firmware available in the ubuntu archive not working with the
>>> >> driver
>>> >> version we use for current origen kernel?
>>> >>
>>> >> I would hope that the version in ubuntu actually works and we can just
>>> >> use
>>> >> that.
>>> >>
>>> >> If we need a newer version I would think we should just put an updated
>>> >> linux-firmware package into the linaro overlay (seems its freely
>>> >> distributable).
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> For android botao and vishal would just pick the right binaries (if we
>>> >> have
>>> >> them) and put them directly into our android git.
>>> >>
>>> >> Could you check if the firmware from ubuntu archive behaves the same or
>>> >> better compared to the firmware you use?
>>> >>
>>> >> Once we know let's decide what to do.
>>> >>
>>> >>
>>> >>> Angus
>>> >>>
>>> >>> On Wed, Sep 14, 2011 at 2:23 AM, Botao Sun <email address hidden>
>>> >>> wrote:
>>> >>> > Hi Sangwook,
>>> >>> >
>>> >>> > Received, and md5sum matched.
>>> >>> >
>>> >>> > Alexander finds AR6002 and AR6003 on the linux firmware package:
>>> >>> >
>>> >>> > https://launchpad.net/ubuntu/+source/linux-firmware
>>> >>> >
>>> >>> > So he wants to know whether they are same as yours. If so, he would
>>> >>> > like
>>> >>> to
>>> >>> > add them in our own git. I go through the files under those 2
>>> >>> > folder,
>>> >>> and
>>> >>> > they look same, but I need your confirmation.
>>> >>> >
>>> >>> > Thank you.
>>> >>> >
>>> >>> >
>>> >>> > BR
>>> >>> > Botao Sun
>>> >>> >
>>> >>> > On Wednesd...

Read more...

Changed in linaro-android:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Botao Sun (botao-sun)
milestone: none → 11.09
Changed in linaro-landing-team-samsung:
assignee: nobody → Angus Ainslie (angus-akkea)
status: New → In Progress
Usman Ahmad (usman-ah)
Changed in linaro-landing-team-samsung:
milestone: none → 2011.09
Revision history for this message
Botao (botao-sun) wrote :

Stuck at the insmod error:

Although "cfg80211.ko" & "ath6kl.ko" are in the right place - "/system/modules", I still got the error of insmod here:

# insmod cfg80211.ko
cfg80211: disagrees about version of symbol module_layout
cfg80211: disagrees about version of symbol module_layout
insmod: init_module 'cfg80211.ko' failed (Exec format error)

# insmod ath6kl.ko
ath6kl: disagrees about version of symbol module_layout
ath6kl: disagrees about version of symbol module_layout
insmod: init_module 'ath6kl.ko' failed (Exec format error)

Changed in linaro-android:
status: Confirmed → In Progress
Revision history for this message
Botao (botao-sun) wrote :

Still got error with busybox insmod:

# busybox insmod cfg80211.ko
cfg80211: disagrees about version of symbol module_layout
cfg80211: disagrees about version of symbol module_layout
insmod: can't insert 'cfg80211.ko': invalid module format

# busybox insmod ath6kl.ko
ath6kl: disagrees about version of symbol module_layout
ath6kl: disagrees about version of symbol module_layout
insmod: can't insert 'ath6kl.ko': invalid module format

Revision history for this message
Botao (botao-sun) wrote :

Removed "insmod /system/modules/cfg80211.ko" & "insmod /system/modules/ath6kl.ko" from "init.rc" and launched a build again, but still same errors there:

# insmod cfg80211.ko
cfg80211: disagrees about version of symbol module_layout
cfg80211: disagrees about version of symbol module_layout
insmod: init_module 'cfg80211.ko' failed (Exec format error)

# busybox insmod cfg80211.ko
cfg80211: disagrees about version of symbol module_layout
cfg80211: disagrees about version of symbol module_layout
insmod: can't insert 'cfg80211.ko': invalid module format

Revision history for this message
Botao (botao-sun) wrote :

After put the third party firmware under the path "/system/etc" as Angus's advice, it works now. But I still can't connect to a real wireless network, for example, my wireless router. In Android system, there is no iwconfig like in ubuntu. I also followed instructions in Vishal's "Enabling WLAN" email, but finally I got this:

wpa_supplicant -Dwext -iwlan0 -c/system/etc/wifi/wpa_supplicant.conf -dd &
wpa_cli -p/data/system/wpa_supplicant

Selected interface 'wlan0'
Could not connect to wpa_supplicant - re-trying

Then stuck at there.

In our current stage, do we just need to test the wireless chip whether can be recognized? Or connect to a real wireless network to show Google main page?

Changed in linaro-landing-team-samsung:
importance: Undecided → Medium
assignee: Angus Ainslie (angus-akkea) → Sangwook Lee (sangwook)
milestone: 2011.09 → 2011.10
Botao (botao-sun)
Changed in linaro-android:
milestone: 11.09 → 11.10
Zach Pfeffer (pfefferz)
Changed in linaro-android:
importance: Medium → High
Revision history for this message
Sangwook Lee (sangwook) wrote :

1) Please push wireless tools into Android Platfrom
      http://sourceforge.net/projects/wtoolsandroid/
    you can download source code from this website.

    This helps to understand whether the problem related to WLAN Kernel driver or Android Platform.
    If "iwconfig" and "iwlist" works fine, we need to modify the Android Platform source code.

2) Please use static IP at first instead of DHCP at first.
    if it works,then you can try DHCP

3) To get the further stability,
   I am back-porting the latest Atheros WLAN source to Samsung LT git from https://github.com/kvalo/ath6kl.
   Once done, I will push Samsung LT Angus Git.

Revision history for this message
Botao (botao-sun) wrote :

Hi Sangwook,

thank you for your advice.

Yes, the "iwconfig" & "iwlist" will enhance the Origen network functionality definitely, but the Android integration for the third party tool is always not a simple task. According to our previous experience, there may be many issues come out during the source code compiling and linking, so currently, the top priority is to enable the WIFI first, see the Google main page from the board, then do the integration if necessary.

Static IP is a good idea, let me try it soon.

Revision history for this message
Botao (botao-sun) wrote :

Using "netcfg wlan0 dhcp" to try the DHCP again, and it works this time - Origen board has got the IP address. Unfortunately, it still can't open any web page, and the browser prompted that no network connection.

The ath6kl driver we used seems be not stable. After reboot, I just did the exactly same thing as previous, and it doesn't work anymore, stuck at scanning in the wpa supplicant client console.

There are 3 logcat output files in attachment:

1. logcat_output_111007_1st.tgz: Board got IP address successfully via DHCP by wpa supplicant tool.

2. logcat_output_111007_2nd.tgz: After reboot the board and do the exactly same thing as before, the status of wpa supplicant client is stuck at scanning.

3. logcat_output_111007_3rd.tgz: Reboot the origen board again, same error as the previous one - the status of wpa supplicant client is stuck at scanning.

@Sangwook: Do you have any idea on this?

Revision history for this message
Sangwook Lee (sangwook) wrote :

@Botao,

1)
When you gets DHCP address, please run "ping" other host and run web browser at the same time.
If you keep receiving ping reply, Browser must run.

2)
Yes, the current driver Atheros seems not to be stable.
So I am trying to replace this one with the latest snapshot of Atheros AR6003.
But the latest driver of the open source Atheros haven't been testing Atheros AR6003 H2.0 versoin which is currently used by Origen. So this week, I submitted two patches to mainline in order to enable Atheros AR6003 HW2.0
(please see the below). Unfortunately Qualcomm(WLAN) engineers is working only with HW2.1.1

http://www.spinics.net/lists/linux-wireless/msg78075.html
http://www.spinics.net/lists/linux-wireless/msg78119.html

And the open source driver has some problems of the scanning function with HW2.0, so I am trying to make work-around as based on the latest source code. But since I doesn't have much knowledge about this WLAN, (even no documents), I am facing little difficulties. For example, during WLAN operation, suddenly there is no interrupts coming from WLAN chip.

Revision history for this message
Scott Bambrough (scottb) wrote : Re: [Bug 851006] Re: WiFi doesn't work on Android Origen

On Fri, 2011-10-07 at 12:44 +0000, Sangwook Lee wrote:
> @Botao,
>
> 1) When you gets DHCP address, please run "ping" other host and run
> web browser at the same time. If you keep receiving ping reply,
> Browser must run.

You should check if you get DNS server info returned from DHCP. Perhaps
the DHCP server isn't configured correctly. Be sure to choose an
outside server. I usually ping www.apple.com, or www.redhat.com, and
try these in the browser. If the ping works, but the browser doesn't
then there is a problem with http traffic, otherwise it is usually DNS
setup.

--
Scott Bambrough <email address hidden>
Technical Director, Linaro Landing Teams

Revision history for this message
Botao (botao-sun) wrote :

The Samsung Origen board now can connect to the real Internet by WPA Supplicant tool via accessing web site IP directly. There are still something wrong on the DNS but we finally get some achievement.

I took 2 snapshots here, one for the Google main page and another is my wireless router administration screen, you can find the Samsung Origen board there with IP 192.168.1.17.

You also can find the logcat output in the attachment package.

Revision history for this message
Botao (botao-sun) wrote :

After set DNS manually by "setprop net.dns1 192.168.1.1", Origen board can surf the Internet now.

Refer to attachment to get the snapshot and logcat output.

Revision history for this message
Zach Pfeffer (pfefferz) wrote :
Revision history for this message
Botao (botao-sun) wrote :

In order to let WIFI work on Origen with WPA command line, there are some manually works to do, for example: before board boots up, copy the ath6kl driver to the /system/etc/firmware, execute a list of commands, etc. The log above shows looks like a firmware missing error.

Revision history for this message
Botao (botao-sun) wrote :

By the way, the first 11.10 candidate build seems be too old, it was generated on 6th October. On the staging-origen build, there were some updates after that.

Revision history for this message
Botao (botao-sun) wrote :

I tried with the staging-origen build 21, the console works well even without those manually works for WIFI feature.

https://android-build.linaro.org/builds/~linaro-android/staging-origen/#build=21

Of course, in order to enable WIFI, those manually works are necessary. Whatever, just update the 11.10 origen release candidate first.

Revision history for this message
Sangwook Lee (sangwook) wrote :

@Zach
I saw your attached file- minicom.txt.
---------
<7>ath6kl: ath6kl_sdio_free_bus_req: bus request 0xecb9f4e8
---------
You can see this kind of debugging message because the debug mode is enabled with the current WLAN driver
to make timing delay not to miss interrupts

Revision history for this message
Zach Pfeffer (pfefferz) wrote :

Tested on latest 11.10 release, https://android-build.linaro.org/jenkins/job/linaro-android_staging-origen-11.10-release/4/artifact/build/out/target/product/origen/boot.tar.bz2. Bootlog attached, after clicking on enable WiFi through the UI.

Revision history for this message
Sangwook Lee (sangwook) wrote :

According to the log message of "minicom.txt", WLAN driver is loaded successfully.

The following log message from this log file is the normal debugging message,
which is enabled on purpose.
----------------------------------------------------------------------------------------------
<7>ath6kl: ath6kl_sdio_free_bus_req: bus request 0xecb9f704
<7>ath6kl: ath6kl_sdio_free_bus_req: bus request 0xecb9f728
<7>ath6kl: ath6kl_sdio_free_bus_req: bus request 0xecb9f74c
<7>ath6kl: ath6kl_sdio_free_bus_req: bus request 0xecb9f770
<7>ath6kl: ath6kl_sdio_free_bus_req: bus request 0xecb9f794
<7>ath6kl: ath6kl_sdio_free_bus_req: bus request 0xecb9f7b8
<7>ath6kl: ath6kl_sdio_free_bus_req: bus request 0xecb9f7dc
<7>ath6kl: ath6kl_sdio_free_bus_req: bus request 0xecb9f800
<7>ath6kl: ath6kl_sdio_free_bus_req: bus request 0xecb9f824
---------------------------------------------------------------------------------------------

Revision history for this message
Botao (botao-sun) wrote :

After this bug fixed: https://bugs.launchpad.net/linaro-android/+bug/868543, the WIFI on Samsung Origen board works now - enable from UI. You can get the image from here:

https://android-build.linaro.org/builds/~linaro-android/staging-origen/#build=27

However, the ath6k driver still need to be put under the path "/system/etc/firmware" (You need to create "firmware" directory by your self). You can find the driver and a snapshot in attachment.

Botao (botao-sun)
Changed in linaro-android:
status: In Progress → Fix Committed
Sangwook Lee (sangwook)
Changed in linaro-landing-team-samsung:
status: In Progress → Fix Committed
Revision history for this message
Botao (botao-sun) wrote :

This comment is used for the ath6k binary firmware download. It will be added to the Linaro git repository later then end users don't need to do this manually.

Refer to attachment.

Procedures:

1. After SD card flashing, plug it out and plug it in, then your SD card partitions will show up on your computer.

2. Go to the /system partition of your SD card, create a directory named "firmware" under the path "/system/etc"

3. Decompress the attachment and copy it to "/system/etc/firmware"

4. Your final directory structure should like this: "/system/etc/firmware/ath6k/..."

You may need root permission to perform step 2 & 3.

Botao (botao-sun)
Changed in linaro-android:
status: Fix Committed → In Progress
Changed in linaro-android:
milestone: 11.10 → 11.11
Revision history for this message
Botao (botao-sun) wrote :
Download full text (6.9 KiB)

For the Origen Android build 46 (https://android-build.linaro.org/builds/~linaro-android/staging-origen/#build=46), WIFI totally doesn't work. After I click the WIFI in settings menu, it turned on then the board rebooted, after that, the WIFI can't be turned on again.

@Angus & Sangwook: Do you know what's going on for this? Is there any change which is related to WIFI in the new kernel?

Below is the serial console logs:
##########################################################
<4>mmc2: queuing unknown CIS tuple 0x01 (3 bytes)
mmc2: queuing unknown CIS tuple 0x01 (3 bytes)
<4>mmc2: queuing unknown CIS tuple 0x1a (5 bytes)
mmc2: queuing unknown CIS tuple 0x1a (5 bytes)
<4>mmc2: queuing unknown CIS tuple 0x1b (8 bytes)
mmc2: queuing unknown CIS tuple 0x1b (8 bytes)
<4>mmc2: queuing unknown CIS tuple 0x14 (0 bytes)
mmc2: queuing unknown CIS tuple 0x14 (0 bytes)
<4>mmc2: queuing unknown CIS tuple 0x80 (1 bytes)
mmc2: queuing unknown CIS tuple <x80 (1 bytes)
4>mmc2: queuing unknown CIS tuple 0x81 (1 bytes)
mmc2: queuing unknown CIS tuple <x81 (1 bytes)
4>mmc2: queuing unknown CIS tuple 0x82 (1 bytes)
mmc2: queuing unknown CIS tuple <x82 (1 bytes)
6>mmc2: new high speed SDIO card at address 0001
mmc2: new high speed SDIO card at address 0001
<6>alarm_release: clear alarm, pending 0
alarm_release: clear al<rm, pending 0
6>alarm_release: clear alarm, pending 0
alarm_release: clear al<rm, pending 0
6>alarm_release: clear alarm, pending 0
alarm_release: clear alarm, pending 0
<3>init: untracked pid 1971 exited
init: untracked pid 1971 exited
<3>init: untracked pid 1975 exited
init: untracked pid 1975 exited
<3>init: untracked pid 2133 exited
init: untracked pid 2133 exited
<3>init: untracked pid 2140 exited
init: untracked pid 2140 exited
<3>init: untracked pid 2154 exited
init: untracked pid 2154 exited
<3>init: untracked pid 2156 exited
init: untracked pid 2156 exited ...

Read more...

Revision history for this message
Botao (botao-sun) wrote :

Oh! It works again..., WIFI currently is very unstable!

And the log of ath6kl module is different with those previous builds - there is no debug log any more.

Revision history for this message
Sangwook Lee (sangwook) wrote :

I changed ath6kl driver with polling method, which is very stable.
Accordingly, the log message was changed, and no more debug message comes
out.

On 12 November 2011 13:08, Botao Sun <email address hidden> wrote:

> Oh! It works again..., WIFI currently is very unstable!
>
> And the log of ath6kl module is different with those previous builds -
> there is no debug log any more.
>
> --
> You received this bug notification because you are a member of Linaro
> Landing Team: Samsung, which is subscribed to linaro-landing-team-
> samsung.
> https://bugs.launchpad.net/bugs/851006
>
> Title:
> WiFi doesn't work on Android Origen
>
> Status in Linaro Android:
> In Progress
> Status in Linaro Samsung Landing Team Project:
> Fix Committed
>
> Bug description:
> WiFi doesn't work on Origen.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/linaro-android/+bug/851006/+subscriptions
>

Revision history for this message
Botao (botao-sun) wrote :

The ath6k firmware has been added into the Origen target image, now the end users don't need to perform the procedures which described in comment #21.

Changed in linaro-android:
status: In Progress → Fix Committed
Revision history for this message
Zach Pfeffer (pfefferz) wrote :

Got an error after trying to enable WiFI through the UI on:
https://android-build.linaro.org/builds/~linaro-android/staging-origen/#build=53

Log attached.

Changed in linaro-android:
status: Fix Committed → In Progress
Changed in linaro-landing-team-samsung:
status: Fix Committed → In Progress
Revision history for this message
Botao (botao-sun) wrote :

I have tested the WIFI feature and it works well on build 53.

1. Enter the settings menu

2. Enter the Wireless & networks

3. Enter the Wi-Fi settings

4. Click Wi-Fi to enable it.

Although the board will reboot 1 or 2 times after that, it finally works. The Wi-Fi feature is not stable enough, so if you got a failure, just try it again.

I also saw the error message in that minicom.txt log before, just try more times.

Changed in linaro-android:
status: In Progress → Fix Committed
Changed in linaro-landing-team-samsung:
status: In Progress → Fix Committed
Changed in linaro-android:
status: Fix Committed → Fix Released
Changed in linaro-landing-team-samsung:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.