-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTL8821AU failed to set frequency #234
Comments
Mostly latest Realtek drivers dropped ioctl() system call support in favor of NETLINK support. How do you set monitor mode (iw?) |
To get more information, plese disconnect the device and reconnect it again.
hcxdumptool will check if the ioctl() system calls are supported by the driver and give us some additional information about the return values of the driver. |
If all ioctl() calls are supported output looks like this:
and this
|
Some additional information:
The same applies to setting a frequency.
I will never support NETLINK, because that lead to a libnl dependency which produce huge overhead. |
The Ralink driver is working fine, too:
|
Now we are doing the same running a Realtek device/driver. $ hcxdumptool -I
and failed because the driver doesn't respond to ioctl() system calls. |
And now we come to the part that really surprised me. Some older Realtek drivers/devices suport ioctl() system calls:
I really don't know why some of the latest Realtek drivers (mostly third party drivers from git, because many kernel stock drivers do not support monitor mode) are compiled without ioctl() support. Due to their NETLINK only dependency you can't use this drivers in combination with hcxdumptool. |
Thank you for your feedback , sudo ifconfig wlan0 down Thanks |
That's ok, but unfortunately it also prevent that hcxdumptool check the capabilities of the driver:
|
instead of running airmon-ng
start services:
|
After hcxduptool finished, you must akrivate it again:
If the interface doesn't respond you should reconnect it or restart your system. This can happen on PCIe card devices. |
Thank you for your feedback , below is the output , please let me know your feedback. ================================================== ─# hcxdumptool -i wlan0 --check_driver terminating... =================================================== └─# sudo iw --debug dev wlan0 set type monitor =================================================================================================== └─# sudo iw --debug dev wlan0 set freq 2412 ========================================================================================================== |
Great, thanks. Looks like driver support both (ioctl and NETLINK). |
I have an idea why this driver is not working as expected.
because the driver need to be initialized by NETLINK. |
Thank you for your support and feedback , below is the output , same issue : ┌──(dimitri㉿kali)-[~] ┌──(dimitri㉿kali)-[~] ┌──(dimitri㉿kali)-[~] ┌──(dimitri㉿kali)-[~] ┌──(dimitri㉿kali)-[~] warning possible interfere: wpa_supplicant is running with pid 661 interface is already in monitor mode, skipping ioctl(SIOCSIWMODE) and ioctl(SIOCSIFFLAGS) system calls terminating... |
hcxdumptool requested the frequency from the driver by ioctl() call and the driver respond with 0. It looks like this can be done via NETLINK, only. This is a No-Go (asynchronous and additional dependency) and hcxdumptool will not work on this driver. I think we can close this issue report, because there is nothing I can do. Please notice, aircrack-ng is working because it use NETLINK (via libnl): BTW: While mt76 (MediaTek) and rt2x00 (Ralink) drivers are (well maintained) stock kernel drivers: |
Thank you for your feedback , Thanks again for your excellent support. |
Both drivers are part of the stock kernel and well maintained. |
Thank you so much and thanks again for your excellent support. |
Hello ,
I am getting the below error , can you please help
└─$ sudo hcxdumptool -i wlan0 -C
initialization of hcxdumptool 6.2.7-17-g87fcd83 (depending on the capabilities of the device, this may take some time)...
interface is already in monitor mode, skipping ioctl(SIOCSIWMODE) and ioctl(SIOCSIFFLAGS) system calls
wlan0 available frequencies, channels and tx power reported by driver:
driver doesn't support/allow frequency scan (reported exponent: 1, reported frequency: 0)
terminating...
I am using the below driver :
Bus 001 Device 002: ID 2357:0120 TP-Link Archer T2U PLUS [RTL8821AU]
Thanks
The text was updated successfully, but these errors were encountered: