Activating the WiFi monitor mode on Vim4 22.04

I have Vim4 with ubuntu 22.04, I want to activate the monitor mode on the on-board WiFi card, but after running the command “sudo iwconfig wlan0 mode monitor” I get the error “Error for wireless request “Set Mode” (8B06): SET failed on device wlan0; Invalid argument”.
If I want to check the currently used driver/firmware using the command “sudo lshw -c network” I don’t get the driver or firmware version, what I get is like “… driver=wl driverversion=0 …”

Even the command “lspci | grep -i wireless” doesn’t show anything.

I think it is a firmware issue but I don’t know how to fix it. I think I found the needed firmware in the following link but not sure how to fix the issue using it.

The on-board wifi card is AP6275S Wi-Fi 6 Module

Any help is really appreciated, and thank you very much.

Hello @HadK123

In order to use the Wi-Fi monitor mode, you need to upgrade the kernel.

Follow the steps below to upgrade the kernel:

wget https://dl.khadas.com/.test/wifi/linux-image-amlogic-5.4_1.4.2_arm64.deb
sudo dpkg -i linux-image-amlogic-5.4_1.4.2_arm64.deb 
sudo reboot

Afrer reboot, follow the steps below to enable monitor mode on node radiotap0

wget https://dl.khadas.com/.test/wifi/dhd_priv
chmod +x dhd_priv 
sudo ./dhd_priv monitor 1
sudo ifconfig radiotap0 up
sudo tcpdump -i radiotap0

Hello @numbqq thank you for your reply, I tried your solution, but when I run the command “sudo ./dhd_priv monitor 1” I get the error: “dhd_priv(2.4): failed to send cmd at wlan0 with error -1”

I also checked the command that I mentioned in my original post and still getting the same results!

Hello @HadK123

Which version of Ubuntu you used? I checked on my side with latest release 1.4-221229, it works well.

khadas@Khadas:~$ cat /etc/fenix-release 
# PLEASE DO NOT EDIT THIS FILE
BOARD=VIM4
VENDOR=Amlogic
VERSION=1.4
ARCH=arm64
INITRD_ARCH=arm64
IMAGE_VERSION=1.4-221229
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-u-boot-2019.01-v1.4-release
LINUX_GIT_VERSION=khadas-vims-linux-5.4-v1.4-release
FENIX_GIT_VERSION=v1.4
#############################################

Please provide the information below to me:

cat /etc/fenix-release 
uname -a

Yes @numbqq, this is what I also get, exactly what you have

khadas@Khadas:~$ cat /etc/fenix-release 
# PLEASE DO NOT EDIT THIS FILE
BOARD=VIM4
VENDOR=Amlogic
VERSION=1.4
ARCH=arm64
INITRD_ARCH=arm64
IMAGE_VERSION=1.4-221229
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-u-boot-2019.01-v1.4-release
LINUX_GIT_VERSION=khadas-vims-linux-5.4-v1.4-release
FENIX_GIT_VERSION=v1.4
#############################################
khadas@Khadas:~$ uname -a
Linux Khadas 5.4.180 #1.4.2 SMP PREEMPT Thu Jan 5 10:45:07 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
khadas@Khadas:~$

Hello @HadK123

I guess you connected the Wi-Fi, right? Please distconnect the Wi-Fi connection and try again.

That worked! thank you so much @numbqq! I really appreciate your help.