WIFI module AP6335(bcm4339) SoftAp start failed on android6.0.1(kernel 4.1.15)

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

WIFI module AP6335(bcm4339) SoftAp start failed on android6.0.1(kernel 4.1.15)

Jump to solution
5,681 Views
tootzoe
Contributor III


Hi, all,


i reticently twist wifi ap6335(bcm4339) , it work on station mode well now, see  https://community.nxp.com/thread/430183

but when i switch the WIFI to SoftAp mode , errors occurred,
i am using the bcmdhd driver come along with NXP bsp, NOT the driver obtained from module supplier,
kernel message output like this:

[ 295.401402]
[ 295.401402] Dongle Host Driver, version 1.141.88 (r)
[ 295.401402] Compiled from
[ 295.412372] wl_android_wifi_on in
[ 295.522665] tootzoe enable wifi regulator and turn=1 wifi REG_ON gpio
[ 295.522670] sdio_reset_comm():
[ 295.617515] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 295.638032] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 295.657006] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 295.685663] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 296.163257] F1 signature OK, socitype:0x1 chip:0x4339 rev:0x1 pkg:0x2
[ 296.171398] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
[ 296.283325] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 296.481618] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[ 296.489064] wifi_platform_get_mac_addr
[ 296.502825] Firmware up: op_mode=0x0002, MAC=94:a1:a2:48:55:16
[ 296.522911] Firmware version = wl0: Feb 17 2016 12:09:03 version 6.37.39.36 (r614533)
[ 296.531622] dhd_wlfc_init(): successfully enabled bdcv2 tlv signaling, 79
[ 296.538973] dhd_wlfc_init(): wlfc_mode=0x0, ret=-23
[ 296.627662] CFG80211-ERROR) wl_update_wiphybands : error reading txbf_bfe_cap (-23)
[ 296.636775] CFG80211-ERROR) wl_update_wiphybands : error reading txbf_bfr_cap (-23)
[ 296.665060] wl_create_event_handler(): thread:wl_event_handler:51f started
[ 296.665078] CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0xd2a6147c
[ 296.830856] CFG80211-ERROR) wl_event_handler : was terminated
[ 296.836761] wl_destroy_event_handler(): thread:wl_event_handler:51f terminated OK
[ 296.845621] wl_android_wifi_off in
[ 296.853585] dhd_wlfc_deinit():3277, maintain HOST RXRERODER flag in tvl
[ 296.864301] dhd_wlfc_deinit():3291 successfully disabled bdcv2 tlv signaling, 64
[ 296.872750] tootzoe enable wifi regulator and turn=0 wifi REG_ON gpio

this is ADB Logcat information:

