nanopi-r5
nanopi-r5 copied to clipboard
wlan0 not being recognized
wlan0 not being recognized. "ip -a" returns only lo, wan0 and lan0.
Same issue here, but I resolved with:
sudo apt install iwd
sudo systemctl enable iwd --now
sudo iwctl device list
sudo iwctl station wlp1s0 show
Oddly, I often have intermittency with this command showing the card, and sometimes not!
sudo lspci | grep 'Wireless'
Same issue here.
@tacomilkshake, have you got the optional M.2 Key E 2230 Wireless and Bluetooth Combo Module ? or do you use a USB wifi dongle ?
With the optional M.2 Wifi/Bluetooth module, your trick doesn't work for me.
It seems that the Wifi module is not powered on, so the command lspci doesn't see it. I think that the solution would be in the device tree (rk3568-nanopi5.dts) but I didn't manage to activate it :
m2_wlan_radio: m2-wlan-radio {
compatible = "rfkill-gpio";
type = "wlan";
shutdown-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
};
@tacomilkshake, have you got the optional M.2 Key E 2230 Wireless and Bluetooth Combo Module ? or do you use a USB wifi dongle ?
This is a good point, the R5C has a M.2 Key E 2230 slot, the R5S does not. To be sure everyone is talking about the same issue, can we confirm the R5 model and the interface?
Hello @inindev,
I've got the R5C with the optional Wifi/Bluetooth combo module (AzureWave AW-CB375NF) on the M.2 Key E 2230 slot. Do you have one?
I have an R5C but have never put a wifi card in the Key E. I can do that tomorrow.
I have an R5C but have never put a wifi card in the Key E. I can do that tomorrow.
Thanks.
Confirming I do indeed also have a R5C with the M.2 Key E 2230 Wireless and Bluetooth Combo Module.
It's odd it seems about 50/50 on boot whether I can get the device to show up using sudo lspci | grep 'Wireless'
.
When it does, I can use iwd/iwctl to configure and connect to WLAN.
I tried adding a variety of drivers: firmware-realtek, non-free misc, etc. Unfortunately, none improved the reliably of the device appearing (and being usable). Though, I believe this kernel should include the driver...
any chance a pci device rescan helps this?
echo "1" > /sys/bus/pci/devices/DDDD\:BB\:DD.F/remove
sleep 1
echo "1" > /sys/bus/pci/rescan
echo "1" > /sys/bus/pci/rescan
Whaou ! This made the card visible to lscpi !!! :-D
root@nanopi:~# lspci
0000:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
0000:01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
0001:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
0001:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
0002:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
0002:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
how can we make this permanent?
This made the card visible to lscpi !!! :-D
Good news there is a solid work-around until a permanent solution is found.
how can we make this permanent?
The easiest solution would be to make /etc/rc.local
(and mark it executable) with this command in there.
OK, but the wifi is not yet operational. The command iw list shows nothing.
Try using iwd once it appears in the lspci list; that’s what worked for me. I’m guessing iwd is doing the extra configuration needed to enable the device. I couldn’t get base networking to recognize it, nor using NetworkManager.
On Sat, Dec 30, 2023, at 11:24, libresurf wrote:
OK, but the wifi is not yet operational. The command iw list shows nothing.
— Reply to this email directly, view it on GitHub https://github.com/inindev/nanopi-r5/issues/25#issuecomment-1872588236, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN5RBS4YO4T6VBD4NPC5QDYMBS57AVCNFSM6AAAAAA63OIQ42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGU4DQMRTGY. You are receiving this because you were mentioned.Message ID: @.***>
Try using iwd once it appears in the lspci list; that’s what worked for me. I’m guessing iwd is doing the extra configuration needed to enable the device. I couldn’t get base networking to recognize it, nor using NetworkManager.
Also, does dmesg
tell you anything like it is missing firmware? Is your e-key a realtek device?
I minimize the firmware in the image to keep it small as it can easily be installed later. Ensure non-free
is enabled in /etc/apt/sources.list
apt install firmware-realtek
I generally use wpasupplicant:
apt install wireless-regdb wpasupplicant
lspci shows no driver in use for the wifi card :
root@nanopi:~# lspci -k
0000:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
Kernel driver in use: pcieport
0000:01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
Subsystem: AzureWave RTL8822CE 802.11ac PCIe Wireless Network Adapter
Kernel modules: rtw88_8822ce
0001:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
Kernel driver in use: pcieport
0001:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller
Kernel driver in use: r8169
Kernel modules: r8169, r8125
0002:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
Kernel driver in use: pcieport
0002:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller
Kernel driver in use: r8169
Kernel modules: r8169, r8125
This should take care of it then:
apt install firmware-realtek
Yes, firmware-realtek is already installed.
but that doesn't solve the problem.
do you have these too?
apt install wireless-regdb wpasupplicant
Yes, I have these too.
Try restarting the network service
-------- Original Message -------- On Dec 30, 2023, 2:56 PM, libresurf wrote:
Yes, I have these too.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
networkctl reload
or
systemctl restart networking.service
don't solve the problem.
There are two things that I don't understand. Why the M.2 card is not recognised during boot-up? but is recognised when forcing the rescan of the pci bus... And once the card is recognised, why is the driver loaded but not used?
There are errors and fails in the kernel logs when I rescan the pci bus :
déc. 30 22:00:48 nanopi kernel: pcieport 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
déc. 30 22:00:48 nanopi kernel: pci 0000:01:00.0: [10ec:c822] type 00 class 0x028000
déc. 30 22:00:48 nanopi kernel: pci 0000:01:00.0: reg 0x10: [io 0x1000-0x10ff]
déc. 30 22:00:48 nanopi kernel: pci 0000:01:00.0: reg 0x18: [mem 0xf4300000-0xf430ffff 64bit]
déc. 30 22:00:48 nanopi kernel: pci 0000:01:00.0: supports D1 D2
déc. 30 22:00:48 nanopi kernel: pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
déc. 30 22:00:48 nanopi kernel: pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
déc. 30 22:00:48 nanopi kernel: pcieport 0000:00:00.0: BAR 14: assigned [mem 0xf4300000-0xf43fffff]
déc. 30 22:00:48 nanopi kernel: pcieport 0000:00:00.0: BAR 13: assigned [io 0x1000-0x1fff]
déc. 30 22:00:48 nanopi kernel: pci 0000:01:00.0: BAR 2: assigned [mem 0xf4300000-0xf430ffff 64bit]
déc. 30 22:00:48 nanopi kernel: pci 0000:01:00.0: BAR 0: assigned [io 0x1000-0x10ff]
déc. 30 22:00:48 nanopi kernel: rtw_8822ce 0000:01:00.0: enabling device (0000 -> 0003)
déc. 30 22:00:48 nanopi kernel: rtw_8822ce 0000:01:00.0: firmware: direct-loading firmware rtw88/rtw8822c_wow_fw.bin
déc. 30 22:00:48 nanopi kernel: rtw_8822ce 0000:01:00.0: WOW Firmware version 9.9.4, H2C version 15
déc. 30 22:00:48 nanopi kernel: rtw_8822ce 0000:01:00.0: firmware: direct-loading firmware rtw88/rtw8822c_fw.bin
déc. 30 22:00:48 nanopi kernel: rtw_8822ce 0000:01:00.0: Firmware version 9.9.15, H2C version 15
déc. 30 22:00:48 nanopi kernel: rtw_8822ce 0000:01:00.0: error beacon valid
déc. 30 22:00:48 nanopi kernel: rtw_8822ce 0000:01:00.0: failed to download rsvd page
déc. 30 22:00:48 nanopi kernel: rtw_8822ce 0000:01:00.0: failed to download firmware
déc. 30 22:00:48 nanopi kernel: rtw_8822ce 0000:01:00.0: failed to setup chip efuse info
déc. 30 22:00:48 nanopi kernel: rtw_8822ce 0000:01:00.0: failed to setup chip information
déc. 30 22:00:48 nanopi kernel: rtw_8822ce: probe of 0000:01:00.0 failed with error -16
Why the M.2 card is not recognised during boot-up? but is recognised when forcing the rescan of the pci bus...
I will have to look first-hand tomorrow, but I am expecting to find a timing issue where I may need to add a delay in the power supply activating this device.
And once the card is recognised, why is the driver loaded but not used?
I wonder if there is an issue with the driver you are using. Perhaps try uninstalling the realtek firmware and try the linux firmware.
sudo apt purge firmware-realtek
sudo apt install linux-firmware
sudo apt purge firmware-realtek sudo apt install linux-firmware
I tried this... but no luck :
déc. 31 11:02:05 nanopi kernel: pcieport 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
déc. 31 11:02:05 nanopi kernel: pci 0000:01:00.0: [10ec:c822] type 00 class 0x028000
déc. 31 11:02:05 nanopi kernel: pci 0000:01:00.0: reg 0x10: [io 0x1000-0x10ff]
déc. 31 11:02:05 nanopi kernel: pci 0000:01:00.0: reg 0x18: [mem 0xf4300000-0xf430ffff 64bit]
déc. 31 11:02:05 nanopi kernel: pci 0000:01:00.0: supports D1 D2
déc. 31 11:02:05 nanopi kernel: pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
déc. 31 11:02:05 nanopi kernel: pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
déc. 31 11:02:05 nanopi kernel: pcieport 0000:00:00.0: BAR 14: assigned [mem 0xf4300000-0xf43fffff]
déc. 31 11:02:05 nanopi kernel: pcieport 0000:00:00.0: BAR 13: assigned [io 0x1000-0x1fff]
déc. 31 11:02:05 nanopi kernel: pci 0000:01:00.0: BAR 2: assigned [mem 0xf4300000-0xf430ffff 64bit]
déc. 31 11:02:05 nanopi kernel: pci 0000:01:00.0: BAR 0: assigned [io 0x1000-0x10ff]
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: firmware: failed to load rtw88/rtw8822c_fw.bin (-2)
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: firmware: failed to load rtw88/rtw8822c_fw.bin (-2)
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: Direct firmware load for rtw88/rtw8822c_fw.bin failed with error -2
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: failed to request firmware
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: enabling device (0000 -> 0003)
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: firmware: failed to load rtw88/rtw8822c_wow_fw.bin (-2)
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: firmware: failed to load rtw88/rtw8822c_wow_fw.bin (-2)
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: Direct firmware load for rtw88/rtw8822c_wow_fw.bin failed with error -2
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: failed to request firmware
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: failed to load firmware
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: failed to setup chip efuse info
déc. 31 11:02:05 nanopi kernel: rtw_8822ce 0000:01:00.0: failed to setup chip information
déc. 31 11:02:05 nanopi kernel: rtw_8822ce: probe of 0000:01:00.0 failed with error -22
I think the problem comes from an incorrect definition in the device tree. See my previous post : Post 3. But I couldn't solve the problem or create a correct dtb file.
It looks like we chased a lot of red herrings yesterday. I got a chance to install my e-key wifi card (which is the same model as yours, btw) and got the same result as you.
tl;dr try to apt install rfkill
and reboot -- that might be all you need to do at this point.
on my initial boot I got:
[ 13.462108] rtw_8822ce 0000:01:00.0: enabling device (0000 -> 0003)
[ 13.468699] rtw_8822ce 0000:01:00.0: firmware: failed to load rtw88/rtw8822c_fw.bin (-2)
[ 13.468714] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
[ 13.468737] rtw_8822ce 0000:01:00.0: firmware: failed to load rtw88/rtw8822c_fw.bin (-2)
[ 13.468742] rtw_8822ce 0000:01:00.0: Direct firmware load for rtw88/rtw8822c_fw.bin failed with error -2
[ 13.468750] rtw_8822ce 0000:01:00.0: failed to request firmware
[ 13.468782] rtw_8822ce 0000:01:00.0: firmware: failed to load rtw88/rtw8822c_wow_fw.bin (-2)
[ 13.468802] rtw_8822ce 0000:01:00.0: firmware: failed to load rtw88/rtw8822c_wow_fw.bin (-2)
[ 13.468806] rtw_8822ce 0000:01:00.0: Direct firmware load for rtw88/rtw8822c_wow_fw.bin failed with error -2
[ 13.468811] rtw_8822ce 0000:01:00.0: failed to request firmware
[ 13.471210] rtw_8822ce 0000:01:00.0: failed to load firmware
[ 13.471223] rtw_8822ce 0000:01:00.0: failed to setup chip efuse info
[ 13.471226] rtw_8822ce 0000:01:00.0: failed to setup chip information
I then installed the firmware:
wget https://mirrors.edge.kernel.org/pub/linux/kernel/firmware/linux-firmware-20230515.tar.xz
tar xavf linux-firmware-20230515.tar.xz
cd linux-firmware-20230515
sudo su
mv rtw88 /usr/lib/firmware/
mv rtl_bt /usr/lib/firmware/
...and updated my debian as well as installed rfkill
apt update
apt upgrade
apt install rfkill
reboot
it then just worked:
debian@nanopi-r5c-arm64:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: lan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 3a:96:33:0c:6a:4c brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global lan0
valid_lft forever preferred_lft forever
3: wan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 3a:96:33:0c:6a:4d brd ff:ff:ff:ff:ff:ff
inet 192.168.200.10/24 brd 192.168.200.255 scope global dynamic noprefixroute wan0
valid_lft 602488sec preferred_lft 527091sec
inet6 fe80::985:7939:fd32:1ae5/64 scope link
valid_lft forever preferred_lft forever
4: wlp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether b4:6d:c2:ab:dc:12 brd ff:ff:ff:ff:ff:ff
Thank you @inindev for this solution. I reflashed my SD card with your disk image (nanopi-r5c_bookworm-1203.img), applied your solution and it works.
But unfortunately it doesn't work with my custom installation and that's another problem that no longer concerns this issue.
Thanks a lot !
sudo apt install rfkill
fixed the issue for me as well, so I should note I also installed the updated linux-firmware too.
Thanks very much @inindev for this solution, and for the repo overall!
Hello @inindev,
Why not add rtw88 and rtl_bt to line 109 of your nanopi-r5c/make_debian_img.sh script?
Good call, I added rtl_bt, rtlwifi, rtw88, and rtw89: https://github.com/inindev/nanopi-r5/commit/a48872569248c0798ccf6eced22891d9b83d6f51
I am going to be rebuilding the images soon to pickup the debian bookworm 12.4 update.