Wifi cannot work on Android layer with i.MX6 SABRE-SD board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wifi cannot work on Android layer with i.MX6 SABRE-SD board

4,731 Views
waynelou
Contributor I

Dear all,

Thank you for your support.

I am using i.MX6 SABRE-SD board with Android 4.4 kitkat. Now I am porting TI's wilink8 to enable wifi.

After I insert MMC card and insmod compat.ko, cfg80211.ko, mac80211.ko, wlcore.ko, wl18xx.ko,

I could use command  "ifconfig wlan0 up" to enable wifi interface. I also could use "iw wlan0 scan | grep SSID" to scan AP around me.

This mean that wifi is work on driver and kernel layer, right?

But I could not enable wifi on Android UI, I went to Android setting, tried to use wifi trigger, but it's not work.

Could you help me how to solve this issue, thank you!


Regards,

Wayne

Labels (1)
0 Kudos
Reply
8 Replies

1,714 Views
aravinthkumarja
Senior Contributor II

Hi waynelou​,

Did you solve the issue, I'm also facing the same issue, If you solved can you guide me.

Ralink WiFi issue on imx6 solo android

Thanks!

Aravinth

0 Kudos
Reply

1,714 Views
waynelou
Contributor I

Hello all,

Below is the logcat when I go to setting -> wifi-trigger and enable wifi.

But I could not find direction to solve the issue. It looks that caused by wpa_supplicant.

Anybody could give me some tips on how to solve it. It would be very helpful for me!!


Thanks & regards,

Wayne

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: 20

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -95

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -2

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -2

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -2

I/wpa_ADDRCONF(NETDEV_UP): p2p0: link is not ready

supplicant( 3329): rfkill: Cannot open RFKILL control device

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: 20

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: 20

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -67

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -95

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -2

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -2

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -2

D/WifiConfigStore( 2666): Loading config and enabling all networks

E/WifiConfigStore( 2666): Error parsing configurationjava.io.FileNotFoundException: /data/misc/wifi/ipconfig.txt: open failed: ENOENT (No such file or directory)

E/WifiStateMachine( 2666): Failed to set device name sabresd_6dq

E/WifiStateMachine( 2666): Failed to set manufacturer Freescale

E/WifiStateMachine( 2666): Failed to set model name SABRESD-MX6DQ

E/WifiStateMachine( 2666): Failed to set model number SABRESD-MX6DQ

E/WifiStateMachine( 2666): Failed to set serial number 0d0729d4d81917c9

E/WifiStateMachine( 2666): Failed to set WPS config methods

E/WifiStateMachine( 2666): Failed to set primary device type 10-0050F204-5

E/WifiStateMachine( 2666): Failed to set frequency band 0

D/BluetoothAdapter( 2825): 1102955688: getState() :  mService = null. Returning STATE_OFF

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -2

I/wpa_supplicant( 3329): nl80211: send_and_recv->nl_recvmsgs failed: -2

E/NetdConnector( 2666): NDC Command {32 interface getcfg p2p0} took too long (1002ms)

D/CommandListener( 2305): Setting iface cfg

D/CommandListener( 2305): Trying to bring up p2p0

D/WifiMonitor( 2666): startMonitoring(p2p0) with mConnected = true

W/AudioTrack( 2666): AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate (48000 vs 44100)

I/ActivityManager( 2666): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from pid 2825

W/audio_hw_primary( 2310): card 0, port 0 device 0x2

W/audio_hw_primary( 2310): rate 44100, channel 2 period_size 0xc0

D/SubSettings( 2825): Launching fragment com.android.settings.wifi.WifiSettings

D/dalvikvm( 2825): GC_CONCURRENT freed 119K, 6% free 3585K/3776K, paused 2ms+3ms, total 19ms

E/BufferQueue( 2307): [com.android.settings/com.android.settings.SubSettings] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I/ActivityManager( 2666): Displayed com.android.settings/.SubSettings: +159ms

W/audio_hw_primary( 2310): do_out_standby... 1095407200

0 Kudos
Reply

1,714 Views
haoranwang
NXP Employee
NXP Employee

Hi Wayne,

     Did you modify the Wifi HAL for kitkat?

     It's in the hardware/libhardware_legacy/wifi/wifi_unite.c

     In our BSP we will check the mmc device info and select which .ko to insmod. And it is called by the Android framework. If the HAL returned error to framework it will not show "Enable" in the "settings" certainly.

     Could you provide the vendor and device into in "/sys/bus/sdio/devices/mmc*" ?

     Then I can make a patch for you to try it.

BRs,

Haoran

0 Kudos
Reply

1,714 Views
waynelou
Contributor I

Hi Haoran,

Yes, I just modified HAL for TI's wifi in hardware/libhardware_legacy/wifi/wifi.c

Please refer attachment for entire wifi.c source code.

Here is the output for vendor and device into "/sys/bus/sdio/devices/mmc*"   

root@sabresd_6dq:/sys/bus/sdio/devices # ls

mmc1:0001:1

mmc1:0001:2

Now I could turn on wifi in Android UI -> settings -> wifi trigger, but I could not get scan results , it always shows "Searching for Wi-Fi networks..." in UI settings.

I also could use wpa_cli, and "iw" command to scan AP. So I could make sure wlan0 is bring up

root@sabresd_6dq:/ # netcfg

lo      UP                                  127.0.0.1/8  0x00000049 00:00:00:00:00:00

eth0    UP                                    0.0.0.0/0  0x00001043 00:04:9f:02:af:61

wlan0    UP                                    0.0.0.0/0  0x00001003 78:a5:04:26:95:76

p2p0    UP                                    0.0.0.0/0  0x00001003 78:a5:04:26:95:77


I suspect that wifi send wrong command string from frameworks-> JNI -> HAL -> wpa_supplicant.

Because I could see the command in HAL is "IFNAME=wlan0 SCAN", but it should be only "SCAN". So it might send wrong command from HAL to wpa_supplicant.


Please provide me more clues, or if you need more information please just ask me.


Thanks & Regards,

Wayne

0 Kudos
Reply

1,714 Views
haoranwang
NXP Employee
NXP Employee

Hi Wayne,

     I think you forget to add the wpa_supplicant_8_lib from TI.

     This lib is use for wpa_supplicant to communicate with drivers(nl80211).

     To port this you should get the lib source and find its LOCAL_MODULE in its Android.mk and added it to the wpa_supplicant_8/wpa_supplicant/Android.mk like this:

ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_QCOM),)

LOCAL_STATIC_LIBRARIES += $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_QCOM)

endif

This is the example for Atheros wifi card.

BRs,

Haoran

0 Kudos
Reply

1,714 Views
saurabh206
Senior Contributor III

Hi,

Wayne

Check logcat detail, it will provide you better idea.

Regards

Saurabh

1,714 Views
som05
Contributor I

Hello Wayne,

What version of the android kernel are you using? Also please let us know where you pulled the hardware folder from ?

Were are also trying to get the Wilink 8 module working on a custom arm board running android KK with 3.12 kernel and stuck at the same problem with the wifi not triggering any wpa_supplicant.

Thanks,

SJ

1,714 Views
waynelou
Contributor I

Hi Som,

My kernel version is 3.0.35. I pulled the hardware folder from ti openlink, which git tag is ol_r8.a9.14. And I put them to myandroid/hardware/ti/wlan/mac80211/ then build out module for device.

Thank you.

Wayne

0 Kudos
Reply