Wifi AP6398S + mainline kernel

plz confirm wifi AP6398S + mainline kernel workable or not ?

which wifi module used ? brcmfmac ?

lsmod | grep brcm
brcmfmac              294912  0
brcmutil               20480  1 brcmfmac
cfg80211              335872  1 brcmfmac

grep "" /sys/class/mmc_host/mmc2/mmc2:0001/mmc2\:0001\:?/uevent
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:1/uevent:OF_NAME=wifi
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:1/uevent:OF_FULLNAME=/soc/apb@d0000000/mmc@70000/wifi@1
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:1/uevent:OF_COMPATIBLE_0=brcm,bcm4329-fmac
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:1/uevent:OF_COMPATIBLE_N=1
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:1/uevent:SDIO_CLASS=00
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:1/uevent:SDIO_ID=02D0:4359
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:1/uevent:MODALIAS=sdio:c00v02D0d4359
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/uevent:SDIO_CLASS=00
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/uevent:SDIO_ID=02D0:4359
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/uevent:MODALIAS=sdio:c00v02D0d4359
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:3/uevent:SDIO_CLASS=02
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:3/uevent:SDIO_ID=02D0:4359
/sys/class/mmc_host/mmc2/mmc2:0001/mmc2:0001:3/uevent:MODALIAS=sdio:c02v02D0d4359

iw dev 

which firmwares need ?

BCM4359 is not supported in the mainline kernel using brcmfmac; there is driver support for the PCIe version of the chip but not SDIO and it’s not as simple as adding the chip IDs to the SDIO code. It’s possible to patch the out-of-tree Broadcom “dhd” driver into the kernel tree but some people have reported it to behave badly. I’ve approached the linux-wireless mailing list for help and was given a patch to get some debug output, but since Linux 5.2 i’ve not been able to patch the device IDs into the kernel without triggering a complete boot failure, and I haven’t had the free time to go back to 5.1 to make the tests. That’s probably not the answer(s) you wanted to hear, but that’s current status.

NB: The Google device that’s bankrolling most of the current G12 mainline support also has the same chip and when Google enquired … Broadcom ignored them too - so it’s not a case of Khadas not having the weight to get a solution (although I question why people keep spec’ing chips with zero/shitty driver support… but that’s another debate).

i have check 5.3.0-rc4 source code
and after i have made some changes add definition for this chip

#define BRCM_CC_4359_CHIP_ID		0x4359
...
master@peace:/tmp/linux-5.3-rc4/drivers/net/wireless/broadcom/brcm80211/brcmfmac$ 
grep 4359 *.c
bcmsdh.c:	BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4359),
brcmfmac.mod.c:MODULE_ALIAS("sdio:c*v02D0d4359*");
chip.c:	case BRCM_CC_4359_CHIP_ID:
pcie.c:BRCMF_FW_DEF(4359, "brcmfmac4359-pcie");
pcie.c:	BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359),
pcie.c:	BRCMF_PCIE_DEVICE(BRCM_PCIE_4359_DEVICE_ID),
sdio.c:BRCMF_FW_DEF(4359, "brcmfmac4359-sdio");
sdio.c:	BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359),

rename firmwares from legacy kernel
and start
yes chip recognized ! but have some fw problem i will try to solve it )

root@Krescue:/# modprobe brcmfmac
root@Krescue:/# [   70.238508] brcmfmac: F1 signature read @0x18000000=0x17294359
[   70.256058] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4359-sdio for chip BCM4359/9
[   70.377836] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac4359-sdio.khadas,vim2.txt failed with error -2
[   70.570396] brcmfmac: brcmf_sdiod_ramrw: membytes transfer failed
[   70.593317] brcmfmac: brcmf_sdio_verifymemory: error -84 on reading 2048 membytes at 0x0025f1f0
[   70.617442] brcmfmac: brcmf_sdio_download_firmware: dongle nvram file download failed

if some body have any ideas wellcome ))

yes ! i think its big mistake to use brcm chips - ))) why people again and again try to use this crap ??? i hope khadas for next time chose another normal chip with good support from opensource

1 Like

It’s possible to patch the out-of-tree Broadcom “dhd” driver into the kernel tree

do u have some link for this patch ?