01-01 01:15:18.582 224-536/? D/SoftapController: Softap fwReload - Ok
01-01 01:15:19.864 552-592/system_process D/wifi: set interface wlan0 flags (UP)
01-01 01:15:19.865 552-592/system_process I/WifiHAL: Initializing wifi
01-01 01:15:19.865 552-592/system_process I/WifiHAL: Creating socket
01-01 01:15:19.868 552-592/system_process I/WifiHAL: Initialized Wifi HAL Successfully; vendor cmd = 103
01-01 01:15:19.868 552-592/system_process D/wifi: Did set static halHandle = 0x99fe3a00
01-01 01:15:19.868 552-592/system_process D/wifi: halHandle = 0x99fe3a00, mVM = 0xb4d7c000, mCls = 0x100d96
01-01 01:15:19.868 552-592/system_process D/wifi: array field set
01-01 01:15:19.868 552-592/system_process I/WifiNative-HAL: interface[0] = wlan0
01-01 01:15:19.871 552-1312/system_process I/WifiNative-HAL: Waiting for HAL events mWifiHalHandle=-1711392256
01-01 01:15:19.871 552-1312/system_process D/wifi: waitForHalEvents called, vm = 0xb4d7c000, obj = 0x100d96, env = 0x991cff80
01-01 01:15:19.880 552-570/system_process D/Tethering: sendTetherStateChangedBroadcast 1, 0, 0
01-01 01:15:19.927 224-536/? D/SoftapController: SoftAP started successfully
01-01 01:15:19.927 1314-1314/? E/SoftapController: no specific driver vendor
01-01 01:15:19.927 1314-1314/? E/SoftapController: execl failed (No such file or directory)
01-01 01:15:19.927 1314-1314/? E/SoftapController: SoftAP failed to start
01-01 01:15:19.930 552-1313/system_process E/WifiStateMachine: Exception in softap start java.lang.IllegalStateException: command '42 softap startap' failed with '402 42 SoftAP command has failed'
01-01 01:15:19.933 1314-1314/? E/SoftapController: SoftAP is not running
01-01 01:15:19.937 1314-1314/? D/SoftapController: Softap fwReload - Ok
01-01 01:15:19.996 1315-1315/? E/SoftapController: no specific driver vendor
01-01 01:15:19.996 1315-1315/? E/SoftapController: execl failed (No such file or directory)
01-01 01:15:19.996 1315-1315/? E/SoftapController: SoftAP failed to start
01-01 01:15:19.996 1314-1314/? D/SoftapController: SoftAP started successfully
01-01 01:15:20.001 552-1313/system_process E/WifiStateMachine: Exception in softap re-start java.lang.IllegalStateException: command '46 softap startap' failed with '402 46 SoftAP command has failed'
01-01 01:15:20.007 552-552/system_process E/WifiController: WifiControllerSoftAP start failed
01-01 01:15:20.007 552-592/system_process D/wifi: In wifi stop Hal
01-01 01:15:20.007 552-592/system_process D/wifi: halHandle = 0x99fe3a00, mVM = 0xb4d7c000, mCls = 0x100d96
01-01 01:15:20.007 552-1312/system_process E/WifiHAL: wifi_event_loop: Read after POLL returned 4, error no = 0
01-01 01:15:20.007 552-1312/system_process D/WifiHAL: Got a signal to exit!!!
01-01 01:15:20.007 552-1312/system_process I/WifiHAL: Exit wifi_event_loop
01-01 01:15:20.008 552-592/system_process E/WifiHAL: wifi_cleanup: Read after POLL returned 4, error no = 9
01-01 01:15:20.008 552-592/system_process E/WifiHAL: Event processing terminated
01-01 01:15:20.008 552-592/system_process D/wifi: In wifi cleaned up handler
01-01 01:15:20.008 552-592/system_process I/WifiHAL: Internal cleanup completed
01-01 01:15:20.061 552-570/system_process D/Tethering: InitialState.processMessage what=4
01-01 01:15:20.066 552-570/system_process D/Tethering: sendTetherStateChangedBroadcast 0, 0, 0
01-01 01:15:20.079 552-1312/system_process D/wifi: set interface wlan0 flags (DOWN)
01-01 01:15:20.082 552-592/system_process D/WifiNative-HAL: HAL event thread stopped successfully

Could somebody please advise if you know of a solution?

Thanks

toot_hzf

Labels (1)
0 Kudos
1 Solution
2,091 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Zhanfei,

    Give you some advice on your question, see below, please!

(1)Checking firmware.

When you switch status from WIFI mode to AP mode, WIFI driver will be reloaded and firmware will be changed to another,that is a firmware for ap, such as "bcm4335_fw_apsta.bin", maybe your name is different, here just an example, so please check if the firmware is correct when switching to AP mode.

(2)WIFI driver for BCM4339 in linux kernel

The driver in linux kernel should also provided by broadcomm, not written by NXP R&D, In the driver, softap should be supported. About this, you can confirm it with provider's FAE of WIFI module.

(3)p2p service start

you need to check if p2p service can normally start, expecially parameters in command lines, about this, you can ask for help from provider's FAE, he should know if it is correct.

(4)Correcting some errors in your log

like:

01-01 01:15:19.996 1315-1315/? E/SoftapController: no specific driver vendor
01-01 01:15:19.996 1315-1315/? E/SoftapController: execl failed (No such file or directory)
01-01 01:15:19.996 1315-1315/? E/SoftapController: SoftAP failed to start

......

Above errors caused by Vendor, you should set vendor's name in init.r or init.freescale.rc, like following:

setprop  wlan.vendor broadcom

or

open : device/fsl/imx6/sabresd_6dq.mk

modify like this:

---------------------------

PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0 \
wlan.interface=wlan0 \
wlan.vendor=broadcom
-----------------------------------------

Hope above advice can help you!

Best Regards,

Weidong

View solution in original post

0 Kudos
3 Replies
2,092 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Zhanfei,

    Give you some advice on your question, see below, please!

(1)Checking firmware.

When you switch status from WIFI mode to AP mode, WIFI driver will be reloaded and firmware will be changed to another,that is a firmware for ap, such as "bcm4335_fw_apsta.bin", maybe your name is different, here just an example, so please check if the firmware is correct when switching to AP mode.

(2)WIFI driver for BCM4339 in linux kernel

The driver in linux kernel should also provided by broadcomm, not written by NXP R&D, In the driver, softap should be supported. About this, you can confirm it with provider's FAE of WIFI module.

(3)p2p service start

you need to check if p2p service can normally start, expecially parameters in command lines, about this, you can ask for help from provider's FAE, he should know if it is correct.

(4)Correcting some errors in your log

like:

01-01 01:15:19.996 1315-1315/? E/SoftapController: no specific driver vendor
01-01 01:15:19.996 1315-1315/? E/SoftapController: execl failed (No such file or directory)
01-01 01:15:19.996 1315-1315/? E/SoftapController: SoftAP failed to start

......

Above errors caused by Vendor, you should set vendor's name in init.r or init.freescale.rc, like following:

setprop  wlan.vendor broadcom

or

open : device/fsl/imx6/sabresd_6dq.mk

modify like this:

---------------------------

PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0 \
wlan.interface=wlan0 \
wlan.vendor=broadcom
-----------------------------------------

Hope above advice can help you!

Best Regards,

Weidong

0 Kudos
2,091 Views
tootzoe
Contributor III

Hi  Weidong, 

   after i switch the bcmdhd driver back to the one obtained from module supplier , both station and softap mode work well, thank you again for hinting setting the wlan.vendor property in init.rc file . next maybe i need to twist P2P mode.  

Best Regards!

toot_hzf

0 Kudos
2,091 Views
tootzoe
Contributor III

Hi  Weidong, 

thanks for your reply,  following your instructions, i only added "setprop  wlan.vendor broadcom"  in init.rc , and then SoftAp start work, i can turn on it , and modify ssid, password ,  and scan this AP  with my phone, but when enter password try to connect this AP with my phone, 

kernel panic occurred:

[ 308.940288] skbuff: skb_under_panic: text:c06bf0a4 len:86 put:12 head:d2e4b200 data:d2e4b1f4 tail:0xd2e4b24a end:0xd2e4b340 dev:<NULL>
[ 308.952471] ------------[ cut here ]------------
[ 308.957112] Kernel BUG at c0903258 [verbose debug info unavailable]
[ 308.963401] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[ 308.969255] Modules linked in:
[ 308.972362] CPU: 1 PID: 185 Comm: dhd_dpc Not tainted 4.1.15 #173
[ 308.978475] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 308.985024] task: d2963600 ti: d2aa2000 task.ti: d2aa2000
[ 308.990459] PC is at skb_push+0x80/0x88
[ 308.994319] LR is at skb_push+0x80/0x88
[ 308.998178] pc : [<c0903258>] lr : [<c0903258>] psr: 60000013
[ 308.998178] sp : d2aa3c98 ip : 00000000 fp : d2a13800
[ 309.009675] r10: 0000000c r9 : 00000000 r8 : 00000000
[ 309.014920] r7 : d2e4b24a r6 : d2e4b340 r5 : d2e4b200 r4 : d2e4b1f4
[ 309.021466] r3 : 00000000 r2 : 00000000 r1 : c0e216a0 r0 : 0000007a
[ 309.028013] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 309.035341] Control: 10c53c7d Table: 2322404a DAC: 00000015
[ 309.041103]
[ 309.041103] PC: 0xc09031d8:
[ 309.045389] 31d8 e92d40f0 e24dd01c e59040ac e59050a8 e0614004 e5903058 e1540005 e58040ac
[ 309.053789] 31f8 e0833001 e5803058 3a000002 e1a00004 e28dd01c e8bd80f0 e1a0c000 e59070a0
[ 309.062181] 3218 e59cc014 e1a0200e e59060a4 e30befa8 e35c0000 e34ce0ee e3070c64 e88d0022
[ 309.070578] 3238 01a0c00e e58d4008 e58d700c e34c00ef e58dc014 e58d6010 e59f1004 eb0915b2

.........

[ 309.932569] [<c0903258>] (skb_push) from [<c06bf0a4>] (dhdsdio_txpkt.constprop.8+0xe8/0xa34)
[ 309.941047] [<c06bf0a4>] (dhdsdio_txpkt.constprop.8) from [<c06bfb1c>] (dhdsdio_sendfromq+0x12c/0x3c0)
[ 309.950383] [<c06bfb1c>] (dhdsdio_sendfromq) from [<c06c1df4>] (dhdsdio_dpc+0x2e8/0x102c)
[ 309.958599] [<c06c1df4>] (dhdsdio_dpc) from [<c06784a4>] (dhd_dpc_thread+0xe8/0x124)
[ 309.966384] [<c06784a4>] (dhd_dpc_thread) from [<c014e424>] (kthread+0xdc/0xf4)
[ 309.973740] [<c014e424>] (kthread) from [<c01076e8>] (ret_from_fork+0x14/0x2c)
[ 309.980993] Code: e58dc014 e58d6010 e59f1004 eb0915b2 (e7f001f2)
[ 309.987112] ---[ end trace 70a7f97836671b0b ]---
[ 310.027097] Kernel panic - not syncing: Fatal exception
[ 310.032358] CPU0: stopping
[ 310.035105] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 4.1.15 #173
[ 310.042435] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 310.049016] [<c0110104>] (unwind_backtrace) from [<c010b554>] (show_stack+0x10/0x14)
[ 310.056800] [<c010b554>] (show_stack) from [<c0b4ae40>] (dump_stack+0x84/0xc4)
[ 310.064060] [<c0b4ae40>] (dump_stack) from [<c010eeb0>] (handle_IPI+0x33c/0x354)
[ 310.071488] [<c010eeb0>] (handle_IPI) from [<c0101484>] (gic_handle_irq+0x58/0x5c)
[ 310.079076] unwind: Unknown symbol address c0101484
[ 310.083972] unwind: Index not found c0101484
[ 310.088262] CPU2: stopping
[ 310.091005] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G D 4.1.15 #173
[ 310.098334] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 310.104903] [<c0110104>] (unwind_backtrace) from [<c010b554>] (show_stack+0x10/0x14)
[ 310.112681] [<c010b554>] (show_stack) from [<c0b4ae40>] (dump_stack+0x84/0xc4)
[ 310.119937] [<c0b4ae40>] (dump_stack) from [<c010eeb0>] (handle_IPI+0x33c/0x354)
[ 310.127365] [<c010eeb0>] (handle_IPI) from [<c0101484>] (gic_handle_irq+0x58/0x5c)
[ 310.134951] unwind: Unknown symbol address c0101484
[ 310.139846] unwind: Index not found c0101484
[ 310.144138] CPU3: stopping
[ 310.146881] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G D 4.1.15 #173
[ 310.154210] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 310.160780] [<c0110104>] (unwind_backtrace) from [<c010b554>] (show_stack+0x10/0x14)
[ 310.168556] [<c010b554>] (show_stack) from [<c0b4ae40>] (dump_stack+0x84/0xc4)
[ 310.175809] [<c0b4ae40>] (dump_stack) from [<c010eeb0>] (handle_IPI+0x33c/0x354)
[ 310.183236] [<c010eeb0>] (handle_IPI) from [<c0101484>] (gic_handle_irq+0x58/0x5c)
[ 310.190822] unwind: Unknown symbol address c0101484
[ 310.195715] unwind: Index not found c0101484
[ 310.236114] Rebooting in 5 seconds..

i think i need to change the bcmdhd driver back to the one obtained from supplier , and try again.

thanks again your advise.

best regards!

toot_hzf

0 Kudos