Hi all,
i get stuck on debugging a wifi module AP6335 on our customer board based on android 6.0.1 , kernel 4.1.15,
the wifi driver comes from the wifi module supplier , (maybe this driver designed for kernel 3.X.X) , i integrate this driver into kernel image and i think this driver run well , i found another person encounter the similar issues Porting AP6335 WIFI to Android4.4.2
my kernel log :
[ 6.334944] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
[ 6.342568] /soc/aips-bus@02100000/usdhc@02198000: voltage-ranges unspecified
[ 6.349768] sdhci-esdhc-imx 2198000.usdhc: Got CD GPIO
[ 6.356193] sdhci-esdhc-imx 2198000.usdhc: No vmmc regulator found
[ 6.360170] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 6.361922] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 6.363676] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 6.366827] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 6.384435] sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found
[ 6.435094] mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
[ 6.437580] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
[ 6.437629] mmc1: new high speed SDIO card at address 0001
[ 6.453905] /soc/aips-bus@02100000/usdhc@0219c000: voltage-ranges unspecified
[ 6.461326] sdhci-esdhc-imx 219c000.usdhc: No vmmc regulator found
[ 6.467547] sdhci-esdhc-imx 219c000.usdhc: No vqmmc regulator found
[ 6.514943] mmc3: SDHCI controller on 219c000.usdhc [219c000.usdhc] using ADMA
[ 6.523752]
...........
[ 8.883893] dhd_module_init: in
[ 8.887086] ======== bcm_wlan_set_plat_data ========
[ 8.892060] dhd_wifi_platform_load: Enter
[ 8.896115] Power-up adapter 'DHD generic adapter'
[ 8.908800] wifi_platform_set_power = 1
[ 8.912656] =====toot=== PULL WL_REG_ON HIGH! ========
[ 8.917834]
[ 9.235006] wifi_platform_bus_enumerate device present 1
[ 9.240364] ======== Card detection to detect SDIO card! ========
[ 9.262846] bcmsdh_register: register client driver
[ 9.275779] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
[ 9.280889] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
[ 9.285802] bus num (host idx)=1, slot num (rca)=1
[ 9.290686] found adapter info 'DHD generic adapter'
[ 9.297276] F1 signature read @0x18000000=0x16224335
[ 9.309696] F1 signature OK, socitype:0x1 chip:0x4339 rev:0x1 pkg:0x2
[ 9.317070] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
[ 9.324137] dhd_conf_set_chiprev: chip=0x4339, chiprev=1
[ 9.324199] dhd_conf_set_conf_path_by_nv_path: config_path=/system/etc/firmware/config.txt
[ 9.344446] wl_create_event_handler(): thread:wl_event_handler:b9 started
[ 9.344461] tsk Enter, tsk = 0xd2a6147c
[ 9.362354] dhd_attach(): thread:dhd_watchdog_thread:ba started
[ 9.372183] dhd_attach(): thread:dhd_dpc:bb started
[ 9.372214] dhd_dpc_thread: set dpc_cpucore 0 from config.txt
[ 9.386937] dhd_attach(): thread:dhd_rxf:bc started
[ 9.391858] dhd_deferred_work_init: work queue initialized
[ 9.430929] Dongle Host Driver, version 1.201.59.6 (r506368)
[ 9.430929] Compiled in drivers/net/wireless/bcmdhd on Jul 9 2016 at 18:09:09
[ 9.431692] Register interface [wlan0] MAC: 94:a1:a2:48:55:1c
[ 9.431692]
[ 9.431701] dhd_prot_ioctl : bus is down. we have nothing to do
[ 9.431719] dhd_txglom_enable: enable 0
[ 9.431722] dhd_bus_devreset: WLAN OFF DONE
[ 9.431961] wifi_platform_set_power = 0
[ 9.431964] ====toot==== PULL WL_REG_ON LOW! ========
[ 9.431967]
[ 9.432044] dhd_module_init: Exit err=0
..................
[ 44.001557] init: Starting service 'wpa_supplicant'...
[ 44.133162] dhd_open: Enter d2937000
[ 44.136822]
[ 44.136822] Dongle Host Driver, version 1.201.59.6 (r506368)
[ 44.136822] Compiled in drivers/net/wireless/bcmdhd on Jul 9 2016 at 18:09:09
[ 44.151248] wl_android_wifi_on in 1
[ 44.154784] wl_android_wifi_on in 2: g_wifi_on=0
[ 44.160765] wifi_platform_set_power = 1
[ 44.164824] =====toot=== PULL WL_REG_ON HIGH! ========
[ 44.170136]
[ 44.510716] dhd_bus_devreset: == WLAN ON ==
[ 44.518165] F1 signature read @0x18000000=0x16224335
[ 44.530108] F1 signature OK, socitype:0x1 chip:0x4339 rev:0x1 pkg:0x2
[ 44.537593] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
[ 44.554355] dhd_conf_read_config: Ignore config file /system/etc/firmware/config.txt
[ 44.562300] dhd_conf_set_fw_name_by_chip: firmware_path=/system/etc/firmware/bcm/fw_bcm4339a0_ag.bin
[ 44.571526] dhdsdio_download_firmware: set use_rxchain 1 from config.txt
[ 44.578376] Final fw_path=/system/etc/firmware/bcm/fw_bcm4339a0_ag.bin
[ 44.585293] Final nv_path=/system/etc/firmware/nvram.txt
[ 44.590655] Final conf_path=/system/etc/firmware/config.txt
[ 44.746259] NVRAM version: AP6335_NVRAM_V1.7_04102014
[ 44.756112] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 44.941025] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[ 44.957636] dhd_conf_set_band: Set band 0
[ 44.962985] dhd_preinit_ioctls: Set tcpack_sup_mode 0
[ 44.980441] Firmware up: op_mode=0x0005, MAC=94:a1:a2:48:55:1c
[ 44.987369] dhd_conf_set_country: Set country CN, revision 38
[ 45.051743] Country code: CN (CN/38)
[ 45.055964] dhd_conf_set_roam: Set roam_off 1
[ 45.086214] dhd_conf_set_txbf: set txbf 1
[ 45.130810] Firmware version = wl0: Apr 3 2014 12:12:42 version 6.37.32.28.2_ip (r424058)
[ 45.140179] Driver: 1.201.59.6 (r506368)
[ 45.140179] Firmware: wl0: Apr 3 2014 12:12:42 version 6.37.32.28.2_ip (r424058)
[ 45.167671] dhd_txglom_enable: enable 1
[ 45.171573] dhd_conf_set_disable_proptx: set disable_proptx 0
[ 45.179432] dhd_wlfc_hostreorder_init(): successful bdcv2 tlv signaling, 64
[ 45.189664] wl_android_wifi_on: Success
[ 45.262456] dhd_open: Exit ret=0
[ 45.432289] WLC_E_IF: NO_IF set, event Ignored
[ 45.439343] dhd_wlfc_init(): successfully enabled bdcv2 tlv signaling, 79
[ 45.458168] dhd_wlfc_init(): wlfc_mode=0x0, ret=-23
[ 45.477268] Register interface [p2p-dev-wlan0] MAC: 96:a1:a2:48:d5:1c
[ 45.477268]
[ 45.489340] CFG80211-ERROR) wl_cfg80211_add_virtual_iface : virtual interface(p2p-dev-wlan0) is created net attach done
[ 45.507713] CFG80211-ERROR) dhd_cfg80211_set_p2p_info : Set : op_mode=0x0005
[ 45.687039] dhd_pktfilter_offload_set: failed to add pktfilter 102 0 0 0 0xFFFFFF 0x01005E, retcode = -2
[ 46.114796] mtp_open
root@sabresd_6dq:/ #
root@sabresd_6dq:/ #
root@sabresd_6dq:/ # ifconfig <<<<<----------- ifconfig command get stuck here,
wlan0 Link encap:Ethernet HWaddr 94:A1:A2:48:55:1C
terminal didn't response from here....
i check the location /sys/class/net on adb shell,
p2p-dev-wlan0
wlan0
two nodes exist,
the following is the logcat:
01-01 08:24:05.849 632-632/com.android.systemui V/SystemUIService: Starting SystemUI services.
01-01 08:24:05.937 555-570/system_process W/WindowManager: Keyguard drawn timeout. Setting mKeyguardDrawComplete
01-01 08:24:05.966 643-643/com.android.externalstorage D/ExternalStorage: After updating volumes, found 1 active roots
01-01 08:24:06.003 618-618/? I/wpa_supplicant: rfkill: Cannot open RFKILL control device
01-01 08:24:06.035 643-643/com.android.externalstorage D/ExternalStorage: After updating volumes, found 1 active roots
01-01 08:24:06.058 643-643/com.android.externalstorage D/ExternalStorage: After updating volumes, found 1 active roots
01-01 08:24:06.061 555-555/system_process E/NetdConnector: NDC Command {12 bandwidth enable} took too long (821ms)
01-01 08:24:06.061 555-602/system_process D/WifiConfigStore: Loading config and enabling all networks
01-01 08:24:06.071 555-602/system_process D/WifiConfigStore: loaded 0 passpoint configs
01-01 08:24:06.073 555-602/system_process E/WifiConfigStore: Error parsing configuration: java.io.FileNotFoundException: /data/misc/wifi/ipconfig.txt: open failed: ENOENT (No such file or directory)
01-01 08:24:06.096 555-602/system_process E/WifiConfigStore: readNetworkHistory: No config file, revert to default, java.io.FileNotFoundException: /data/misc/wifi/networkHistory.txt: open failed: ENOENT (No such file or directory)
java.io.FileNotFoundException: /data/misc/wifi/networkHistory.txt: open failed: ENOENT (No such file or directory)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
01-01 08:24:06.097 555-602/system_process E/WifiConfigStore: readAutoJoinStatus: Error parsing configurationjava.io.FileNotFoundException: /data/misc/wifi/autojoinconfig.txt: open failed: ENOENT (No such file or directory)
01-01 08:24:06.097 555-602/system_process E/WifiConfigStore: buildPnoList sortedWifiConfigurations size 0
01-01 08:24:06.107 555-602/system_process E/WifiConfigStore: --- Begin /data/misc/wifi/wpa_supplicant.conf ---
01-01 08:24:06.110 555-602/system_process E/WifiConfigStore: update_config=1
01-01 08:24:06.112 555-602/system_process E/WifiConfigStore: ctrl_interface=wlan0
01-01 08:24:06.113 555-602/system_process E/WifiConfigStore: eapol_version=1
01-01 08:24:06.115 555-602/system_process E/WifiConfigStore: ap_scan=1
01-01 08:24:06.117 555-602/system_process E/WifiConfigStore: fast_reauth=1
01-01 08:24:06.120 555-602/system_process E/WifiConfigStore: config_methods=virtual_push_button physical_display keypad
01-01 08:24:06.125 555-602/system_process E/WifiConfigStore: persistent_reconnect=1
01-01 08:24:06.127 555-602/system_process E/WifiConfigStore: --- End /data/misc/wifi/wpa_supplicant.conf Contents ---
01-01 08:24:06.129 555-602/system_process E/WifiConfigStore: --- Begin /data/misc/wifi/wpa_supplicant.conf.tmp ---
01-01 08:24:06.131 555-602/system_process E/WifiConfigStore: Could not open /data/misc/wifi/wpa_supplicant.conf.tmp, java.io.FileNotFoundException: /data/misc/wifi/wpa_supplicant.conf.tmp: open failed: ENOENT (No such file or directory)
01-01 08:24:06.133 555-602/system_process E/WifiConfigStore: --- End /data/misc/wifi/wpa_supplicant.conf.tmp Contents ---
01-01 08:24:06.134 555-602/system_process E/WifiConfigStore: --- Begin /data/misc/wifi/networkHistory.txt ---
01-01 08:24:06.137 555-602/system_process E/WifiConfigStore: Could not open /data/misc/wifi/networkHistory.txt, java.io.FileNotFoundException: /data/misc/wifi/networkHistory.txt: open failed: ENOENT (No such file or directory)
01-01 08:24:06.143 555-602/system_process E/WifiConfigStore: --- End /data/misc/wifi/networkHistory.txt Contents ---
01-01 08:24:06.167 225-541/? I/iptables: iptables: No chain/target/match by that name.
01-01 08:24:06.167 555-602/system_process D/WifiNative-HAL: Setting external_sim to 1
01-01 08:24:06.177 555-602/system_process D/WifiStateMachine: Setting OUI to DA-A1-19
01-01 08:24:06.184 225-541/? I/iptables: iptables terminated by exit(1)
01-01 08:24:06.185 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/iptables -w -F st_penalty_log
01-01 08:24:06.203 225-541/? I/ip6tables: ip6tables: No chain/target/match by that name.
01-01 08:24:06.206 225-541/? I/ip6tables: ip6tables terminated by exit(1)
01-01 08:24:06.206 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/ip6tables -w -F st_penalty_log
01-01 08:24:06.227 225-541/? I/iptables: iptables: No chain/target/match by that name.
01-01 08:24:06.227 225-541/? I/iptables: iptables terminated by exit(1)
01-01 08:24:06.228 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/iptables -w -F st_penalty_reject
01-01 08:24:06.253 225-541/? I/ip6tables: ip6tables: No chain/target/match by that name.
01-01 08:24:06.261 225-541/? I/ip6tables: ip6tables terminated by exit(1)
01-01 08:24:06.261 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/ip6tables -w -F st_penalty_reject
01-01 08:24:06.293 225-541/? I/iptables: iptables: No chain/target/match by that name.
01-01 08:24:06.302 225-541/? I/iptables: iptables terminated by exit(1)
01-01 08:24:06.302 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/iptables -w -F st_clear_caught
01-01 08:24:06.322 225-541/? I/ip6tables: ip6tables: No chain/target/match by that name.
01-01 08:24:06.323 225-541/? I/ip6tables: ip6tables terminated by exit(1)
01-01 08:24:06.323 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/ip6tables -w -F st_clear_caught
01-01 08:24:06.342 225-541/? I/iptables: iptables: No chain/target/match by that name.
01-01 08:24:06.342 225-541/? I/iptables: iptables terminated by exit(1)
01-01 08:24:06.343 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/iptables -w -F st_clear_detect
01-01 08:24:06.375 225-541/? I/ip6tables: ip6tables: No chain/target/match by that name.
01-01 08:24:06.396 225-541/? I/ip6tables: ip6tables terminated by exit(1)
01-01 08:24:06.396 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/ip6tables -w -F st_clear_detect
01-01 08:24:06.408 228-551/? E/OMXMaster: A component of name 'OMX.Freescale.std.parser.fsl.sw-based' already exists, ignoring this one.
01-01 08:24:06.419 225-541/? I/iptables: iptables: No chain/target/match by that name.
01-01 08:24:06.420 225-541/? I/iptables: iptables terminated by exit(1)
01-01 08:24:06.420 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/iptables -w -X st_penalty_log
01-01 08:24:06.450 225-541/? I/ip6tables: ip6tables: No chain/target/match by that name.
01-01 08:24:06.457 225-541/? I/ip6tables: ip6tables terminated by exit(1)
01-01 08:24:06.457 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/ip6tables -w -X st_penalty_log
01-01 08:24:06.478 225-541/? I/iptables: iptables: No chain/target/match by that name.
01-01 08:24:06.483 228-551/? I/vpu-lib: Product Info: i.MX6Q/D/S
01-01 08:24:06.484 228-551/? W/ACodec: do not know color format 0x7f000789 = 2130708361
01-01 08:24:06.484 228-551/? I/OMXPlayer: LEVEL: 1 FUNCTION: DeInitFilterComponent LINE: 2003
01-01 08:24:06.486 225-541/? I/iptables: iptables terminated by exit(1)
01-01 08:24:06.487 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/iptables -w -X st_penalty_reject
01-01 08:24:06.504 225-541/? I/ip6tables: ip6tables: No chain/target/match by that name.
01-01 08:24:06.504 225-541/? I/ip6tables: ip6tables terminated by exit(1)
01-01 08:24:06.505 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/ip6tables -w -X st_penalty_reject
01-01 08:24:06.516 228-551/? I/vpu-lib: Product Info: i.MX6Q/D/S
01-01 08:24:06.517 228-551/? W/ACodec: do not know color format 0x7f000789 = 2130708361
01-01 08:24:06.517 228-551/? I/OMXPlayer: LEVEL: 1 FUNCTION: DeInitFilterComponent LINE: 2003
01-01 08:24:06.526 225-541/? I/iptables: iptables: No chain/target/match by that name.
01-01 08:24:06.533 228-551/? I/vpu-lib: Product Info: i.MX6Q/D/S
01-01 08:24:06.534 228-551/? W/ACodec: do not know color format 0x7f000789 = 2130708361
01-01 08:24:06.534 228-551/? I/OMXPlayer: LEVEL: 1 FUNCTION: DeInitFilterComponent LINE: 2003
01-01 08:24:06.537 225-541/? I/iptables: iptables terminated by exit(1)
01-01 08:24:06.538 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/iptables -w -X st_clear_caught
01-01 08:24:06.559 225-541/? I/ip6tables: ip6tables: No chain/target/match by that name.
01-01 08:24:06.563 228-551/? W/OMXNodeInstance: [5:Freescale.std._decoder.avc.v3.hw-based] component does not support metadata mode; using fallback
01-01 08:24:06.566 225-541/? I/ip6tables: ip6tables terminated by exit(1)
01-01 08:24:06.567 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/ip6tables -w -X st_clear_caught
01-01 08:24:06.582 228-551/? W/OMXNodeInstance: [6:Freescale.std._decoder.mpeg4.hw-based] component does not support metadata mode; using fallback
01-01 08:24:06.587 225-541/? I/iptables: iptables: No chain/target/match by that name.
01-01 08:24:06.596 225-541/? I/iptables: iptables terminated by exit(1)
01-01 08:24:06.597 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/iptables -w -X st_clear_detect
01-01 08:24:06.600 638-638/android.process.media D/MtpService: starting MTP server in MTP mode
01-01 08:24:06.602 228-551/? W/OMXNodeInstance: [7:Freescale.std._decoder.h263.hw-based] component does not support metadata mode; using fallback
01-01 08:24:06.617 225-541/? I/ip6tables: ip6tables: No chain/target/match by that name.
01-01 08:24:06.623 228-551/? W/OMXNodeInstance: [8:Freescale.std._decoder.mpeg2.hw-based] component does not support metadata mode; using fallback
01-01 08:24:06.632 228-551/? E/OMXNodeInstance: getParameter(9:Freescale.std._decoder.vpx.hw-based, ParamVideoProfileLevelQuerySupported(0x600000f)) ERROR: UnsupportedIndex(0x8000101a)
01-01 08:24:06.632 228-551/? W/OMXNodeInstance: [9:Freescale.std._decoder.vpx.hw-based] component does not support metadata mode; using fallback
01-01 08:24:06.636 225-541/? I/ip6tables: ip6tables terminated by exit(1)
01-01 08:24:06.637 225-541/? E/Netd: exec() res=0, status=256 for /system/bin/ip6tables -w -X st_clear_detect
01-01 08:24:06.668 228-551/? E/OMXNodeInstance: getParameter(a:Freescale.std._decoder.soft_hevc.sw-based, ParamVideoProfileLevelQuerySupported(0x600000f)) ERROR: UnsupportedIndex(0x8000101a)
I don't know whether this issues caused by wifi driver or the wpa_supplicant,
could anyone tell me how to get rid of this issues ?
Every help is very appreciated
toot_hzf
Solved! Go to Solution.
Hi igor,
you are right!
after some days research, i finally got my ap6335 wifi module work....
the following is what I done:
i download BCMDHD-L4.1.15_1.1.0 and extract the new firmware, replace the old firmwares,
the wifi module seems work correctly , i can scan wifi by wl cmd
#wl scan
#wl scanresults /// i got lots results
now the wifi module work on linux, it still need to adapt to android hal so android system can manager it.
Initially, it is always print this error,
"Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": ".
after search this community, i find the answer this link
https://community.nxp.com/message/652788?commentID=652788#comment-652788
it is need to modify this wifi.c like this
int wifi_connect_to_supplicant()
{
static char path[PATH_MAX];
//tootzoe
// if (access(IFACE_DIR, F_OK) == 0) {
// snprintf(path, sizeof(path), "%s/%s", IFACE_DIR, primary_iface);
// } else {
ALOGD("wifi will connect android wpa %s\n", primary_iface);
snprintf(path, sizeof(path), "@android:wpa_%s", primary_iface); // this line is enough
// }
return wifi_connect_on_socket_path(path);
}
huang 工:
我也有同样wifi的问题,能加你的QQ聊聊吗,我的QQ是274900756,谢谢!
Hi huang
please try bcm4339 driver which is integrated to nxp bsp, it is described in
attached Linux Manual Chapter 46 Wi-Fi BCM4339 Driver.
Check also Broadcom Firmware package BCMDHD-L4.1.15_1.1.0
Probably you may need to upgrade firmware, suggest to apply
to vendor support
Wi-Fi Bluetooth for NXP i.MX | RF Modules | Wireless Products | Murata Manufacturing
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igor,
you are right!
after some days research, i finally got my ap6335 wifi module work....
the following is what I done:
i download BCMDHD-L4.1.15_1.1.0 and extract the new firmware, replace the old firmwares,
the wifi module seems work correctly , i can scan wifi by wl cmd
#wl scan
#wl scanresults /// i got lots results
now the wifi module work on linux, it still need to adapt to android hal so android system can manager it.
Initially, it is always print this error,
"Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": ".
after search this community, i find the answer this link
https://community.nxp.com/message/652788?commentID=652788#comment-652788
it is need to modify this wifi.c like this
int wifi_connect_to_supplicant()
{
static char path[PATH_MAX];
//tootzoe
// if (access(IFACE_DIR, F_OK) == 0) {
// snprintf(path, sizeof(path), "%s/%s", IFACE_DIR, primary_iface);
// } else {
ALOGD("wifi will connect android wpa %s\n", primary_iface);
snprintf(path, sizeof(path), "@android:wpa_%s", primary_iface); // this line is enough
// }
return wifi_connect_on_socket_path(path);
}
Hi igor,
thanks for your replying , i will try you suggestion, i only android building environment , so i need to setup embedded linux building environment, i will be back when i finish my testing.
thanks.
toot_hzf