WiFi Monitor Mode

Hi, I would like to enable monitor mode on the onboard WiFi card via the instructions in this WiKi - https://wiki.radxa.com/Rockpi4/dev/monitor-mode

However the links are dead. Where can i get the files needed ?

Please use this link instead:

Thanks @jack. I have downloaded the file and tried to follow the instructions from the original source - https://wiki.radxa.com/Rockpi4/dev/monitor-mode

When you run this command gcc dhd_priv.c -o dhd_priv the file its full or errors.

I am running Armbian 22.05 on a Rock Pi 4B

This is because of the gcc version. If you compile with gcc 7, there should be no errors.

Hi @jack
Just tried again and have a different error

root@rockpi-4b:~# ls
dhd_priv.c
root@rockpi-4b:~# gcc dhd_priv.c -o dhd_priv
dhd_priv.c: In function ‘main’:
dhd_priv.c:15:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
#define TAG "dhd_priv: "
^
dhd_priv.c:85:14: note: in expansion of macro ‘TAG’
DHD_PRINTF(TAG “buf = %s, len = %d, ret = %d\n”, buf, strlen(buf), ret);
^~~
dhd_priv.c:85:36: note: format string is defined here
DHD_PRINTF(TAG “buf = %s, len = %d, ret = %d\n”, buf, strlen(buf), ret);
~^
%ld
root@rockpi-4b:~# gcc --version
gcc (Ubuntu/Linaro 7.5.0-6ubuntu2) 7.5.0
Copyright © 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And then if i run the next command i get another error

root@rockpi-4b:~# sudo ./dhd_priv channel 6
dhd_priv: Version = 1.2
argv: ./dhd_priv channel 6
dhd_priv: failed to issue private commands -1
root@rockpi-4b:~#

One question i have looking at the code, how does it know what Interface to put into Monitor mode, there is no mention of wlan0. There seems to be lots of comments re Android, is this code for Ubuntu ?

Hi,

Which kernel version and wifi driver are you using? Are you running the 4.4 kernel or the mainline kernel?

We are running 5.15.32-rockchip64 kernel
Wifi driver version brcmfmac
As mentioned previously we are running the Armbian OS downloaded from your website