Wifi AP6398S + mainline kernel

tnx for notify i will check soon what happens !
i have check vim3l today works ok !
plz wait for tomorrow i will check vim3 !

Linux Krescue 5.14.0-rc5 #1 SMP PREEMPT Thu Aug 12 12:34:25 CST 2021 aarch64 GNU/Linux

VIM3 just tested - wifi works ok - cant see any problems!

how can reproduce it ? plz provide more details !!

thank you for testing. I think I may be using an outdated wifi firmware blob ( Mar 6 2017 10:16:06 versi
on 9.87.51.7 (r686312) FWID 01-4dcc75d9). The main problems I see are large and frequent connection gaps and no 5Ghz networks being detected. May you provide all the necessary files to put in /lib/firmware/brcm for the wifi board to work correctly?

this is my linux version:
Linux nightmare 5.14.0-rc5 SMP PREEMPT Tue Aug 10 17:27:52 CEST 2021 aarch64 GNU/Linux

I got my firmware blobs from

and the clm blob from

i have another idea try last krescue which have last kernel which works fine on my side
pls try it and make feed back https://dl.khadas.com/Firmware/Krescue/system/

hello, I tried the latest version of krescue and ssh or internet in general lag just like they do on my custom compiled kernel but at least it sees 5Ghz networks now.
please note that wifi works in both situations, it is just very unstable

The purpose of the CLM blob is to apply further implementation specific radio tuning to the module, and there are comments from Broadcom staff on the linux-wireless mailing list stating that in most generic use-cases using CLM blobs is likely to result in a worse connection not a better one. So you might want to retest without it.

1 Like

finally solved the problemā€¦by buying an usb wireless adapter :)))
I hope to see no broadcom wireless chipset on your next sbc

Hello there!
I want to buy VIM3L, it look very interesting for me and my projects. The cost is quite high for me, so I have to be sure that it will work. If it doesnā€™t make it difficult, can someone test and answer the questions:

  1. Wi-Fi work fine at mainline kernel now? This is important, Iā€™m going to use board as passive ( not the main function of this device) wi-fi router for 2-5 devices.
  2. AP6389S have bluetooth v5.0, does it work? Can search for LE devices? If you have running BlueZ stack, can you run: dbus-send --system --dest=org.bluez --print-reply / org.freedesktop.DBus.ObjectManager.GetManagedObjects

In my little project i want to connect from small devices based on NRF51822-52832 to VIM3L board, so AP6389 must work fine in peripheral mode (advertise on) and i want route internet from LAN to Wi-Fi, so working 802.11n-802.11ac is a big plus.

I do testing for LibreELEC images using WiFi (mainline drivers) connectivity (to a router in the same room) and I use a BT LE remote for scrolling in Kodi which works fine. Iā€™ll caveat that Iā€™m not doing serious or exhaustive testing ā€¦ but I donā€™t see any issues (other than self-inflicted with experimental kernels and such).

Thanks for answer, @chewitt ,seems AP6389 drivers under active development/porting to new kernel versions, itā€™s good news. Yeah, working BT itā€™s good news too, i need a different working mode, when VIM3 will be like BT LE remote, but anyway this is encouraging. Wouldnā€™t it make it difficult for you to print the output of the commands hciconfig hci0 commands, hciconfig hci0 features.
I would be very glad if you did the iperf3 tests for Wi-Fi in N and AC modes, but I do not want to burden you with unnecessary worries.

At the current time I have Orange Pi Zero 2, nice board but driver for BT return wrong features out and BlueZ donā€™t recognize BLE support. I can enable advertise mode with low level tools like hciconfig and hcitool, but i canā€™t get to work BlueZ stack, so i canā€™t configure GATT server. Of course i can try to manually edit BlueZ stack source to force it work, but I donā€™t know how long it will take. So VIM3L with NPU and 802.11ac with dual antenna looks very tasty for me.

It will be a week or more before Iā€™m near a VIM board again (travelling with work) so perhaps one of the Khadas staff can share output.

Any update for this ?

Iā€™m trying porting bcmdhd 101.10.361 branch driver for AP6398S

My board VIM3 run ubuntu mainline 5.18 kernel

Maybe it could be run as well
I change mode to SDR104 for AP6398S

I think throughput will be over 350mbps by Iperf3

You used a highly offensive word which I edited out in the quote. Do not use offensive language,

Do not post content containing offensive language.

Hi, friends!

Wifi is buggy at this time.))

