Rock4C+ no-wifi-hardware-found

Hello to all
I installed Dietpi on Rock4C+ (RK3399-T) and it works well, but unfortunately I can’t make WiFi work

Wifi is (AzureWave Module AW-CM256SM)

I tried to follow some forums but I was unable to solve the problem
In Dietpi-Config I tried to disable/enable the wifi and then to reboot but does not seem to see the WiFi hardware …The message in Dietpi-Config remains “Wifi Not found”
I also tried to enable the wifi from dietpi.txt …reboot …Dietpi-config disable/enable wif … reboot …remains “Wifi Not found”

Anyone know some tricks to make him recognize the hardware?

Thanks for the help

Probably drivers are missing for that WiFi module. But I need to see, this is just a guess as I don’t know this module personally.

Maybe @MichaIng has an idea.

Good to see that it works. You boot from SD card, right? Because from eMMC it doesn’t seem to work: Rock 4 C+ Dietpi Support?

This seems to be the CYW43455 WiFi chip, the same used (onboard) on my PINE64 SOQuartz module. Actually I think its even the same module. For his image we needed to add some firmware text file from upstream kernel, as the blobs are already provided by Debian’s Broadcom firmware package: Debian -- Details of package firmware-brcm80211 in bullseye

curl -sSf 'https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/brcm/brcmfmac43455-sdio.AW-CM256SM.txt' -o /lib/firmware/brcm/brcmfmac43455-sdio.txt

However, I thought I saw this exact file being part of the armbian-firmware package already:

dpkg -S brcmfmac43455-sdio.txt

To quickly check whether the hardware is detected:

ip l

If no wlan0 shows up, no need to try with dietpi-config. The kernel should actually show related error messages, providing possibly more hints:

dmesg -l 0,1,2,3

Thank you Michalng
Yes, I don’t have the EMMC connector …https://de.rs-online.com/web/p/rock-sbc-platinen/2493158)

I tried but it doesn’t seem to work
Now in the “/lib/firmware/brcm” directory there is the file “brcmfmac43455-sdio.txt”

root@DietPi:~# ip I
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 62:87:ba:b9:ae:7b brd ff:ff:ff:ff:ff:ff
root@DietPi:~# dmesg -l 0,1,2,3
[    1.724506] rk808 0-001b: failed to read the chip id at 0x17
[    2.661366] rk_gmac-dwmac fe300000.ethernet: cannot get clock clk_mac_speed
[    6.578881] es8316 1-0011: ASoC: error at soc_component_write_no_lock on es8316.1-0011: -6
[    6.584719] es8316 1-0011: ASoC: error at soc_component_write_no_lock on es8316.1-0011: -6
[    6.622763] es8316 1-0011: ASoC: error at soc_component_write_no_lock on es8316.1-0011: -6
[    6.623027] es8316 1-0011: ASoC: error at soc_component_write_no_lock on es8316.1-0011: -6
[    6.623421] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.623657] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.623905] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.624134] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.624382] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.624606] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.624833] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.625060] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.625306] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.625548] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.625985] es8316 1-0011: ASoC: error at snd_soc_component_update_bits on es8316.1-0011: -6
[    6.626215] es8316 1-0011: ASoC: error at snd_soc_component_update_bits on es8316.1-0011: -6
[    6.626517] es8316 1-0011: ASoC: error at snd_soc_component_update_bits on es8316.1-0011: -6
[    6.626756] es8316 1-0011: ASoC: error at snd_soc_component_update_bits on es8316.1-0011: -6
[    6.631109] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.631404] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.631647] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.631946] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.632204] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.632446] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.632688] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.632931] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.633186] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.633449] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.633703] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.634003] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.634252] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.634525] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.634774] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.635023] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.635279] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.635546] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.635882] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.636164] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.636402] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.636701] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.636941] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.637170] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.637409] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.637654] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.637892] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.638128] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.638362] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.638679] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.638921] es8316 1-0011: ASoC: error at soc_component_read_no_lock on es8316.1-0011: -6
[    6.639312] es8316 1-0011: ASoC: error at snd_soc_component_update_bits on es8316.1-0011: -6
[    6.639547] es8316 1-0011: ASoC: error at snd_soc_component_update_bits on es8316.1-0011: -6
[    6.639764] es8316 1-0011: ASoC: error at snd_soc_component_update_bits on es8316.1-0011: -6
[    6.639980] es8316 1-0011: ASoC: error at snd_soc_component_update_bits on es8316.1-0011: -6
[    6.640197] es8316 1-0011: ASoC: error at snd_soc_component_update_bits on es8316.1-0011: -6
[    6.640407] es8316 1-0011: ASoC: error at snd_soc_component_update_bits on es8316.1-0011: -6

