inindev / nanopi-r5

stock debian arm64 linux for the nanopi r5c & r5s
GNU General Public License v3.0
100 stars 17 forks source link

wlan0 not being recognized #25

Open rintaro001 opened 10 months ago

rintaro001 commented 10 months ago

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

tacomilkshake commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

@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 commented 8 months ago

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 commented 8 months ago

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

libresurf commented 8 months ago

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

Thanks.

tacomilkshake commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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

tacomilkshake commented 8 months ago

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: @.***>

inindev commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

This should take care of it then:

apt install firmware-realtek
libresurf commented 8 months ago

Yes, firmware-realtek is already installed.

libresurf commented 8 months ago

but that doesn't solve the problem.

inindev commented 8 months ago

do you have these too?

apt install wireless-regdb wpasupplicant
libresurf commented 8 months ago

Yes, I have these too.

inindev commented 8 months ago

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: @.***>

libresurf commented 8 months ago

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

libresurf commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago
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 commented 8 months ago

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 commented 8 months ago

Thank you @inindev for this solution. I reflashed my SD card with your disk image (_nanopi-r5cbookworm-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 !

tacomilkshake commented 8 months ago

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!

libresurf commented 8 months ago

Hello @inindev,

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

inindev commented 8 months ago

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.

rintaro001 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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

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

inindev commented 7 months ago

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 commented 7 months ago

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

inindev commented 7 months ago

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

Averell7 commented 3 months ago

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.