Banana Pi BPI-R4 BPI-BE14 Wi-Fi7 NIC module

I played around with today’s snapshot which includes the patches and latest firmware and found the following:

Applying the two patches from the ongoing ath12k support (Add ath12k - WCN7850 - opensource driver/firmware support by januszdziedzic · Pull Request #15945 · openwrt/openwrt · GitHub) and manually openwrt’s scripts to generate the hostapd.conf with a hammer I finally have it…

root@OpenWrt:~# iw dev phy1-sta0 station dump
Station 9e:ad:b7:2b:4f:3d (on phy1-sta0)
        inactive time:  4230 ms
        rx bytes:       18875197
        rx packets:     23817
        tx bytes:       29013546
        tx packets:     25615
        tx retries:     804
        tx failed:      804
        beacon loss:    0
        beacon rx:      1074
        rx drop misc:   0
        signal:         -45 [-49, -50, -48] dBm
        signal avg:     -44 [-48, -50, -47] dBm
        beacon signal avg:      -44 dBm
        tx bitrate:     3843.1 MBit/s 320MHz EHT-MCS 9 EHT-NSS 2 EHT-GI 0
        tx duration:    8214725 us
        rx bitrate:     2594.0 MBit/s 320MHz EHT-MCS 4 EHT-NSS 3 EHT-GI 0
        rx duration:    2195435 us
        last ack signal:-46 dBm
        avg ack signal: -45 dBm
        airtime weight: 256
        authorized:     yes
        authenticated:  yes
        associated:     yes
        preamble:       long
        WMM/WME:        yes
        MFP:            yes
        TDLS peer:      no
        DTIM period:    2
        beacon interval:100
        short slot time:yes
        connected time: 115 seconds
        associated at [boottime]:       45.388s
        associated at:  1724350689782 ms
        current time:   1724350801451 ms```

3 spatial streams, using ETH over 320MHz (sadly over the current distance only MCS below the new QAM4096, this log is from the client but server is of course the same, both BPi R4).

root@OpenWrt:~# iperf3 -c 192.168.1.1 -t 3600
Connecting to host 192.168.1.1, port 5201
[  5] local 192.168.1.232 port 36568 connected to 192.168.1.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  3.25 MBytes  27.2 Mbits/sec    0    165 KBytes
[  5]   1.00-2.00   sec  3.12 MBytes  26.2 Mbits/sec    0    198 KBytes
[  5]   2.00-3.00   sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]   3.00-4.00   sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]   4.00-5.00   sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]   5.00-6.00   sec  2.88 MBytes  24.1 Mbits/sec    0    198 KBytes
[  5]   6.00-7.00   sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]   7.00-8.00   sec  2.75 MBytes  23.1 Mbits/sec    0    198 KBytes
[  5]   8.00-9.00   sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]   9.00-10.00  sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]  10.00-11.00  sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]  11.00-12.00  sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]  12.00-13.00  sec  2.88 MBytes  24.1 Mbits/sec    0    198 KBytes
[  5]  13.00-14.00  sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]  14.00-15.00  sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]  15.00-16.00  sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]  16.00-17.00  sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]  17.00-18.00  sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]  18.00-19.00  sec  3.00 MBytes  25.2 Mbits/sec    0    198 KBytes
[  5]  19.00-20.00  sec  2.88 MBytes  24.1 Mbits/sec    0    198 KBytes

I think there is something wrong here, as adding a monitor mode interface reveals I am still sending in 802.11a (OFDM) instead. Using a Intel B200 as client gives me 400Mbps in one direction (Intel sending) but still, fairly terrible.

On the plus side, in HE mode (WiFi 6e) I can confirm its doing well so maybe its the things I did to openwrt to enable BE/EHT support

- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]  85.00-86.00  sec  75.8 MBytes   635 Mbits/sec
[  7]  85.00-86.00  sec  77.6 MBytes   651 Mbits/sec
[  9]  85.00-86.00  sec  65.9 MBytes   553 Mbits/sec
[ 11]  85.00-86.00  sec  61.2 MBytes   514 Mbits/sec
[SUM]  85.00-86.00  sec   280 MBytes  2.35 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -

As you can see, iperf3 now manages about 2.35Gbps using 4 processes (number of cpus) and TCP.

Can anyone tell me if this makes sense (added a perfectly fine hostapd.conf from openwrt, well the channel was replaced) as per https://www.spinics.net/lists/hostap/msg12298.html:

ieee80211be=1
channel=37
op_class=137
he_oper_centr_freq_seg0_idx=31
eht_oper_centr_freq_seg0_idx=47

updated firmware seems not supporting the 2-3-3 variant yet as i get a trace when i try to load it

[   16.285424] mt7996e 0000:01:00.0: WM Firmware Version: ____000000, Build Time: 20240809121753
[   16.330776] mt7996e 0000:01:00.0: DSP Firmware Version: ____000000, Build Time: 20240809121650
[   16.374227] mt7996e 0000:01:00.0: WA Firmware Version: ____000000, Build Time: 20240809121718
[   16.758458] mt7996e 0000:01:00.0: eeprom load fail, use default bin
[   16.766004] mt7996e 0000:01:00.0: registering led 'mt76-phy0'
[   16.772394] ------------[ cut here ]------------
[   16.777019] WARNING: CPU: 2 PID: 2939 at net/wireless/core.c:668 wiphy_register+0x3b0/0x8d4 [cfg80211]
[   16.786365] Modules linked in: mt7996e(+) mt76_connac_lib mt76 mac80211 libarc4 cfg80211 fuse ip_tables x_tables
[   16.796545] CPU: 2 PID: 2939 Comm: systemd-udevd Not tainted 6.10.0-bpi-r4-mt76_eht #1
[   16.804451] Hardware name: Banana Pi BPI-R4 (DT)
[   16.809057] pstate: 40400005 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   16.816007] pc : wiphy_register+0x3b0/0x8d4 [cfg80211]
[   16.821166] lr : ieee80211_register_hw+0x708/0xc30 [mac80211]
[   16.826936] sp : ffffffc084d335f0
[   16.830239] x29: ffffffc084d33640 x28: 0000000000000001 x27: 0000000000000000
[   16.837367] x26: 000000000000000e x25: 000000000000000c x24: 0000000000000005
[   16.844493] x23: ffffffc079a1ba60 x22: ffffffc0799f8448 x21: 0000000000000001
[   16.851618] x20: ffffff80123c0000 x19: ffffff80123c03c0 x18: ffffffffffffffff
[   16.858743] x17: 00000000a53707a1 x16: 000000005037c37e x15: 0000000000000000
[   16.865868] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000002
[   16.872993] x11: 7f7f7f7f7f7f7f7f x10: 0000000000000064 x9 : 0000000000000000
[   16.880119] x8 : 0000000000000013 x7 : 0000000000000000 x6 : 0000000000000001
[   16.887244] x5 : ffffffc079afe4c8 x4 : ffffffc079afe4f8 x3 : 0000000000000000
[   16.894368] x2 : ffffffc079afe4f0 x1 : 0000000000000002 x0 : ffffffc079afe4b0
[   16.901495] Call trace:
[   16.903931]  wiphy_register+0x3b0/0x8d4 [cfg80211]
[   16.908743]  ieee80211_register_hw+0x708/0xc30 [mac80211]
[   16.914161]  mt76_register_device+0x164/0x2d4 [mt76]
[   16.919120]  mt7996_register_device+0x614/0x6f8 [mt7996e]
[   16.924527]  mt7996_pci_probe+0x33c/0x5d4 [mt7996e]
[   16.929406]  pci_device_probe+0x9c/0x140
[   16.933325]  really_probe+0xc0/0x390
[   16.936891]  __driver_probe_device+0x7c/0x15c
[   16.941238]  driver_probe_device+0x3c/0x110
[   16.945410]  __driver_attach+0xf0/0x1f8
[   16.949235]  bus_for_each_dev+0x78/0xd8
[   16.953064]  driver_attach+0x24/0x30
[   16.956629]  bus_add_driver+0x110/0x234
[   16.960456]  driver_register+0x5c/0x124
[   16.964282]  __pci_register_driver+0x4c/0x58
[   16.968542]  mt7996_init+0x70/0x1000 [mt7996e]
[   16.972988]  do_one_initcall+0x44/0x260
[   16.976816]  do_init_module+0x60/0x21c
[   16.980559]  load_module+0x1f3c/0x206c
[   16.984300]  init_module_from_file+0x88/0xcc
[   16.988559]  __arm64_sys_finit_module+0x1a0/0x388
[   16.993252]  invoke_syscall+0x48/0x114
[   16.996994]  el0_svc_common.constprop.0+0xc0/0xe0
[   17.001689]  do_el0_svc+0x1c/0x28
[   17.004997]  el0_svc+0x34/0xd8
[   17.008046]  el0t_64_sync_handler+0x120/0x12c
[   17.012391]  el0t_64_sync+0x194/0x198
[   17.016043] ---[ end trace 0000000000000000 ]---
[   17.055646] mt7996e 0000:01:00.0: probe with driver mt7996e failed with error -22
[   17.063145] mt7996e 0000:01:00.0: vgaarb: pci_notify

added EHT-patches and reverted the 233 firmware file selection

root@bpi-r4-v11:~ 
# uname -a
Linux bpi-r4-v11 6.10.0-bpi-r4-mt76_eht #1 SMP Fri Aug 23 11:42:49 CEST 2024 aarch64 GNU/Linux

From what I can tell OpenWRT mt76/firmware at master · openwrt/mt76 · GitHub does not contain the 2-3-3 firmware we are currently using in Debian, so I assume the firmware is fine, the driver side is the issue. I do get the same crash when I load the 2-3-3 firmware with the 12 patches applied (and your patch for the eeprom selection still in place)

EDIT: maybe we are lacking patches? I am terrible at reading stack dumps but could it be something like [RESEND] wifi: mt76: mt7996: fix NULL pointer dereference in mt7996_mcu_sta_bfer_he - Patchwork

Oh,have not tested this yet,need to do that

WARN_ON (no null pointer deref) happens in wiphy_register while probe,i guess some field required there is not filled correctly.

and i can confirm it happens too when loading the 233 firmware

tested 6.11-rc5…233 firmware works, new firmware has same issue as old one (only 2 wifi-interfaces and message timeouts), warning also happens there with EHT patches

I just got my wifi 7 nic card, got it installed, moved the switch, wifi card lights up installed openwrt, installed Luci, but the wifi interface doesnt show up at all, what am I doing wrong??

Openwrt does not have yet support for be14 because we have only a test firmware

You find both patches here

In openwrt you have to patch mt76 package instead of kernel version. Then put firmware files to right folder (/lib/firmware/mediatek/mt7996/)

Right now OpenWrt (at least snapshot but since @mangus17 mentioned that he had to install Luci I assume that is what he is using) has the patches in their mt76 and firmware (already included by default) such that the card at least shows up but of course there is no WiFi 7 (i.e., 802.11be support in hostapd or Luci). At least it worked as WiFi 6E card last used the snapshot (6 days ago, see above).

@Mangus17 if you install pciutils and run lspci, does the card show up for you?

In my tests (6.11-rc5) the (updated) mainline firmware did not support be14…maybe openwrt did some workaround? Testing firmware i use for be14 cannot be added to official openwrt master tree (license unclear)

For all OpenWRT users: Here is a first “working” build that can be adapted by you => [Banana BPI-R4] Wifi7 status - #82 by danpawlik - For Developers - OpenWrt Forum

Did this with my steup and got a working 2-3-3 WiFi6 solution. As already mentioned, no WiFi7 support in OpenWRT right now due to missing commits in hostapd (https://w1.fi/cgit/hostap/plain/hostapd/ChangeLog).

1 Like

I reinstalled to the new image and wifi 2.4 and 5 work but 6 does not

As per ^@Mangus17 I was able to install the new image but WiFi6 not working.

Thank you for all your efforts and help to the community.

@Mangus17 & @Brutus_NZ I had to modify 1 file to get all 3 bands working. The changes where very basic/easy. Head over here to find a template that you could compare with your config file to make the required changes: [Banana BPI-R4] Wifi7 status - #66 by nextgen-networks - For Developers - OpenWrt Forum

I think if someone do after upgrade to my image:

rm /etc/config/wireless
wifi config

wifi 6GHz should work, but can not test it (out of home).

1 Like

Work fine, thanks. 2.4, 5, 6 is ok, but wifi 6 has less channels compared to the old firmware where there is support for wifi nic be 14000

I attempted Danpawlik solution and all it did was reset the 2.4 and 5ghz antennas, wifi 6 is still down

I put in the options band ‘6g’ and it says it saves i can immediately go back into it and it shows it correctly but if i go to enable on luci, it does work and i can go back into wireless config and the option band is gone, also my desktop which is connected with cat6 cable is pretty slow, only about 500mbps, wifi 5 kind of slow too, on a gigabit fiber network, Ive also noticed that my plex server is really slow now too, and accessing it not directly through an ip address its either really slow or nonresponsive

regarding cat6: might be the auto negotiation issue. disable it and check if it fixes it.

@nextgen-networks & @danpawlik. I tried both methods advised but unfortunately Wifi6 did not enable.

I am using the SD image as supplied by @danpawlik dated 2024-08-27 from Github.

On first boot all interfaces in Luci interface are disabled (as expected) and the wireless file is as below. Note: Wifi 6 option band is shown -

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
	option band '2g'
	option channel '1'
	option htmode 'HE20'
	option disabled '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+1'
	option band '5g'
	option channel '36'
	option htmode 'HE80'
	option disabled '1'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

config wifi-device 'radio2'
	option type 'mac80211'
	option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+2'
	option band '6g'
	option channel 'auto'
	option htmode 'HE80'
	option disabled '1'

config wifi-iface 'default_radio2'
	option device 'radio2'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'type or paste code here

Enabling each Wifi in the Luci interface, successfully enables Wifi 2g & 5g but not Wifi6 (even after Reboot)

The changes to the wireless file happens if the country code or any other setting (in any interface) are changed (after Saving the Settings). The changes are shown below. Note: option band ‘6g’ & option channel ‘auto’ are missing.

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
	option band '2g'
	option channel '1'
	option htmode 'HE20'
	option country 'NZ'
	option cell_density '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+1'
	option band '5g'
	option channel '36'
	option htmode 'HE80'
	option country 'NZ'
	option cell_density '0'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

config wifi-device 'radio2'
	option type 'mac80211'
	option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+2'
	option htmode 'HE80'
	option country 'NZ'
	option cell_density '0'

config wifi-iface 'default_radio2'
	option device 'radio2'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

Manually editing and saving the wireless file with the missing options does not enable WiFi 6 (even after Reboot)

Checking the System Logs shows the following -

Mon Aug 26 09:27:10 2024 daemon.notice hostapd: Restart interface for phy phy2
Mon Aug 26 09:27:10 2024 daemon.notice hostapd: Configuration file: data: driver=nl80211 logger_syslog=127 logger_syslog_level=2 logger_stdout=127 logger_stdout_level=2 country_code=NZ ieee80211d=1 ieee80211h=1 hw_mode=a beacon_int=100 tx_queue_data2_burst=2.0 #num_global_macaddr=1 ieee80211n=1 ht_coex=0 ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935] op_class=133 ieee80211ac=1 vht_oper_chwidth=1 vht_oper_centr_freq_seg0_idx=6 vht_capab=[MAX-A-MPDU-LEN-EXP0] ieee80211ax=1 he_oper_chwidth=1 he_oper_centr_freq_seg0_idx=6 he_su_beamformer=1 he_su_beamformee=1 he_mu_beamformer=1 he_bss_color=128 he_spr_sr_control=3 he_default_pe_duration=4 he_rts_threshold=1023 he_mu_edca_qos_info_param_count=0 he_mu_edca_qos_info_q_ack=0 he_mu_edca_qos_info_queue_request=0 he_mu_edca_qos_info_txop_request=0 he_mu_edca_ac_be_aifsn=8 he_mu_edca_ac_be_aci=0 he_mu_edca_ac_be_ecwmin=9 he_mu_edca_ac_be_ecwmax=10 he_mu_edca_ac_be_timer=255 he_mu_edca_ac_bk_aifsn=15 he_mu_edca_ac_bk_aci=1 he_mu_edca_ac_bk_ecwmin=9 he_mu_edca_ac_bk_ecwmax=10 he
Mon Aug 26 09:27:10 2024 daemon.err hostapd: Pre-RSNA security methods are not allowed in 6 GHz
Mon Aug 26 09:27:10 2024 daemon.err hostapd: 1 errors found in configuration file '<inline>'
Mon Aug 26 09:27:10 2024 daemon.err hostapd: Failed to set up interface with data: driver=nl80211 logger_syslog=127 logger_syslog_level=2 logger_stdout=127 logger_stdout_level=2 country_code=NZ ieee80211d=1 ieee80211h=1 hw_mode=a beacon_int=100 tx_queue_data2_burst=2.0 #num_global_macaddr=1 ieee80211n=1 ht_coex=0 ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935] op_class=133 ieee80211ac=1 vht_oper_chwidth=1 vht_oper_centr_freq_seg0_idx=6 vht_capab=[MAX-A-MPDU-LEN-EXP0] ieee80211ax=1 he_oper_chwidth=1 he_oper_centr_freq_seg0_idx=6 he_su_beamformer=1 he_su_beamformee=1 he_mu_beamformer=1 he_bss_color=128 he_spr_sr_control=3 he_default_pe_duration=4 he_rts_threshold=1023 he_mu_edca_qos_info_param_count=0 he_mu_edca_qos_info_q_ack=0 he_mu_edca_qos_info_queue_request=0 he_mu_edca_qos_info_txop_request=0 he_mu_edca_ac_be_aifsn=8 he_mu_edca_ac_be_aci=0 he_mu_edca_ac_be_ecwmin=9 he_mu_edca_ac_be_ecwmax=10 he_mu_edca_ac_be_timer=255 he_mu_edca_ac_bk_aifsn=15 he_mu_edca_ac_bk_aci=1 he_mu_edca_ac_bk_ecwmin=9 he_mu_edca_ac_bk_
Mon Aug 26 09:27:10 2024 daemon.notice hostapd: hostapd.add_iface failed for phy phy2 ifname=phy2-ap0

I hope this information is useful.

wifi 6G is not working for my BE14 card with BPI-R4 OS is openwrt, with mt76 patch, with testing firmware (firmware: mt76: add testing firmware for mt7996 2-3-3 variant · frank-w/BPI-Router-Linux@67a12d7 · GitHub)

That image includes that.

@Brutus_NZ so the device is available, but you have an error in the configuration:

Mon Aug 26 09:27:10 2024 daemon.err hostapd: 1 errors found in configuration file '<inline>'

Try to add option band '6g' and change the country to DE as it is in the example. For example, this settings should be fine (it was working on my mt7925):

config wifi-device 'radio2'
        option type 'mac80211'
        option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+2'
        option band '6g'  ### THAT IS MISSING IN YOUR CONFIG
        option channel '53'
        option htmode 'HE80'
        option txpower '20'
        option country 'PL'
        option cell_density '0'

I did not try the image yet, due I’m out of home, but other users are using it and it works.