set " overlays=wifi-ap6275p" in " /boot/dietpiEnv.txt"
reboot
then:
set up a WiFi network as usual with dietpi-config, wifi works
reboot
Expected behaviour
At startup, WiFi should connect to the SSID set up by dietpi-config.
Actual behaviour
WiFi does not connect at startup. It is, however, possible to connect to the WiFi manually using dietpi-config.
Extra details
I traced the issue to the ifup command.
At startup, ifup@wlan0.service starts and crashes: the command ifup --allow=hotplug wlan0; ifquery --state wlan0 fails with “command failed: Input/Output error (-5)”.
When using --verbose, we can see that the error comes from the following subcommand: iw dev wlan0 set power_save off
This issue is pretty reproducible, as it worked the same on two OrangePI 5B.
If I reboot and ifup wlan0, it crashes with the same error. In fact, this is how I found that the issue was coming from the iw dev wlan0 set power_save off command.
My teammate has the same OrangePi and the same issue. It seems he solved it by executing ip link set wlan0 up before ifup --allow=hotplug wlan0. I can’t test that tonight, but I will report tomorrow to confirm or deny that this fixes it.
ok at least we might need to look into this further as the 5B has some different hardware (WiFi on board) compared to the regular 5. Probably a different image is required. Did you used the official DietPi Orange Pi 5 image?
I have good news: the fix indeed works! In summary, here are the steps we followed to fix the OrangePi 5B wifi issues in case that is useful to create a new image:
Problem 1: the WiFi module is not recognized in dietpi-config
sudo cp /boot/dtb/rockchip/overlay/orangepi-5-ap6275p.dtbo /boot/dtb/rockchip/overlay/rk3588-wifi-ap6275p.dtbo
put overlays=wifi-ap6275p in /boot/dietpiEnv.txt
reboot
the adapter can now be seen in dietpi-config! You can use it to connect to your wifi.
Problem 2: WiFi crashes at startup
Edit /etc/systemd/system/ifup@.service.d/dietpi.conf and put:
[Service]
Type=oneshot
ExecStart=
ExecStart=/bin/sh -ec 'ip link set %I up; ifup --allow=hotplug %I'
The important part being that we added ip link set %I up before the call to ifup. Reboot, and the WiFi should work! This was tested on two different OrangePi 5B.
Do you have a USB-UART adapter to check the console? I want to find out whether we can find out about 5 vs 5B in U-Boot and apply the onboard WiFi overlay automatically, e.g. whether there is a ${variant} variable defined that we can check for.
Another thing I am wondering about: There is an explicit 5B overlay and I am confused that this does not contain onboard WiFi OOTB. Can you do the following:
This to check whether really the 5B device tree is loaded.
And another question, do you know whether there is a 5B Plus with onboard WiFi? Orange Pi websites are pretty inconsistent, the wiki does not even list the 5B.
Ah, and another thing: Instead of applying the overlay, does it work as well to just load this module?
I will try to check all of these next week: I still have an Orange Pi 5B to patch, so that will be the occasion to test.
And another question, do you know whether there is a 5B Plus with onboard WiFi? Orange Pi websites are pretty inconsistent, the wiki does not even list the 5B.
Another thing I am wondering about: There is an explicit 5B overlay and I am confused that this does not contain onboard WiFi OOTB. Can you do the following:
After that, the value of ${ftdfile} in /proc/cmdline is rockchip/rk3588s-orangepi-5.dtb. I guess this should be rockchip/rk3588s-orangepi-5b.dtb?
Ah, and another thing: Instead of applying the overlay, does it work as well to just load this module?
modprobe sprdwl_ng
It seems I do not have the sprdwl_ng module. Sorry, it’s been a while since the last time I had to work with kernel modules so I am not sure what to do there. Should I build it with the kernel sources somehow? Or should it have been included in the distro?
Do you have a USB-UART adapter to check the console? I want to find out whether we can find out about 5 vs 5B in U-Boot and apply the onboard WiFi overlay automatically, e.g. whether there is a ${variant} variable defined that we can check for.
Sorry, I do not have a USB-UART adapter at home so I have been unable to test for this, but I should be able to find one at the university.
Hello,
new user here. I am trying to comprehend what the fix is…? I also have an Orange Pi 5b and my wifi is not even loading, even in dietpi-config.
It was suggested a separate version for the 5b may be needed, but then there were other commands posted that didn’t seem to fix it.
Is there a separate image? I don’t see one on the server.
If we need to use special commands, can someone highlight for me as a new user what those commands needed for using the 5b’s wifi are?
The Orange Pi 5B device tree should enable onboard WiFi OOTB, and the bootloader seems to not pick that one automatically anymore (it did in the past, based on some hardware identifier).