[ 4768.583804] brcmfmac: brcmfmac_module_init No platform data available.
[ 4768.584306] brcmfmac: F1 signature read @0x18000000=0x17294359
[ 4768.584486] brcmfmac: brcmf_chip_recognition found AXI chip: BCM4359/9
[ 4768.586618] brcmfmac: brcmf_chip_cores_check  [1 ] core 0x800:52  base 0x18000000 wrap 0x18100000
[ 4768.586635] brcmfmac: brcmf_chip_cores_check  [2 ] core 0x812:59  base 0x18001000 wrap 0x18101000
[ 4768.586640] brcmfmac: brcmf_chip_cores_check  [3 ] core 0x83e:8   base 0x18002000 wrap 0x18102000
[ 4768.586644] brcmfmac: brcmf_chip_cores_check  [4 ] core 0x83c:21  base 0x18003000 wrap 0x18103000
[ 4768.586648] brcmfmac: brcmf_chip_cores_check  [5 ] core 0x812:59  base 0x18004000 wrap 0x18104000
[ 4768.586652] brcmfmac: brcmf_chip_cores_check  [6 ] core 0x829:22  base 0x18005000 wrap 0x18105000
[ 4768.586656] brcmfmac: brcmf_chip_cores_check  [7 ] core 0x840:5   base 0x1800a000 wrap 0x00000000
[ 4768.586660] brcmfmac: brcmf_chip_cores_check  [8 ] core 0x135:0   base 0x00000000 wrap 0x18109000
[ 4768.586664] brcmfmac: brcmf_chip_cores_check  [9 ] core 0x240:0   base 0x00000000 wrap 0x00000000
[ 4768.587058] brcmfmac: brcmf_chip_ai_resetcore found two d11 cores, reset both
[ 4768.588007] brcmfmac: brcmf_chip_get_raminfo RAM: base=0x160000 size=917504 (0xe0000) sr=0 (0x0)
[ 4768.588086] brcmfmac: brcmf_chip_setup ccrev=52, pmurev=26, pmucaps=0x3a0c3f1a
[ 4768.588092] brcmfmac: brcmf_get_module_param Enter, bus=0, chip=17241, rev=9
[ 4768.588188] brcmfmac: brcmf_sdio_drivestrengthinit No SDIO driver strength init needed for chip BCM4359/9 rev 9 pmurev 26
[ 4768.588401] brcmfmac: brcmf_sdio_probe completed!!
[ 4768.588408] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4359-sdio for chip BCM4359/9
[ 4768.592060] usbcore: registered new interface driver brcmfmac
[ 4768.698409] brcmfmac: brcmf_sdio_verifymemory Compare RAM dl & ul at 0x00160000; size=637347
[ 4768.827912] brcmfmac: brcmf_sdio_verifymemory Compare RAM dl & ul at 0x0023f0c0; size=3904
[ 4768.991750] brcmfmac: brcmf_sdio_firmware_callback enable F2: err=0
[ 4768.991768] brcmfmac: brcmf_sdio_firmware_callback set F2 watermark to 0x40*4 bytes
[ 4768.991897] brcmfmac: brcmf_sdio_sr_init SR enabled
[ 4768.991902] brcmfmac: brcmf_bus_change_state ignoring transition, bus not attached yet
[ 4768.992241] brcmfmac: brcmf_sdio_readshared sdpcm_shared address 0x001BB088
[ 4768.995727] brcmfmac_wcc: brcmf_wcc_attach: executing
[ 4768.995771] brcmfmac: brcmf_add_if allocate netdev interface
[ 4768.998066] brcmfmac: brcmf_sdio_readshared sdpcm_shared address 0x001BB088
[ 4769.011039] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4359/9 wl0: Sep 20 2019 20:22:36 version 9.87.51.11.34 (edb7293@shgit) (r711217) FWID 01-c7feb1ee
[ 4769.020050] brcmfmac: brcmf_c_preinit_dcmds CLM version = API: 15.0 Data: Cypress.Automotive Compiler: 1.28.1 ClmImport: 1.36.3 Customization: v8 171006 Creation: 2018-07-22 23:32:01 
[ 4769.029076] brcmfmac: brcmf_feat_firmware_capabilities [ ap sta toe wme 802.11d 802.11h rm cqa ccx cac dualband ampdu ampdu_tx ampdu_rx amsdurx amsdutx tdls radio_pwrsave p2p mchan wds p2po vht-prop-rates dfrts txpwrcache stbc-tx stbc-rx-1ss pspretend rsdb mfp wnm bsstrans ndoe mimo_ps epno pfnx scanmac pf2 pf6 ]
[ 4769.029088] brcmfmac: brcmf_feat_firmware_capabilities enabling feature: MCHAN
[ 4769.029092] brcmfmac: brcmf_feat_firmware_capabilities enabling feature: P2P
[ 4769.029109] brcmfmac: brcmf_feat_firmware_capabilities enabling feature: DOT11H
[ 4769.030001] brcmfmac: brcmf_feat_iovar_data_set enabling feature: GSCAN
[ 4769.030993] brcmfmac: brcmf_feat_iovar_int_get enabling feature: PNO
[ 4769.032008] brcmfmac: brcmf_feat_iovar_int_get enabling feature: RSDB
[ 4769.033013] brcmfmac: brcmf_feat_iovar_int_get enabling feature: TDLS
[ 4769.034004] brcmfmac: brcmf_feat_iovar_int_get enabling feature: MFP
[ 4769.036984] brcmfmac: brcmf_feat_iovar_int_get enabling feature: FWSUP
[ 4769.037008] brcmfmac: brcmf_fws_attach FWS queueing will be avoided
[ 4769.038995] brcmfmac: brcmf_cfg80211_attach Registering custom regulatory
[ 4769.044025] brcmfmac: brcmf_setup_wiphybands nmode=1, vhtmode=1, bw_cap=(1, 7)
[ 4769.045050] brcmfmac: brcmf_setup_wiphybands nchain=1
[ 4769.084095] brcmfmac: check_vif_up device is not ready : status (0)
[ 4769.084247] brcmfmac: brcmf_net_attach wlan0: Broadcom Dongle Host Driver
[ 4769.085124] brcmfmac: check_vif_up device is not ready : status (0)
[ 4769.090730] brcmfmac: check_vif_up device is not ready : status (0)
[ 4769.090747] brcmfmac: brcmf_cfg80211_set_power_mgmt Device is not ready, storing the value in cfg_info struct
[ 4776.049952] brcmfmac: brcmf_config_dongle power save set to disabled
[ 4776.050986] brcmfmac: brcmf_dongle_roam Internal Roaming = On
[ 4776.052952] ieee80211 phy3: brcmf_dongle_roam: WLC_SET_ROAM_TRIGGER error (-52)
[ 4776.056950] brcmfmac: brcmf_cfg80211_change_iface IF Type = Infra
[ 4776.061088] brcmfmac: brcmf_cfg80211_set_power_mgmt power save disabled
[ 5031.779126] brcmfmac: brcmf_cfg80211_change_iface IF Type = AP
[ 5031.829133] brcmfmac: brcmf_set_mpc MPC : 0
[ 5031.935202] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 5032.092158] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5032.092272] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5032.342056] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5032.592162] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5032.592233] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5033.092135] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5033.592123] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5034.092241] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5034.342255] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5034.342389] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5034.592139] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5034.592409] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5034.592607] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5035.092282] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5035.592674] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5036.842704] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5093.957856] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5093.957953] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5520.325413] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 5520.325501] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 6004.095980] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 6004.096062] brcmfmac: brcmf_netdev_start_xmit wlan0: insufficient headroom (0)
[ 6452.907384] brcmfmac: brcmf_p2p_notify_action_frame_rx ifp->vif->mgmt_rx_reg 2810

Arch Linux, Kernel 6.2.6.

There is newer firmware from Cypress, but the wlan0 interface doesn`t start at all, due to:

brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

Iā€™ve seen several instances where newer firmware matched with old nvram settings cause issues with Broadcom SDIO chips. Itā€™s possible that features in the firmware have changed and the nvram config (which is board/implementation specific; a fact ignored by most distros) needs adjusting. Or something changed in the kernel and you need to bisect and find the problem commit.

cypress-firmware-v4.14.77-2020_0115
dmesg:

[ 7726.888029] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4359-sdio for chip BCM4359/9
[ 7726.891914] usbcore: registered new interface driver brcmfmac
[ 7730.107695] brcmfmac: brcmf_sdio_readshared: invalid sdpcm_shared address 0xFC3003CF
[ 7730.109807] brcmfmac: brcmf_sdio_readshared: unable to obtain sdpcm_shared info: rv=-22 (addr=0xfc3003cf)

And this is a very interesting topic :wink:
https://lore.kernel.org/linux-wireless/CAFBinCA+JOxCGzML-Mohryawrn6Vghd8Ns22=2ZfvWov43aeEg@mail.gmail.com/T/#me2e89c0f9a430fe639d0208822bb217fb5fbf750

Maybe the problem will finally be solved?! :slight_smile:

In that thread Marc is reporting a performance regression; which doesnā€™t really exist, heā€™s just new to the upstream kernel codebase and is misunderstanding the mmc drivers vs. vendor kernel (this is evident in other messages and some direct conversations Iā€™ve had with him personally). His box randomly happens to use BCM4359 but otherwise there is no connection between your ā€œfirmware doesnā€™t loadā€ report and his ā€œeverything works itā€™s just not as fast as the vendor kernelā€ thread. So IMHO itā€™s not going to solve your problem.