Banana Pi R-64 and WiFi

Yes of course you can try the older image. Afair mt7615 was working on r64.

I cannot give a fast and simple answer why it is not working.

My guess is that 5.15.0 contained a bug in pcie. You see that controller is successfully probed but port link is down.

Please mark code/logs as such by using the “<>” button for better readability.

Btw. Current 5.15.y is 5.15.40 :slight_smile:

Thank you very much. But, how can I get the newest Kernel? Or did you have on Image with this kernel?

My kernel repo is at 5.15.33,you can get a compiled image on its releases page

Just download the tar.gz for r64, unpack the content of the folders into the right partition (maybe change name of uImage) and add a line pointing to the new kernel file in the uEnv.txt

…and I can just unpack the data “bpi-r64_5.15.33-main.tar.gz” on the router first?

And where do I find this “uEnv.txt” - file? Is a recompile of the system necessary?

no, uenv.txt is on BPI-BOOT-partition (where the uImage needs to be extracted), if none exist just create one in same folder like the uImage or in the root of this partition

modules go to BPI-ROOT like the folder in the tar-file

Well, I think this is not so easy, or?

Under </boot/bananapi/bpi-r64/linux> if found these files:

<5.15.0-main.itb> <uEnv.txt>

If I understand you right, I should install all files and /or directory: <bpi-r64.itb> <uImage_nodt>

and after them I change the <uEnv.txt> File, or?

from i installed all file to </>, or?

Ah,right,r64 uses itb file, so copy itb from tar to /boot and modules to /

Tar file contains folders BPI-BOOT (content for /boot in running system) and BPI-ROOT (/)

You can also replace existing itb (after a backup) so no change in uEnv.txt is needed

Thanks, so lot… I installed it now and reboot it. Now, the kernel is: <5.15.33-bpi-r64-main>

BUT! with <dmesg | grep -i ‘pci’ > or <dmesg | grep -I ‘mt’> the output is empty! WAN & LAN /LANBR0 is working…

I guess you missed copying the modules to /lib/modules

I guess, that I have done this…

[ 1.564659] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges: [ 1.572607] mtk-pcie 1a143000.pcie: Parsing ranges property… [ 1.583678] mtk-pcie 1a143000.pcie: MEM 0x0020000000…0x0027ffffff -> 0x0020000000 [ 1.695696] mtk-pcie 1a143000.pcie: Port0 link down [ 1.700783] mtk-pcie 1a143000.pcie: PCI host bridge to bus 0000:00 [ 1.706975] pci_bus 0000:00: root bus resource [bus 00-ff] [ 1.712470] pci_bus 0000:00: root bus resource [mem 0x20000000-0x27ffffff] [ 1.719352] pci_bus 0000:00: scanning bus [ 1.724542] pci_bus 0000:00: fixups for bus [ 1.728735] pci_bus 0000:00: bus scan returning with max=00 [ 1.734702] mtk-pcie 1a145000.pcie: host bridge /pcie@1a145000 ranges: [ 1.741278] mtk-pcie 1a145000.pcie: Parsing ranges property… [ 1.747123] mtk-pcie 1a145000.pcie: MEM 0x0028000000…0x002fffffff -> 0x0028000000 [ 1.855455] mtk-pcie 1a145000.pcie: Port1 link down [ 1.860551] mtk-pcie 1a145000.pcie: PCI host bridge to bus 0001:00 [ 1.866746] pci_bus 0001:00: root bus resource [bus 00-ff] [ 1.872240] pci_bus 0001:00: root bus resource [mem 0x28000000-0x2fffffff] [ 1.879122] pci_bus 0001:00: scanning bus [ 1.884284] pci_bus 0001:00: fixups for bus [ 1.888474] pci_bus 0001:00: bus scan returning with max=00

mhm, still link down.

#check kernel version
uname -r
#list loaded modules
lsmod
#show modules directory
ls -l /lib/modules/$(uname -r)

uname -r => 5.15.33-bpi-r64-main

lsmod => Module Size Used by btmtkuart 24576 0 bluetooth 471040 2 btmtkuart cfg80211 270336 0 ecdh_generic 16384 1 bluetooth ecc 24576 1 ecdh_generic rfkill 28672 3 bluetooth,cfg80211 libaes 16384 1 bluetooth pwm_fan 20480 0 ip_tables 28672 0 x_tables 32768 1 ip_tables

ls -l /lib/modules/$(uname -r) => There are all my modules, that I´ve copied it…

ok, some modules are loaded, so that this is not the problem…and you can do

modprobe mt7615e

and should see loading of the mt7622-wmac

but still the pcie port link down…looks like something is broken in 5.15 with pcie, need to find some time to test it with my board

Thank you so much, if I type “modprobe mt7615e”, I see now the “wlan0 - Interface” with “ifconfig -a” -> but, without IP - Adresses. Is there a good way to do that via booting the system?

where should the wlan0-ip came from? you can set a static ip on your host or get an ip-adress from your router after an connection to its bssid

but wlan0 is the mt7622 wmac, not the mt7615 you inserted into your pcie-slot

dmesg | grep -iB5 wlan0

“…but wlan0 is the mt7622 wmac, not the mt7615 you plugged into your pcie slot”.

Now I don’t understand the WHOLE thing at all. I do have 2.4 GHz (onBoard) and the 5 GHz (pcie-slot), right? And if so, which system must report, how?

You should see the 5g card in lspci (no “port link down”)…and 2 wlan interfaces (mt7622-wmac and one for mt7615 card),if dbdc active there should be 3 wlanX interfaces

here my output with kernel i have currently installed on my board:

root@bpi-r64:~# uname -a
Linux bpi-r64 5.17.0-rc4-bpi-r64-r64 #10 SMP PREEMPT Sun Feb 20 19:24:22 CET 2022 aarch64 GNU/Linux
root@bpi-r64:~# lspci
00:00.0 PCI bridge: MEDIATEK Corp. Device 3258
01:00.0 Unclassified device [0002]: MEDIATEK Corp. Device 7615
root@bpi-r64:~# dmesg | grep -i 'pci\|mt76'
[    0.000000] Kernel command line: board=bpi-r64 console=ttyS0,115200n1 earlyprintk root=/dev/mmcblk1p5 rootfstype=ext4 rootwait service=linux debug=7 initcall_debug=0 2
[    0.066803] PCI: CLS 0 bytes, default 64
[    1.346746] rtc_mt7622 10212800.rtc: registered as rtc0
[    1.352025] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01T00:00:00 UTC (946684800)
[    1.610417] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    1.617215] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    1.625316] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
[    1.769967] mtk-pcie 1a143000.pcie: PCI host bridge to bus 0000:00
[    1.776171] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.781666] pci_bus 0000:00: root bus resource [mem 0x20000000-0x27ffffff]
[    1.788548] pci_bus 0000:00: scanning bus
[    1.792611] pci 0000:00:00.0: [14c3:3258] type 01 class 0x060400
[    1.798654] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x1ffffffff 64bit pref]
[    1.807494] pci_bus 0000:00: fixups for bus
[    1.811713] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 0
[    1.818422] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.826506] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 1
[    1.833371] pci_bus 0000:01: scanning bus
[    1.837555] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[    1.843750] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    1.851526] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    1.878538] pci_bus 0000:01: fixups for bus
[    1.882751] pci_bus 0000:01: bus scan returning with max=01
[    1.888332] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.894961] pci_bus 0000:00: bus scan returning with max=01
[    1.900557] pci 0000:00:00.0: BAR 0: no space for [mem size 0x200000000 64bit pref]
[    1.908220] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x200000000 64bit pref]
[    1.916230] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    1.923029] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    1.930430] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.935406] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    1.942703] mtk-pcie 1a145000.pcie: host bridge /pcie@1a145000 ranges:
[    1.949320] mtk-pcie 1a145000.pcie: Parsing ranges property...
[    1.955177] mtk-pcie 1a145000.pcie:      MEM 0x0028000000..0x002fffffff -> 0x0028000000
[    2.169335] mtk-pcie 1a145000.pcie: Port1 link down
[    2.174421] mtk-pcie 1a145000.pcie: PCI host bridge to bus 0001:00
[    2.180613] pci_bus 0001:00: root bus resource [bus 00-ff]
[    2.186108] pci_bus 0001:00: root bus resource [mem 0x28000000-0x2fffffff]
[    2.192990] pci_bus 0001:00: scanning bus
[    2.198198] pci_bus 0001:00: fixups for bus
[    2.202390] pci_bus 0001:00: bus scan returning with max=00
[    6.552232] mt7615e 0000:01:00.0: assign IRQ: got 146
[    6.597695] pci 0000:00:00.0: enabling device (0000 -> 0002)
[    6.685422] pci 0000:00:00.0: enabling bus mastering
[    6.741563] mt7615e 0000:01:00.0: enabling device (0000 -> 0002)
[    6.788484] mt7615e 0000:01:00.0: enabling bus mastering
[    6.836077] mtk-pcie 1a143000.pcie: msi#0 address_hi 0x0 address_lo 0x410c50c0
[    6.883635] mt7615e 0000:01:00.0: Load eeprom: /lib/firmware/mediatek/mt7615e_rf.bin
[    6.912638] mt7615e 0000:01:00.0: Open eeprom file failed: /lib/firmware/mediatek/mt7615e_rf.bin
[    7.208328] mt7622-wmac 18000000.wmac: Load eeprom: /lib/firmware/mediatek/mt7622-wmac_rf.bin
[    7.231200] mt7622-wmac 18000000.wmac: Load eeprom OK, count 1024 byte
[    7.403987] mt7615e 0000:01:00.0 wlp1s0: renamed from wlan0
[    7.405200] mt7622-wmac 18000000.wmac: N9 Firmware Version: _reserved_, Build Time: 20190801210351
root@bpi-r64:~# 

mt7615 card is inserted in the pci-slot near the power-jack, i have not done any hw-modifications (resistor-/capacitor changes)

IF I type in “dmesg … grep -iB5 wlan0” i´ve got the following message:[45062.860650] mt7622-wmac 18000000.wmac: Load eeprom OK, count 1024 byte [45062.870156] ieee80211 phy0: Selected rate control algorithm ‘minstrel_ht’ [45062.912826] mt7622-wmac 18000000.wmac: HW/SW Version: 0x8a108a10, Build Time: 20190801210006a

[45062.967529] mt7622-wmac 18000000.wmac: N9 Firmware Version: reserved, Build Time: 20190801210351 [45072.010072] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

So, what kind of WLAN did I have now? And how can I setup the IP - Adress over which directory?

you see that wlan0 is from mt7622-wmac so the soc-internal wifi, not the pci one.

basicly you can set ip-address this way

ip addr add 192.168.1.1/24 dev wlan0
ip link set wlan0 up

but to have a connection you need to connect to a wifi-network like your router (wpa-supplicant), or create an own accesspoint using hostap

at least for hostap i have examples in my wiki, it is same for r2 and r64, so maybe i have them only in the r2 section

btw. booted the 5.15.0, which should be same as the one you have in the image…and my card is still recognized

root@bpi-r64:~# uname -a
Linux bpi-r64 5.15.0-bpi-r64-main #1 SMP PREEMPT Sat Nov 27 14:56:12 CET 2021 aarch64 GNU/Linux
root@bpi-r64:~# dmesg | grep -i 'pci\|mt76'
[    0.000000] Kernel command line: board=bpi-r64 console=ttyS0,115200n1 earlyprintk root=/dev/mmcblk1p5 rootfstype=ext4 rootwait service=linux debug=7 initcall_debug=0 androidboot.hardware=mt7622 swiotlb=512
[    0.064345] PCI: CLS 0 bytes, default 64
[    1.321756] rtc_mt7622 10212800.rtc: registered as rtc0
[    1.327063] rtc_mt7622 10212800.rtc: setting system clock to 2022-05-17T11:17:40 UTC (1652786260)
[    1.586943] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    1.593612] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    1.603858] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
[    1.636316] mtk-pcie 1a143000.pcie: PCI host bridge to bus 0000:00
[    1.645712] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.645723] pci_bus 0000:00: root bus resource [mem 0x20000000-0x27ffffff]
[    1.662637] pci_bus 0000:00: scanning bus
[    1.662740] pci 0000:00:00.0: [14c3:3258] type 01 class 0x060400
[    1.670295] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x1ffffffff 64bit pref]
[    1.683081] pci_bus 0000:00: fixups for bus
[    1.693508] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 0
[    1.710639] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.718662] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 1
[    1.725492] pci_bus 0000:01: scanning bus
[    1.729690] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[    1.735886] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    1.743668] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    1.768287] pci_bus 0000:01: fixups for bus
[    1.772502] pci_bus 0000:01: bus scan returning with max=01
[    1.778082] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.784711] pci_bus 0000:00: bus scan returning with max=01
[    1.790307] pci 0000:00:00.0: BAR 0: no space for [mem size 0x200000000 64bit pref]
[    1.797974] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x200000000 64bit pref]
[    1.805985] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    1.812783] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    1.820185] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.825202] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    1.832490] mtk-pcie 1a145000.pcie: host bridge /pcie@1a145000 ranges:
[    1.839073] mtk-pcie 1a145000.pcie: Parsing ranges property...
[    1.844919] mtk-pcie 1a145000.pcie:      MEM 0x0028000000..0x002fffffff -> 0x0028000000
[    1.953254] mtk-pcie 1a145000.pcie: Port1 link down
[    1.958320] mtk-pcie 1a145000.pcie: PCI host bridge to bus 0001:00
[    1.964511] pci_bus 0001:00: root bus resource [bus 00-ff]
[    1.970005] pci_bus 0001:00: root bus resource [mem 0x28000000-0x2fffffff]
[    1.976887] pci_bus 0001:00: scanning bus
[    1.982068] pci_bus 0001:00: fixups for bus
[    1.986258] pci_bus 0001:00: bus scan returning with max=00
[    6.815333] mt7615e 0000:01:00.0: assign IRQ: got 146
[    6.820508] pci 0000:00:00.0: enabling device (0000 -> 0002)
[    6.839656] pci 0000:00:00.0: enabling bus mastering
[    6.851118] mt7615e 0000:01:00.0: enabling device (0000 -> 0002)
[    6.883391] mt7615e 0000:01:00.0: enabling bus mastering
[    6.912684] mtk-pcie 1a143000.pcie: msi#0 address_hi 0x0 address_lo 0x40ebd0c0
[    6.950802] mt7615e 0000:01:00.0: Load eeprom: /lib/firmware/mediatek/mt7615e_rf.bin
[    6.950881] mt7615e 0000:01:00.0: Open eeprom file failed: /lib/firmware/mediatek/mt7615e_rf.bin
[    7.079129] mt7622-wmac 18000000.wmac: Load eeprom: /lib/firmware/mediatek/mt7622-wmac_rf.bin
[    7.100361] mt7622-wmac 18000000.wmac: Load eeprom OK, count 1024 byte
[    7.256360] mt7622-wmac 18000000.wmac: N9 Firmware Version: _reserved_, Build Time: 20190801210351
[    7.384705] mt7615e 0000:01:00.0 wlp1s0: renamed from wlan0
root@bpi-r64:~#

but i see i have also a link down…i guess from the other slot:

mtk-pcie 1a145000.pcie: Port1 link down