If these are the changes that you made? https://github.com/chewitt/linux/commit/ef32f1fa81b7a20fabc4220d55ae1074b6c890b8 please add https://github.com/chewitt/linux/commit/afdc9eff6f0e9bb7a7cfdadd201f5b5facc88324 and insmode again. It won’t make the driver work, but that’s the additional output that I need to send back to the linux-wireless mailing list.

https://gitlab.com/baylibre/amlogic/atv/linux/commits/narmstrong/v5.1/aml/integ-5.1-bcmdhd has the dhd driver sources (last few commits). I’m not sure if that branch is Android or Linux oriented so you might need to massage the commits a little to make them fit 5.3.

tnx for links !

If these are the changes that you made? https://github.com/chewitt/linux/commit/ef32f1fa81b7a20fabc4220d55ae1074b6c890b8 please add https://github.com/chewitt/linux/commit/afdc9eff6f0e9bb7a7cfdadd201f5b5facc88324 and insmode again.

i do same before )))) and have same result ))))))

about another links

https://gitlab.com/baylibre/amlogic/atv/linux/commits/narmstrong/v5.1/aml/integ-5.1-bcmdhd has the dhd driver sources (last few commits). I’m not sure if that branch is Android or Linux oriented so you might need to massage the commits a little to make them fit 5.3.

ok! just add one lost definition and bcmdhd builded ) TNX

master@peace:/tmp/linux-5.3-rc4/drivers/net/wireless/bcmdhd$ grep get_ds wl_iw.c 
#define get_ds()	(KERNEL_DS)
	set_fs(get_ds());

and have have this result

I can’t really comment on dhd as I don’t use it (our distro refuses to add it). If you can help with running the test (with the extra commit to add debug info) and share the output that would be appreciated. It’s the first step towards getting one of the Broadcom maintainers to take an interest in getting BCM4359 supported upstream.

failed ;(

Hi
This bcmdhd.1.579.77.41.x wifi driver can’t help for AP6398S support for mainline?
https://mega.nz/#!lF12xQYS!u3ajDN2tPnYrCzs1i4qhliUKl3UQP4pPN0C300grb3g

@hyphop, @balbes150 Can test if this wifi driver works?
It was confirmed compiling fine on kernel 5.3.0-rc5.

Can you advice me on how to add this to the package? So I can try and compile the kernel along with this and give it a try.

yes its possible to build ! but still not work!)

i try to solve this problem but some need time !

Please share your experience and also logs if you can get it.
I will pass it on to Rockchip and Ampak, maybe they can help to solve the remaining problems.

Broadcom/Ampak already ignored requests from Google re. mainline support so I wouldn’t raise your hopes on getting a response :frowning:

Hi Khadas team,

I found these links whilst evaluating whether to purchase the VIM3, as working wifi is critical to my situation:

And

Is there anyway this can be tested to determine whether it is a viable workaround whilst mainline support is missing?

For testing devices that frequently don’t have working WiFi from the comfort of my sofa (without using a 15m Ethernet cable) I acquired a used Apple Airport Express from eBay ($15). it’s configured in bridge mode so that any device I plug in via Ethernet has reliable WiFi with no dependencies on drivers, kernel versions, etc. … just a suggestion.

Apple Airport Express - need power from adapter (or its same by usb cable connected to same device )? + and price about 50USD and up, i think any usb wifi dongle with true supported chip its easy and price only 5 USD

PS: i have use orange-pi devices its just 10USD for same bridge usage , but he provide usb-ethernet <=BRIDGE=> wifi , and use only one usb cable and same no need special drivers )

@chewitt I sense some irony :slight_smile: :

.
It appears VIM3 is shipping without working WiFi on many Linux distributions, even though its datasheet advertises Wifi AC as a feature.
.
There is nothing wrong with wanting / needing it to work for a specific use case, is there?
.
If there is an issue with my suggestion to use a patch that appears to have worked in making wifi useable on another board using the same chip, please let me know. It it is not applicable, I’d be interested in understanding why :slight_smile:
.

u can use on-board WIFI with legacy kernel from khadas amlogic, its work !

but mainline kernel still not have support for this wifi chip!

1 Like

It uses mains power (240v) and the last one I bought (used) was $13 inc. postage. If you want to support cheap Realtek USB devices with shit out-of-tree drivers, be my guest. I don’t :slight_smile: