This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

The Issue to port Wl18xx R8.5 driver to OMAP4470(4AJ.2.5P2)

Hi TI,

My board is based on Android4.2.2(4AJ.2.5P2 OMAP4). Now I already ported the WL18xx R8.5 drivers to my board. But it seems libhardware_legacy have some problems to support the new wifi driver. Is it related to libnl? But in Blazetablet board, I can't find the libnl* file. 

If I use the old driver, there has no libnl* file too. But there is no the errors below. Could you kindly show me what should me to port or change?
Android error logs with the R8.5 drivers:
11-05 15:04:40.343   416   535 W WifiHW  : Wien wifi load driver ok, DRIVER_PROP_NAME=wlan.driver.status
11-05 15:04:40.351    94   353 W CommandListener: Failed to retrieve HW addr for wlan0 (No such device)
11-05 15:04:40.351   416   430 D PowerManagerService: mScreenOffTimeoutSetting =300000
11-05 15:04:40.359    94   353 D CommandListener: Setting iface cfg
11-05 15:04:40.359   416   433 I Zygote  : Process: zygote socket opened
11-05 15:04:40.359   416   528 E WifiStateMachine: Unable to change interface settings: java.lang.IllegalStateException: command '4 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 4 Failed to set address (No such device)'
11-05 15:04:40.359   416   528 D WifiHW  : Wien wifi wifi_stop_supplicant
11-05 15:04:40.359   416   528 D WifiHW  : Wien wifi wifi_start_supplicant
11-05 15:04:40.359   416   430 I ActivityManager: Sending system update to ComponentInfo{com.android.providers.media/com.android.providers.media.MediaUpgradeReceiver} for user 0
11-05 15:04:40.359   416   430 I SystemServer: Enabled StrictMode for system server main thread.
11-05 15:04:40.367   416   528 E WifiHW  : ctrl_interface != /data/misc/wifi/sockets
11-05 15:04:40.367   416   528 D WifiHW  : Wien wifi add_remove_p2p_interface, 1
11-05 15:04:40.367   416   528 D WifiHW  : Wien wifi to init nl
11-05 15:04:40.367   416   528 D WifiHW  : Wien wifi init nl done
11-05 15:04:40.367   416   528 D WifiHW  : Wien wifi execute_nl_interface_cmd
11-05 15:04:40.367   416   528 D WifiHW  : Wien wifi phy_lookup
11-05 15:04:40.367   416   528 E WifiHW  : unexpected - found 0 phys in /sys/class/ieee80211
11-05 15:04:40.367   416   528 D WifiHW  : Wien wifi nl_error_handler
11-05 15:04:40.367   416   528 E WifiHW  : could not add P2P interface: -19
11-05 15:04:40.367   416   528 D WifiHW  : Wien wifi delete nl
11-05 15:04:40.367   416   528 E WifiHW  : Wi-Fi - could not create p2p interface
11-05 15:04:40.367   416   528 E WifiStateMachine: Failed to start supplicant!
11-05 15:04:40.367   416   574 D WifiHW  : Wien wifi unloaded driver
11-05 15:25:51.031   416  1230 D WifiHW  : Wien wifi to load driver
11-05 15:25:51.031   416  1230 D WifiHW  : Wien wifi is_wifi_driver_loaded
11-05 15:25:51.031   416  1230 D WifiHW  : Wien wifi driver is found
11-05 15:25:51.031   416  1230 W WifiHW  : Wien wifi driver is already loaded, ko=/system/lib/modules/wlcore_sdio.ko, arg=
11-05 15:25:51.031   416   732 D WifiService: setWifiEnabled: true pid=733, uid=1000
11-05 15:25:51.039    94   353 D CommandListener: Setting iface cfg
11-05 15:25:51.039    94   353 D CommandListener: Trying to bring down wlan0
11-05 15:25:51.039   416   528 D WifiHW  : Wien wifi wifi_stop_supplicant
11-05 15:25:51.039   416   528 D WifiHW  : Wien wifi wifi_start_supplicant
11-05 15:25:51.039   416   528 D WifiHW  : Wien wifi add_remove_p2p_interface, 1
11-05 15:25:51.039   416   528 D WifiHW  : Wien wifi to init nl
11-05 15:25:51.039   416   528 D WifiHW  : Wien wifi init nl done
11-05 15:25:51.039   416   528 D WifiHW  : Wien wifi execute_nl_interface_cmd
11-05 15:25:51.039   416   528 D WifiHW  : Wien wifi phy_lookup
11-05 15:25:51.046   416   528 D WifiHW  : Wien wifi nl_error_handler
11-05 15:25:51.046   416   528 D WifiHW  : added/removed p2p interface. add: 1
11-05 15:25:51.046   416   528 D WifiHW  : Wien wifi delete nl
11-05 15:25:51.054   733   733 D BluetoothAdapter: 1092501048: getState() :  mService = null. Returning STATE_OFF
11-05 15:25:51.078  1231  1231 I wpa_supplicant: Successfully initialized wpa_supplicant
11-05 15:25:51.078  1231  1231 I wpa_supplicant: rfkill: Cannot open RFKILL control device
11-05 15:25:51.148   416  1232 D WifiHW  : Wien wifi wifi_connect_to_supplicant, wlan0
11-05 15:25:51.703  1231  1231 I wpa_supplicant: rfkill: Cannot open RFKILL control device
11-05 15:25:51.773   416   528 D WifiHW  : Wien wifi wifi_command, DRIVER MACADDR
11-05 15:25:51.773   416   528 D WifiHW  : Wien wifi wifi_send_command, DRIVER MACADDR
11-05 15:25:51.773   416   528 D WifiHW  : Wien wifi wifi_command, LIST_NETWORKS
11-05 15:25:51.773   416   528 D WifiHW  : Wien wifi wifi_send_command, LIST_NETWORKS
11-05 15:25:51.781   416   528 E WifiConfigStore: Error parsing configurationjava.io.FileNotFoundException: /data/misc/wifi/ipconfig.txt: open failed: ENOENT (No such file or directory)
  • Hi TI,

    The driver is already loaded, but why the wlan0 is not found? If I insmod wlcore_sdio.ko, the wlan0 is ready.
    11-05 15:04:40.343 416 535 W WifiHW : Wien wifi load driver ok, DRIVER_PROP_NAME=wlan.driver.status
    11-05 15:04:40.351 94 353 W CommandListener: Failed to retrieve HW addr for wlan0 (No such device)
    11-05 15:04:40.359 416 528 E WifiStateMachine: Unable to change interface settings: java.lang.IllegalStateException: command '4 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 4 Failed to set address (No such device)'
  • Hi,

    We don't have an R8.5 version on Android. The latest is: R8.4. Please see: www.omappedia.com/.../6AK.1.2_Release_Notes for more details.

    But, wlcore_sdio is required to be inserted for wlan0 to be created. This needs to be added in the init.rc.

    Regards,
    Gigi Joseph.
  • Hi TI,

    Now, I insmod the ko manually, but when to connect the AP, the error logs output from kernel:

    <6>[ 103.418670] wlan0: authenticate with c4:04:15:1b:c8:94
    <6>[ 103.430053] wlan0: send auth to c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 103.459472] wlan0: authenticated
    <6>[ 103.471130] wlan0: associate with c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 103.486206] wlan0: RX AssocResp from c4:04:15:1b:c8:94 (capab=0x411 status=0 aid=8)
    <6>[ 103.501770] wlan0: associated
    <6>[ 103.505279] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    <6>[ 103.529510] wlan0: deauthenticating from c4:04:15:1b:c8:94 by local choice (Reason: 1=UNSPECIFIED)
    <6>[ 103.571594] cfg80211: Calling CRDA to update world regulatory domain
    <6>[ 103.586212] cfg80211: World regulatory domain updated:
    <6>[ 103.591949] cfg80211: DFS Master region: unset
    <6>[ 103.596832] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    <6>[ 103.607543] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 103.616607] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 103.625793] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 103.634948] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 103.644012] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <7>[ 113.627655] wlan0: no IPv6 routers present
    <6>[ 125.544464] wlan0: authenticate with c4:04:15:1b:c8:94
    <6>[ 125.555053] wlan0: send auth to c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 125.585266] wlan0: authenticated
    <6>[ 125.596130] wlan0: associate with c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 125.607360] wlan0: RX AssocResp from c4:04:15:1b:c8:94 (capab=0x411 status=0 aid=8)
    <6>[ 125.622161] wlan0: associated
    <6>[ 125.660583] wlan0: deauthenticating from c4:04:15:1b:c8:94 by local choice (Reason: 1=UNSPECIFIED)
    <6>[ 125.736175] cfg80211: Calling CRDA to update world regulatory domain
    <6>[ 125.750122] cfg80211: World regulatory domain updated:
    <6>[ 125.755920] cfg80211: DFS Master region: unset
    <6>[ 125.760620] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    <6>[ 125.771392] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 125.780517] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 125.789672] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 125.798706] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 125.807891] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 194.633056] wlan0: authenticate with c4:04:15:1b:c8:94
    <6>[ 194.643188] wlan0: send auth to c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 194.673126] wlan0: authenticated
    <6>[ 194.682067] wlan0: associate with c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 194.693664] wlan0: RX AssocResp from c4:04:15:1b:c8:94 (capab=0x411 status=0 aid=8)
    <6>[ 194.711364] wlan0: associated
    <6>[ 194.714965] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    <6>[ 194.744293] wlan0: deauthenticating from c4:04:15:1b:c8:94 by local choice (Reason: 1=UNSPECIFIED)
    <6>[ 194.790832] cfg80211: Calling CRDA to update world regulatory domain
    <6>[ 194.806243] cfg80211: World regulatory domain updated:
    <6>[ 194.812774] cfg80211: DFS Master region: unset
    <6>[ 194.818908] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    <6>[ 194.829833] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 194.838867] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 194.848388] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 194.857421] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 194.866516] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)

    What cause the error "<6>[ 194.744293] wlan0: deauthenticating from c4:04:15:1b:c8:94 by local choice (Reason: 1=UNSPECIFIED)"?
    It can scan APs and try to connect AP, but it can't connect to AP, as the above error. Could you help me?
  • Hi Joseph,

    Now, I insmod the ko manually, but when to connect the AP, the error logs output from kernel:

    <6>[ 103.418670] wlan0: authenticate with c4:04:15:1b:c8:94
    <6>[ 103.430053] wlan0: send auth to c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 103.459472] wlan0: authenticated
    <6>[ 103.471130] wlan0: associate with c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 103.486206] wlan0: RX AssocResp from c4:04:15:1b:c8:94 (capab=0x411 status=0 aid=8)
    <6>[ 103.501770] wlan0: associated
    <6>[ 103.505279] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    <6>[ 103.529510] wlan0: deauthenticating from c4:04:15:1b:c8:94 by local choice (Reason: 1=UNSPECIFIED)
    <6>[ 103.571594] cfg80211: Calling CRDA to update world regulatory domain
    <6>[ 103.586212] cfg80211: World regulatory domain updated:
    <6>[ 103.591949] cfg80211: DFS Master region: unset
    <6>[ 103.596832] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    <6>[ 103.607543] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 103.616607] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 103.625793] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 103.634948] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 103.644012] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <7>[ 113.627655] wlan0: no IPv6 routers present
    <6>[ 125.544464] wlan0: authenticate with c4:04:15:1b:c8:94
    <6>[ 125.555053] wlan0: send auth to c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 125.585266] wlan0: authenticated
    <6>[ 125.596130] wlan0: associate with c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 125.607360] wlan0: RX AssocResp from c4:04:15:1b:c8:94 (capab=0x411 status=0 aid=8)
    <6>[ 125.622161] wlan0: associated
    <6>[ 125.660583] wlan0: deauthenticating from c4:04:15:1b:c8:94 by local choice (Reason: 1=UNSPECIFIED)
    <6>[ 125.736175] cfg80211: Calling CRDA to update world regulatory domain
    <6>[ 125.750122] cfg80211: World regulatory domain updated:
    <6>[ 125.755920] cfg80211: DFS Master region: unset
    <6>[ 125.760620] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    <6>[ 125.771392] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 125.780517] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 125.789672] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 125.798706] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 125.807891] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 194.633056] wlan0: authenticate with c4:04:15:1b:c8:94
    <6>[ 194.643188] wlan0: send auth to c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 194.673126] wlan0: authenticated
    <6>[ 194.682067] wlan0: associate with c4:04:15:1b:c8:94 (try 1/3)
    <6>[ 194.693664] wlan0: RX AssocResp from c4:04:15:1b:c8:94 (capab=0x411 status=0 aid=8)
    <6>[ 194.711364] wlan0: associated
    <6>[ 194.714965] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    <6>[ 194.744293] wlan0: deauthenticating from c4:04:15:1b:c8:94 by local choice (Reason: 1=UNSPECIFIED)
    <6>[ 194.790832] cfg80211: Calling CRDA to update world regulatory domain
    <6>[ 194.806243] cfg80211: World regulatory domain updated:
    <6>[ 194.812774] cfg80211: DFS Master region: unset
    <6>[ 194.818908] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    <6>[ 194.829833] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 194.838867] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 194.848388] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 194.857421] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
    <6>[ 194.866516] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)

    What cause the error "<6>[ 194.744293] wlan0: deauthenticating from c4:04:15:1b:c8:94 by local choice (Reason: 1=UNSPECIFIED)"?
    It can scan APs and try to connect AP, but it can't connect to AP, as the above error. Could you help me?
  • Hi Joseph,

    The WPA got errors. And why set PTK failed? What conf for Wpa for me to use?

    11-05 18:42:15.507 879 879 W wpa_supplicant: wlan0: WPA: Failed to set PTK to the driver (alg=3 keylen=16 bssid=c4:04:15:1b:c8:94)
    11-05 18:42:15.554 879 879 I wpa_supplicant: wlan0: CTRL-EVENT-DISCONNECTED bssid=c4:04:15:1b:c8:94 reason=1 locally_generated=1
    11-05 18:42:15.554 879 879 I wpa_supplicant: wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
    11-05 18:42:15.554 879 879 I wpa_supplicant: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="r7000" auth_failures=1 duration=10
  • Hi,

    Can you advise which supplicant you are using (and how was it built)? Please use the supplicant that comes as part of the official release.

    Regards,
    Gigi Joseph.
  • Hi Joseph,

    The supplicant comes as part of 4AJ.2.5P2 OMAP4. Does it have problem? It works well with the old drivers.

    Thanks,
    Wei
  • Lastly, I enable "CCM" in Kernel. Then It works.