Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wlan0 not being recognized #25

Open
rintaro001 opened this issue Nov 2, 2023 · 39 comments
Open

wlan0 not being recognized #25

rintaro001 opened this issue Nov 2, 2023 · 39 comments

Comments

@rintaro001
Copy link

wlan0 not being recognized. "ip -a" returns only lo, wan0 and lan0.

@tacomilkshake
Copy link

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'

@libresurf
Copy link

libresurf commented Dec 30, 2023

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>;
};

@inindev
Copy link
Owner

inindev commented Dec 30, 2023

@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?

@libresurf
Copy link

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?

@inindev
Copy link
Owner

inindev commented Dec 30, 2023

I have an R5C but have never put a wifi card in the Key E. I can do that tomorrow.

@libresurf
Copy link

I have an R5C but have never put a wifi card in the Key E. I can do that tomorrow.

Thanks.

@tacomilkshake
Copy link

tacomilkshake commented Dec 30, 2023

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...

@inindev
Copy link
Owner

inindev commented Dec 30, 2023

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

@libresurf
Copy link

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?

@inindev
Copy link
Owner

inindev commented Dec 30, 2023

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.

@libresurf
Copy link

OK, but the wifi is not yet operational.
The command iw list shows nothing.

@tacomilkshake
Copy link

tacomilkshake commented Dec 30, 2023 via email

@inindev
Copy link
Owner

inindev commented Dec 30, 2023

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

@libresurf
Copy link

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

@inindev
Copy link
Owner

inindev commented Dec 30, 2023

This should take care of it then:

apt install firmware-realtek

@libresurf
Copy link

Yes, firmware-realtek is already installed.

@libresurf
Copy link

but that doesn't solve the problem.

@inindev
Copy link
Owner

inindev commented Dec 30, 2023

do you have these too?

apt install wireless-regdb wpasupplicant

@libresurf
Copy link

Yes, I have these too.

@inindev
Copy link
Owner

inindev commented Dec 30, 2023 via email

@libresurf
Copy link

networkctl reload
or
systemctl restart networking.service
don't solve the problem.

@libresurf
Copy link

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?

@libresurf
Copy link

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

@inindev
Copy link
Owner

inindev commented Dec 31, 2023

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

@libresurf
Copy link

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.

@inindev
Copy link
Owner

inindev commented Jan 1, 2024

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

@libresurf
Copy link

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 !

@inindev inindev closed this as completed Jan 2, 2024
@tacomilkshake
Copy link

tacomilkshake commented Jan 2, 2024

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!

inindev added a commit that referenced this issue Jan 2, 2024
@libresurf
Copy link

Hello @inindev,

Why not add rtw88 and rtl_bt to line 109 of your nanopi-r5c/make_debian_img.sh script?

@inindev
Copy link
Owner

inindev commented Jan 6, 2024

Good call, I added rtl_bt, rtlwifi, rtw88, and rtw89:
a488725

I am going to be rebuilding the images soon to pickup the debian bookworm 12.4 update.

@rintaro001
Copy link
Author

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

Good tutorial and nice it worked for some, Unfortunately this did not work for me, still no WiFi adapter while typing 'ip a'. I'll open up and check what WiFi card I have. I would assume It's the same since It came with one pre-installed.

@inindev
Copy link
Owner

inindev commented Feb 7, 2024

Good tutorial and nice it worked for some, Unfortunately this did not work for me, still no WiFi adapter while typing 'ip a'. I'll open up and check what WiFi card I have. I would assume It's the same since It came with one pre-installed.

be sure the card is recognized by the pci bus using lspci

@rintaro001
Copy link
Author

Good tutorial and nice it worked for some, Unfortunately this did not work for me, still no WiFi adapter while typing 'ip a'. I'll open up and check what WiFi card I have. I would assume It's the same since It came with one pre-installed.

be sure the card is recognized by the pci bus using lspci

Can only see ethernet interfaces from lspsci, I tried bootig into stock Debian 11 nanopi image and saw it there "RTL8822CE".

@inindev
Copy link
Owner

inindev commented Feb 7, 2024

can you try this release:
https://github.com/inindev/debian-image/releases

or alternatively this kernel:
https://github.com/inindev/linux-rockchip/releases

@inindev
Copy link
Owner

inindev commented Feb 8, 2024

Good tutorial and nice it worked for some, Unfortunately this did not work for me, still no WiFi adapter while typing 'ip a'. I'll open up and check what WiFi card I have. I would assume It's the same since It came with one pre-installed.

be sure the card is recognized by the pci bus using lspci

Can only see ethernet interfaces from lspsci, I tried bootig into stock Debian 11 nanopi image and saw it there "RTL8822CE".

Here is something interesting I just noticed. If you cold boot the device, sometimes the wifi card is not detected (output from a nanopi-r5c):

# lspci
0000:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
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)

...but a warm boot always detects the wifi card:

# 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)

@libresurf
Copy link

Hello @inindev ,
Can you explain the difference between "cold boot" and "warm boot" ?

@inindev
Copy link
Owner

inindev commented Feb 13, 2024

cold boot == power-on boot
warm boot == reboot after device is running

There seems to be a power-on race issue. I am testing openwrt linux 6.1.77 which seems to have problems. I do not see these issues with the linux 6.7 images found here: https://github.com/inindev/debian-image/releases/tag/v12.4

@inindev inindev reopened this Feb 13, 2024
@Averell7
Copy link

Hello, it is exactly what we are fighting with since a month, but for our two R5C (with M2 WiFi), the result is perfectly consistent : on cold boot, the Wifi is never present, on reboot it is always present. We are using Dietpi. After a cold boot, rescaning the PCI bus makes the WiFi appear in lspci, but not with ip a.

@ataluts
Copy link

ataluts commented Jan 9, 2025

Hello. I also have NanoPi R5C and a problem with PCIe device not starting properly (WAN port in my case). I have found this issue by searching the Internet for my problem, found post by @joachimneu on OpenWrt forum about eth1 not working and followed links in there to issue #5 here. Since this issue is already closed I decided to post here. I see that this discussion is quite old but what I found by investigating my own device might be an answer to this strange behaviour. I have opened an issue on OpenWrt repository, check it out for details, specifically the post about PERSTB signal. Can it be the root cause of all these mysterious problems with PCIe devices?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants