Closed joshschmelzle closed 2 years ago
Added in 5c621d776ab792b66cc42fe3be4b5288cc3ec94a.
Example:
2021-11-11 15:44:05,571 [INFO] interface: run: iw phy1 interface add wlan1mon type monitor flags none
2021-11-11 15:44:05,594 [INFO] interface: command failed: Operation not supported (-95)
2021-11-11 15:44:05,595 [ERROR] start: problem interface staging ... exiting ...
Traceback (most recent call last):
File "/home/wlanpi/dev/wlanpi-profiler/profiler/manager.py", line 176, in start
__iface.stage_interface()
File "/home/wlanpi/dev/wlanpi-profiler/profiler/interface.py", line 228, in stage_interface
raise InterfaceError(f"{self.name} does not appear to support monitor mode")
profiler.interface.InterfaceError: wlan1 does not appear to support monitor mode
^CDetected SIGINT or Control-C ... Removing monitor interface ...
2021-11-11 15:44:33,261 [INFO] interface: run: ip link set wlan1mon down
2021-11-11 15:44:33,299 [INFO] interface: run: iw dev wlan1mon del
2021-11-11 15:44:33,323 [INFO] interface: run: ip link set wlan1 up
Exiting ...
If we have a problem with setting the device in monitor mode, we should stop and tell the user.
Here is an example trying to set wlan0 in monitor mode when the host is a Wi-Fi based CM4:
Currently, we ignore the command failed error and the profiler processes are started. At this point, scapy errors out making it look like an error with scapy, when it is an interface error instead: