WiFi Issues on hikey on Android

Hi there,

we tried out two hikey boards with the respective latest android build (from: https://github.com/96boards/documentation/wiki/HiKeyGettingStarted/37c7eb93a5edefd70c42faf6c3becf84facd60d8#3-installing-build-of-android-open-source-project).

However, we encounter issues with the wifi. We are able to connect the boards with the router but after some time the connection is lost and not re-established any more. This is kind of annoying and a show-blocker.

Any suggestions on how to fix this? Do you have similar issues? Do we have to use a different driver?

Everything that solves the problem is highly welcome.


Those are outdated links. Are they really v7 builds?
In any case, please follow the instructions at http://www.96boards.org/documentation/ConsumerEdition/HiKey/Downloads/AOSP.md/ instead.

These were exactly the ones we used. Two hikey boards, both have the same problems.

I’ll try it today on a different router and come back with an update. Does someone has a newer build of Android or a different image? Suggestions and remarks are still welcome.

Btw, you were right it was no v7 build. I edited the topic.

Sorry I wasn’t clear enough earlier. I mean from http://www.96boards.org/documentation/ConsumerEdition/HiKey/Downloads/AOSP.md/, use the factory image. These are released by Google themselves (Linaro doesn’t do hikey aosp releases anymore) so should be newer.

vchong, this is exactly the one we used (following to the download link here: Images Preview for Nexus Devices  |  Google Play services  |  Google Developers, we downloaded exactly this version with that checksum)
I’ll try a different router today in the evening and on Saturday I’ll try to build Android 6 from source with a newer kernel.

Does anybody else has Problems with the wifi using the Android factory image?

Yes, I can’t access WIFI from Android 7 on Hikey board.

First, I checked the build again and it’s the latest 7.1.1 build with Kernel 4.4.38. The nice thing about this is that you find some information that the wifi is buggy on that Android version.

This is exactly what I see here at home. Hardware-wise it’s working great at my home router so far.
The first time I connect, the wifi connection drops after ~30s. The the SSID won’t appear again on refresh. When I connect manually to the wifi again using add network. After some time I loose the connection (at least it drops to zero), Android seems to hang and then the connection is re-established.

Can I boot the hikey in safe-mode? Can someone give me a hint?

Has someone an alternative image that I could try briefly?

I can confirm the issue.

I compiled AOSP from scratch and followed the official Google documentation, see https://source.android.com/source/devices.

repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.2_r6
repo sync -j8
. ./build/envsetup.sh
lunch hikey-eng

Then flash images according to ./device/linaro/hikey/installer/README

cd device/linaro/hikey/installer

I can connect to the Hikey board via WIFI. On my system via

adb connect


adb shell

feels very sluggish and the adb connection is reset after a couple of seconds.


adb shell dmesg

yields several errors related to WIFI networking:

[ 2581.511593] cfg80211: Timeout while waiting for CRDA to reply, restoring regulatory settings
[ 2581.511674] cfg80211: Restoring regulatory settings
[ 2581.511742] cfg80211: Kicking the queue
[ 2581.513013] android_work: sent uevent USB_STATE=CONNECTED
[ 2581.629371] dwc2 f72c0000.usb: new address 52
[ 2581.693160] configfs-gadget gadget: low-speed config #1: b
[ 2581.699161] android_work: sent uevent USB_STATE=CONFIGURED
[ 2584.663597] cfg80211: Timeout while waiting for CRDA to reply, restoring regulatory settings
[ 2584.663676] cfg80211: Restoring regulatory settings
[ 2584.663744] cfg80211: Kicking the queue
[ 2587.815402] cfg80211: Timeout while waiting for CRDA to reply, restoring regulatory settings
[ 2587.815478] cfg80211: Restoring regulatory settings
[ 2587.815543] cfg80211: Kicking the queue
[ 2590.967584] cfg80211: Timeout while waiting for CRDA to reply, restoring regulatory settings
[ 2590.967664] cfg80211: Restoring regulatory settings
[ 2590.967732] cfg80211: Kicking the queue
[ 2651.143611] cfg80211: Verifying active interfaces after reg change

It seems that the country code is not correct. Running

iw reg get

I get the output

country 00: DFS-UNSET                                                                                                                                                                    
        (2402 - 2472 @ 40), (6, 20), (N/A)                                                                                                                                               
        (2457 - 2482 @ 40), (6, 20), (N/A), PASSIVE-SCAN                                                                                                                                   
        (2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN                                                                                                                            
        (5170 - 5250 @ 160), (6, 20), (N/A), PASSIVE-SCAN                                                                                                                                       
        (5250 - 5330 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN                                                                                                                                   
        (5490 - 5730 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN                                                                                                                                     
        (5735 - 5835 @ 80), (6, 20), (N/A), PASSIVE-SCAN                                                                                                                                            
        (57240 - 63720 @ 2160), (N/A, 0), (N/A)    

Maybe these errors are the reason for the issue?


After some digging, it seems that the following procedure fixes the intermittent wifi disconnects.
Basically, I have updated the firmware to version R8.7_SP1.

git clone git://git.ti.com/wilink8-wlan/wl18xx_fw.git
cd wl18xx_fw
git checkout R8.7_SP1
adb push wl18xx-fw-4.bin /etc/firmware/ti-connectivity/
cd ..

I also updated the board configuration file.

git clone https://github.com/96boards-hikey/wifi-tools-configuration.git
cd wifi-tools-configuration
adb push wl18xx-conf.bin /etc/firmware/ti-connectivity/

I have not tested if updating the board config file is really necessary.

Unfortunately, the above procedure seems to have a negative impact on the wifi speed. I have not run a before/after benchmark, but it feels as if speed is now somewhat 3 times lower than before.

For reference:
The bug was filed here: https://bugs.96boards.org/show_bug.cgi?id=497

The bug does not happen in kernel version >= 4.10.

For kernel 4.9, i.e., branch
android-hikey-linaro-4.9 from remote kernel/hikey-linaro - Git at Google
a patch exists that fixes the issue: https://www.spinics.net/lists/stable/msg171009.html

Amit Pundir has also sent me a patch for kernel 4.4 via personal communication. (4.4 is the official kernel version for Android 7.1.2)