Здраствуйте! Я использую manjaro linux. (поставил 5.2.21-rt15-MANJARO (поставил поменьше версию ядра))
Купил сегодня TL-WN722N v3, вставил wi-fi работает.
Установил драйвера rtl8188eus-5.3.9 перезагрузил.
Запустил IWCONFIG
Код:
[alakir@E5-pc ~]$ iwconfig
lo no wireless extensions.
wlp0s20f0u4 IEEE 802.11bgn ESSID:"SweetHome" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:2.412 GHz Access Point: 6C:3B:6B:55:79:0B
Bit Rate:150 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=95/100 Signal level=34/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
wlp3s0 IEEE 802.11 ESSID:"SweetHome"
Mode:Managed Frequency:2.412 GHz Access Point: 6C:3B:6B:55:79:0B
Bit Rate=1 Mb/s Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=34/70 Signal level=-76 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:28 Missed beacon:0
enp4s0f1 no wireless extensions.
Затем стал пытаться увидеть свой wi-fi в airodump-ng
Моя последовательность действий:
Остановил NetworkManager и wpa_applicant потому что они постоянно запускались заного.
Код:
sudo systemctl stop NetworkManager
sudo systemctl stop wpa_supplicant
Запустил проверку
airmon-ng check kill
Код:
[alakir@E5-pc ~]$ sudo airmon-ng check kill
Killing these processes:
PID Name
708 avahi-daemon
722 avahi-daemon
Затем:
1. Сначала пытался запустить сразу
sudo airmon-ng start wlp0s20f0u4
На что получил ошибку:
Код:
PHY Interface Driver Chipset
phy1 wlp0s20f0u4 rtl8188eu TP-Link TL-WN722N v2
Newly created monitor mode interface wlp0s20f0u4mon is *NOT* in monitor mode.
Removing non-monitor wlp0s20f0u4mon interface...
WARNING: unable to start monitor mode, please run "airmon-ng check kill"
Затем перезагрузил пк, повторил все действия и перед запуском перевел интерфейс в режим монитора:
Код:
[alakir@E5-pc ~]$ sudo ifconfig wlp0s20f0u4 down
sudo iwconfig wlp0s20f0u4 mode monitor
sudo iwconfig wlp0s20f0u4 up
На что получил ошибку:
PHY Interface Driver Chipset
phy1 wlp0s20f0u4 rtl8188eu TP-Link TL-WN722N v2
Error setting channel: command failed: Device or resource busy (-16)
Error -16 likely means your card was set back to station mode by something.
Removing non-monitor wlp0s20f0u4 interface…
You already have a wlp0s20f0u4 device but it is NOT in station mode.
Whatever you did, don’t do it again.
Please run «iw wlp0s20f0u4 del» before attempting to continue
Я не знаю что еще можно сделать, прошу пожалуйста помогите!
Код:
[alakir@E5-pc ~]$ lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 02)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1d.2 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #11 (rev f1)
00:1d.3 PCI bridge: Intel Corporation Device 9d1b (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 3D controller: NVIDIA Corporation GM107 [GeForce 940MX] (rev a2)
03:00.0 Network controller: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter (rev 31)
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader (rev 01)
04:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
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
Closed
ZeroChaos- opened this issue
Nov 26, 2019
· 11 comments
Comments
excerpt from airmon-ng start output
++ iw dev 036ac2 set channel 10
+ IW_ERROR='command failed: Device or resource busy (-16)'
+ '[' -n 'command failed: Device or resource busy (-16)' ']'
+ printf 'nError setting channel: command failed: Device or resource busy (-16)n'
Error setting channel: command failed: Device or resource busy (-16)
+ printf 'command failed: Device or resource busy (-16)'
+ grep -q '(-16)'
+ printf 'Error -16 likely means your card was set back to station mode by something.n'
Error -16 likely means your card was set back to station mode by something.
The card is in fact not in station mode, it is in monitor mode but set channel still doesn’t work.
setting by freq also appears to not work
mammon ~ # iw dev 036ac2 set freq 2412
command failed: Device or resource busy (-16)
mammon ~ # iw dev 036ac2 set freq 2412 HT20
command failed: Device or resource busy (-16)
setting via wext appears to work fine
mammon ~ # iwconfig 036ac1 channel 1
mammon ~ # iwconfig 036ac1 channel 2
Noted. Will have a look this weekend
@kimocoder do you remember my mails, a few weeks ago (screenshot with airodump-ng and hcxdumtool in terminal 1 and iw output in terminal 2)? iw set (virtual) monitor mode by NETLINK MESSAGES, but running ioctl() system calls (e.g. to change frequency) failed. I noticed that behavior on both drivers (rtl8812au and rtl8188eus).
And I’ve noticed that behavior vice versa. iw show manged, but interface is in monitor mode (in this case monitor mode was set by hcxdumptool). I think I have sent this screenshot (screenshot with airodump-ng and hcxdumtool in terminal 1 and iw output in terminal 2), too.
In my opinion NETLINK is not a good choice to set monitor mode:
#476 (comment)
I think I might be hitting this issue as well. This is on a Raspberry Pi3+, running Raspbian Buster.
I’ve successfully installed the latest branch of the rtl8812au driver:
git clone https://github.com/aircrack-ng/rtl8812au.git
cd rtl8812au
sed -i ' s/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile
sed -i 's/^dkms build/ARCH=arm dkms build/' dkms-install.sh
sed -i 's/^MAKE="/MAKE="ARCH=arm /' dkms.conf
sudo ./dkms-install.sh
However, when I try to start a new monitoring interface, I get a «Device or resource busy (-16)» message:
$ sudo airmon-ng check kill
Killing these processes:
PID Name
323 wpa_supplicant
403 wpa_supplicant
422 wpa_supplicant
530 dhcpcd
$ sudo airmon-ng start wlan1
PHY Interface Driver Chipset
phy0 wlan0 brcmfmac Broadcom 43430
phy1 wlan1 88XXau Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter
(monitor mode enabled)
Error setting channel: command failed: Device or resource busy (-16)
Error -16 likely means your card was set back to station mode by something.
Removing non-monitor wlan1 interface...
Any ideas what’s going on?
I wrote airmon-ng so I can say that the first comment from me shows exactly what is going on, and that is that channel setting doesn’t work with iw and that is expected. it does work with iwconfig, so you can just «iwconfig wlan1 mode monitor» and it «works» if you want. This bug is requesting that channel control via iw be fixed/implemented.
The best and most reliable version I’ve tested is still 5.2.20 branch. I just completed some basic tests of it yesterday and it was working well.
Again, this bug is specific to requesting nl80211 channel setting support.
I’ll take a look. The TODO is pretty full, one more things on the list is find out where the frame injection code (and iterator) wen’t after adding it to v5.2.20(.2), Realtek hided it somewhere, and it’s unstable. I just need to diff branch v5.2.20 versus v5.3.4 and see what they did with it then I’m game
Great, thanks. Than we can take the «modified/new» code for rtl8188eus, too, because they are very similar.
Yes they’re basicly the same sort of 👍
Unfortunately, I have not found out, yet, why the initialization process of the device is different, when we use NL80211_IFTYPE_MONITOR (done by iw via NETLINK)
instead of IW_MODE_MONITOR (done by iwconfig and hcxdumptool)
If that failed, we’re going back to IW_MODE_MASTER.
Channel setting works with «iw» now, BUT.. the «iw dev channel switch» doesn’t work though.
Closing this, setting the channel is operative, but switching seems off (unsure, barely tested here).
As already written above, the output of your command is always the same, and the if condition there is always truefalse (thanks @Trilby for pointing out).
philipW wrote:
What do you mean with using the exit code?
Each process returns a numeric value when it finishes executing. It is used as an indicator for the parent process, typically to inform it whether it has terminated successfully or an error has occured. The convention is to return 0 on success, and a non-zero value if an error occurred.
-
You can test this by running e.g. ls, then echo $? (to print the exit code of the previous command): this will print 0, since ls completed successfully.
-
OTOH, if you run ls -E (which fails, because -E is not a valid option), then echo $? will print 2, which is ls’ error code to indicate «invalid command line option» (I assume).
The same is true for most (well written) programs: they will return a non-zero exit code if an error occurred (such as in your case, ifconfig if it can’t find the device).
This can be used in shell scripts: if and while run a given clause only if the command given as argument returns 0:
if {command}; then
# code
fi
This will only execute #code if {command} returns 0. In your case, you could use your ifconfig command there, and if it returns success, you know that the device exists.
Side note: The [ … ] often used in conjunction with conditionals like if and while is really also just a program. [ is an alternative command name for test, which takes some arguments and returns success or failure depending on whether a given condition is met. So
[ a = a ] # returns 0, same as `test a = a`
[ b = c ] # returns 1, same as `test b = c`
Furthermore, true and false are just commands that always return 0 or 1, respectively; the following will thus run forever (since true is supposed to always return 0):
while true; do
# code
done
Last edited by ayekat (2018-12-11 15:49:36)
{,META,RE}PKGBUILDS │ pacman-hacks (includes makemetapkg and remakepkg) │ dotfileslocaldir
I can’t get monitor mode to work on my Raspberry Pi Compute Module 4:
sudo aireplay-ng --test mon0 09:35:59 Trying broadcast probe requests... 09:36:01 No Answer... 09:36:01 Found 0 APs
Some information:
RPi: Raspberry Pi Compute Module 4
hostnamectl
...
Operating System: Raspbian GNU/Linux 10 (buster)
Kernel: Linux 5.4.51-v7l+
Architecture: arm
After turning on the RPi, I run the following commands:
sudo su cd /home/pi/nexmon/ source setup_env.sh cd patches/bcm43455c0/7_45_206/nexmon make install-firmware iw phy `iw dev wlan0 info | gawk '/wiphy/ {printf "phy" $2}'` interface add mon0 type monitor ifconfig mon0 up
But when i run airodump-ng mon0 -c 6, nothing happens:
airodump-ng mon0 -c 6
CH 6 ][ Elapsed: 0 s ][ 2021-06-23 09:31 ][ fixed channel mon0: -1
BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID
BSSID STATION PWR Rate Lost Frames Probe
airodump-ng mon0 -c 6 --ig
CH 6 ][ Elapsed: 21 s ][ 2021-06-23 09:32
BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID
BSSID STATION PWR Rate Lost Frames Probe
No error, but monitor mode detects nothing. It is the same for airodump-ng mon0.
When I run the same command on my computer (sudo iw phy phy0 interface add mon0 type monitor; airmon-ng check kill; airodump-ng mon0 -c 6), it detects several networks, so I should no be too far away to detect anything.
I have tried to wait for a longer period of time, but still nothing. I have also tried to use airmon-ng check kill, but it did not help.
Additional info:
iw dev phy#1 Interface mon0 ifindex 6 wdev 0x100000003 addr dc:a6:32:fe:ec:3d type monitor Interface wlan0 ifindex 5 wdev 0x100000001 addr dc:a6:32:fe:ec:3d type managed
ip addr show mon0 6: mon0: <BROADCAST,ALLMULTI,PROMISC,NOTRAILERS,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000 link/ieee802.11/radiotap dc:a6:32:fe:ec:19 brd ff:ff:ff:ff:ff:ff
sudo airmon-ng PHY Interface Driver Chipset phy1 mon0 brcmfmac Broadcom 43430 phy1 wlan0 brcmfmac Broadcom 43430
sudo airmon-ng start mon0 PHY Interface Driver Chipset phy1 mon0 brcmfmac Broadcom 43430 Error setting channel: command failed: Device or resource busy (-16) Error -16 likely means your card was set back to station mode by something. Removing non-monitor mon0 interface... WARNING: unable to start monitor mode, please run "airmon-ng check kill"
I have already used airmon-ng check kill, so it returns nothing. Before I used it, it returned this:
sudo airmon-ng check Found 5 processes that could cause trouble. Kill them using 'airmon-ng check kill' before putting the card in monitor mode, they will interfere by changing channels and sometimes putting the interface back in managed mode PID Name 387 avahi-daemon 405 wpa_supplicant 418 avahi-daemon 565 dhcpcd 3518 wpa_supplicant
sudo airmon-ng start wlan0 PHY Interface Driver Chipset phy1 mon0 brcmfmac Broadcom 43430 phy1 wlan0 brcmfmac Broadcom 43430 Error setting channel: command failed: Device or resource busy (-16) Error -16 likely means your card was set back to station mode by something. Removing non-monitor mon0 interface... WARNING: unable to start monitor mode, please run "airmon-ng check kill"
iwconfig
eth0 no wireless extensions.
mon0 IEEE 802.11 Mode:Monitor
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
eth1 no wireless extensions.
wlan0 IEEE 802.11 ESSID:off/any
Mode:Managed Frequency:2.437 GHz Access Point: Not-Associated
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
lo no wireless extensions.
Hello All ...
I setup a Raspberry PI 4 with Ubuntu. I'm attempting to use wifite and getting the error: Exception: Cannot find any interfaces in monitor mode. It appears that a service is holding things up. I could be wrong. The service is avahi-daemon. Please let me know what all you need to help me out. What I do have is listed below. Appologises in advance. I'm not sure how to add code and such to this post. Thank you in advance.
. .
.´ · . . · . wifite2 2.5.2`
: : : (¯) : : : a wireless auditor by u/derv82
. · ` /¯ ´ · .´ maintained by kimocoder`
/¯¯¯ ´[https://github.com/kimocoder/wifite2`](https://github.com/kimocoder/wifite2)
[!] Warning: Recommended app bully was not found. install @ https://github.com/aanarchyy/bully
[!] Warning: Recommended app pyrit was not found. install @ https://github.com/JPaulMora/Pyrit/wiki
[!] Warning: Recommended app hashcat was not found. install @ https://hashcat.net/hashcat/
[!] Warning: Recommended app hcxdumptool was not found. install @ https://github.com/ZerBea/hcxdumptool
[!] Warning: Recommended app hcxpcaptool was not found. install @ https://github.com/ZerBea/hcxtools
[!] Warning: Recommended app macchanger was not found. install @ apt-get install macchanger
[!] Conflicting processes: avahi-daemon (PID 2735), avahi-daemon (PID 2740)
[!] If you have problems: kill -9 PID or re-run wifite with --kill
Interface PHY Driver Chipset
-----------------------------------------------------------------------
1. wlan0 phy0 brcmfmac Broadcom 43430
2. wlan1 phy1 rtl88x2bu Realtek Semiconductor Corp.
[+] Select wireless interface (1-2): 2
[+] enabling monitor mode on wlan1... failed
failed
[!] Error: Cannot find any interfaces in monitor mode
[!] Full stack trace below
[!] Traceback (most recent call last):
[!] File "/usr/lib/python3/dist-packages/wifite/__main__.py", line 97, in entry_point
[!] wifite.start()
[!] File "/usr/lib/python3/dist-packages/wifite/__main__.py", line 50, in start
[!] Configuration.get_monitor_mode_interface()
[!] File "/usr/lib/python3/dist-packages/wifite/config.py", line 163, in get_monitor_mode_interface
[!] cls.interface = Airmon.ask()
[!] File "/usr/lib/python3/dist-packages/wifite/tools/airmon.py", line 330, in ask
[!] iface.interface = Airmon.start(iface)
[!] File "/usr/lib/python3/dist-packages/wifite/tools/airmon.py", line 204, in start
[!] raise Exception('Cannot find any interfaces in monitor mode')
[!] Exception: Cannot find any interfaces in monitor mode
[!] Exiting
---
eich@firestar:~$ sudo airmon-ng start wlan1
Found 2 processes that could cause trouble.
Kill them using 'airmon-ng check kill' before putting
the card in monitor mode, they will interfere by changing channels
and sometimes putting the interface back in managed mode
PID Name
2735 avahi-daemon
2740 avahi-daemon
PHY Interface Driver Chipset
phy0 wlan0 brcmfmac Broadcom 43430
phy1 wlan1 rtl88x2bu Realtek Semiconductor Corp.
Error setting channel: command failed: Device or resource busy (-16)
Error -16 likely means your card was set back to station mode by something.
Removing non-monitor wlan1 interface...
You already have a wlan1 device but it is NOT in station mode.
Whatever you did, don't do it again.
Please run "iw wlan1 del" before attempting to continue
eich@firestar:~$ iw wlan1 del
command failed: Operation not permitted (-1)
—
I out my device into monitor mode with these commands. It’s the only thing that works.
sudo ifconfig wlan1 down
sudo iwconfig wlan1 mode monitor
sudo ifconfig wlan1 up
Доброе утро,подскажите,пжлст,как узнать какой процесс возвращает режим монитора обратно ?
вот ошибка : Error setting channel: command failed: Device or resource busy (-16)
Error -16 likely means your card was set back to station mode by something.
Removing non-monitor wlo1 interface…
(monitor mode disabled)
russian
programming
software
it
linux
8
ответов
Dimitry
аирмон старт делал
дистрибутив?
любой менеджер сети может этим заниматься
ну например networkmanager
Dimitry
так перед этим был чек килл
знать не знаю кто такой этот ваш
но жив ли nm лучше проверить
линух — ядро, дистрибутив ты не назвал