Which drivers are actually loaded?

lsmod

On these levels, I am ignorant :tired_face: sorry
I don’t know how drivers are selecting …I thought he automatically found the drivers

root@DietPi:~#   lsmod
Module                  Size  Used by
snd_soc_hdmi_codec     24576  1
hantro_vpu            118784  0
rockchip_vdec          32768  0
rockchip_iep           20480  0
v4l2_h264              16384  2 rockchip_vdec,hantro_vpu
rockchip_rga           28672  0
videobuf2_dma_contig    24576  3 rockchip_vdec,hantro_vpu,rockchip_iep
snd_soc_simple_card    24576  0
snd_soc_audio_graph_card    24576  0
snd_soc_rockchip_i2s    24576  4
snd_soc_es8316         45056  1
snd_soc_simple_card_utils    28672  2 snd_soc_audio_graph_card,snd_soc_simple_card
snd_soc_rockchip_pcm    16384  1 snd_soc_rockchip_i2s
panfrost               69632  0
videobuf2_vmalloc      20480  1 hantro_vpu
v4l2_mem2mem           40960  4 rockchip_vdec,hantro_vpu,rockchip_rga,rockchip_iep
videobuf2_dma_sg       24576  1 rockchip_rga
snd_soc_core          262144  7 snd_soc_rockchip_pcm,snd_soc_hdmi_codec,snd_soc_audio_graph_card,snd_soc_simple_card_utils,snd_soc_rockchip_i2s,snd_soc_simple_card,snd_soc_es8316
gpu_sched              40960  1 panfrost
dw_hdmi_cec            16384  0
videobuf2_memops       20480  3 videobuf2_vmalloc,videobuf2_dma_contig,videobuf2_dma_sg
dw_hdmi_i2s_audio      16384  0
videobuf2_v4l2         32768  5 rockchip_vdec,hantro_vpu,rockchip_rga,rockchip_iep,v4l2_mem2mem
snd_pcm_dmaengine      20480  1 snd_soc_core
videobuf2_common       65536  10 rockchip_vdec,videobuf2_vmalloc,videobuf2_dma_contig,videobuf2_v4l2,hantro_vpu,rockchip_rga,videobuf2_dma_sg,rockchip_iep,v4l2_mem2mem,videobuf2_memops
snd_pcm               131072  4 snd_soc_hdmi_codec,snd_soc_core,snd_soc_es8316,snd_pcm_dmaengine
ip6t_REJECT            16384  1
nf_reject_ipv6         20480  1 ip6t_REJECT
videodev              262144  7 rockchip_vdec,videobuf2_v4l2,hantro_vpu,rockchip_rga,videobuf2_common,rockchip_iep,v4l2_mem2mem
snd_timer              40960  1 snd_pcm
snd                    94208  4 snd_soc_hdmi_codec,snd_timer,snd_soc_core,snd_pcm
xt_hl                  16384  22
soundcore              16384  1 snd
mc                     61440  6 rockchip_vdec,videodev,videobuf2_v4l2,hantro_vpu,videobuf2_common,v4l2_mem2mem
ip6_tables             32768  52
ip6t_rt                20480  3
cpufreq_dt             20480  0
ipt_REJECT             16384  1
nf_reject_ipv4         16384  1 ipt_REJECT
xt_LOG                 20480  10
nf_log_syslog          20480  10
nft_limit              16384  13
xt_limit               20480  0
xt_addrtype            16384  4
xt_tcpudp              20480  32
xt_conntrack           16384  16
nf_conntrack          163840  1 xt_conntrack
nf_defrag_ipv6         24576  1 nf_conntrack
nf_defrag_ipv4         16384  1 nf_conntrack
nft_compat             20480  149
nft_counter            16384  184
nf_tables             212992  431 nft_compat,nft_counter,nft_limit
nfnetlink              20480  2 nft_compat,nf_tables
ip_tables              32768  8
x_tables               49152  12 xt_conntrack,nft_compat,xt_LOG,xt_tcpudp,xt_addrtype,ip6t_rt,ip6_tables,ipt_REJECT,ip_tables,xt_limit,xt_hl,ip6t_REJECT
autofs4                49152  2
realtek                32768  1
dwmac_rk               28672  0
stmmac_platform        24576  1 dwmac_rk
stmmac                237568  2 stmmac_platform,dwmac_rk
pcs_xpcs               24576  1 stmmac

Yes, usually when the kernel detects hardware, it checks for and loads matching drivers, or implied by the device tree, and those drivers do then load the firmware blobs, when needed. However, in your case no WiFi driver is loaded.

Ah, I do now see the issue. Do you have an ability to access the ext4 partition from another (Linux) system, just in case it won’t boot? If so, please try:

sed -i '/^fdtfile=/d' /boot/dietpiEnv.txt
sed -i '/^setenv bootargs/s/"$/ \${fdtfile}"/' /boot/boot.cmd
mkimage -C none -A arm64 -T script -d /boot/boot.cmd /boot/boot.scr

We currently enforce the ROCK Pi 4B device tree. This removes this enforcement. But it only works if the bootloader passes the right fdtfile variable based on hardware by itself, and I’m not sure whether it does. To be able to check back, which device tree was loaded, the argument is added to the kernel command-line, so it can be read back when the system booted via:

cat /proc/cmdline

If you do not have the ability to access this partition from elsewhere, enforce the correct device tree via:

G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3399-rock-pi-4c-plus.dtb' /boot/dietpiEnv.txt

Thank you

Ah, I do now see the issue. Do you have an ability to access the ext4 partition from another (Linux) system, just in case it won’t boot? If so, please try:

Not Problem, I also have two Raspberry 4 with Dietpi and linux in virtualbox …If the boot does not work, I mount the SD on another Linux

Ok, Now the wifi is available and connected, but now the wifi connects and disconnects every 20 seconds (the rock4c is 20cm from the router)

root@DietPi:~# cat /proc/cmdline
root=UUID=66aa6969-e3b6-4865-94e4-7a68b81cf009 rootfstype=ext4 rootwait console=tty1 loglevel=4 consoleblank=0 coherent_pool=2M usb-storage.quirks= net.ifnames=0 rockchip/rk3399-rock-pi-4c-plus.dtb
root@DietPi:~# dmesg -l 0,1,2,3
[    1.446694] rockchip-usb2phy ff770000.syscon:usb2phy@e450: failed to create phy
[    1.447712] rockchip-usb2phy ff770000.syscon:usb2phy@e460: failed to create phy
[    1.568655] vcc5v0_usb2.0: failed to get the current voltage: -EPROBE_DEFER
[    1.569308] lcd_3v3: failed to get the current voltage: -EPROBE_DEFER
[    2.484983] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[    3.381209] rk_gmac-dwmac fe300000.ethernet: cannot get clock clk_mac_speed
[    7.504002] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    7.724970] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    7.760458] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Aug 25 2015 18:58:57 version 7.45.69 (r581703) FWID 01-24037f6e

Sometimes the wifi tells me:

root@DietPi:~# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 62:87:ba:b9:ae:7b brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DORMANT mode DORMANT group default qlen 1000
    link/ether e8:fb:1c:14:93:e3 brd ff:ff:ff:ff:ff:ff

And other times the wifi tells me:

root@DietPi:~# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 62:87:ba:b9:ae:7b brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT group default qlen 1000
    link/ether e8:fb:1c:14:93:e3 brd ff:ff:ff:ff:ff:ff

I think there are error in the phy transceiver