crosh 'packet_capture' doesn't work for OTA monitoring |
|||
Issue descriptioncrosh's 'packet_capture' command allegedly works for OTA monitor mode captures, but it fails like this: crosh> packet_capture --frequency 5745 Shutting down interface wlan0 so we can perform monitoring. You may need to disable, then re-enable WiFi to use this interface again normally again. command failed: Device or resource busy (-16) Shutting down interface wlan0 so we can perform monitoring. You may need to disable, then re-enable WiFi to use this interface again normally again. command failed: Device or resource busy (-16) Could not find a device to monitor 5745 MHz. It is likely that none of your wireless devices are capable of monitor-mode. Looks like we're failing to enable the monitor-mode interface before trying to set the frequency: # iw dev phy0_mon set freq 5745 command failed: Device or resource busy (-16)
,
Feb 3 2017
Monitor-mode support is device specific. Some drivers/firmware support it, while others do not. IIRC, the only Wifi device that we have monitor mode working on is ath9k.
,
Feb 3 2017
I'm testing it on iwl7000 w/ samus as we speak. Seems to work.
,
Feb 3 2017
@1: Did you read the help description? (e.g., 'help packet_capture') This is mostly noted there, although I guess it doesn't describe each option in detail. But also, this is dev-mode only, so I'm not sure how user friendly it needs to be. But you are free to improve the help description if you'd like. Also, for the record: https://chromium-review.googlesource.com/#/c/437584/ debugd: capture_utility: bring up monitor-mode interface before using https://chromium-review.googlesource.com/#/c/437625/ debugd: add iw and ip dependencies https://chromium-review.googlesource.com/#/c/437747/ debugd: capture_utility: stop using 'ifconfig' https://chromium-review.googlesource.com/#/c/437748/ debugd: netif: stop referring to ifconfig
,
Feb 3 2017
@3: Glad to hear it! Thanks.
,
Feb 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/3f89c2039c468d88245abb2c46aeef83774c41ca commit 3f89c2039c468d88245abb2c46aeef83774c41ca Author: Brian Norris <briannorris@chromium.org> Date: Mon Feb 06 22:50:33 2017 debugd: capture_utility: bring up monitor-mode interface before using crosh> packet_capture --frequency 5745 Shutting down interface wlan0 so we can perform monitoring. You may need to disable, then re-enable WiFi to use this interface again normally again. command failed: Device or resource busy (-16) Shutting down interface wlan0 so we can perform monitoring. You may need to disable, then re-enable WiFi to use this interface again normally again. command failed: Device or resource busy (-16) Could not find a device to monitor 5745 MHz. It is likely that none of your wireless devices are capable of monitor-mode. A trace of the shell script shows that it's this command that fails: # iw dev phy0_mon set freq 5745 command failed: Device or resource busy (-16) Apparently, we're not allowed to set the frequency on a disabled network interface. If we simply bring it up (e.g., with 'ip link set XXX up') before trying to use it, then everything works fine. BUG= chromium:688469 TEST=`packet_capture --frequency XXXX` in crosh; helpers/capture_utility_test.sh Change-Id: I864ae1f820a259b408ad686fcab4b2432e048651 Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/437584 Reviewed-by: Ben Chan <benchan@chromium.org> Reviewed-by: Kirtika Ruchandani <kirtika@chromium.org> [modify] https://crrev.com/3f89c2039c468d88245abb2c46aeef83774c41ca/debugd/src/helpers/capture_utility_test.sh [modify] https://crrev.com/3f89c2039c468d88245abb2c46aeef83774c41ca/debugd/src/helpers/capture_utility.sh
,
Feb 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/1ec00f495d2ff6c2c3e2eb1c8e48165497482bc8 commit 1ec00f495d2ff6c2c3e2eb1c8e48165497482bc8 Author: Brian Norris <briannorris@chromium.org> Date: Tue Feb 07 00:40:56 2017 debugd: capture_utility: stop using 'ifconfig' It's been deprecated for practically forever. Let's do our part to kick the habit, I guess? BUG= chromium:688469 TEST=helpers/capture_utility_test.sh Change-Id: I9b87b4461f71f0a93aa5d4bb698dab49be1a0b4e Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/437747 Reviewed-by: Ben Chan <benchan@chromium.org> [modify] https://crrev.com/1ec00f495d2ff6c2c3e2eb1c8e48165497482bc8/debugd/src/helpers/capture_utility_test.sh [modify] https://crrev.com/1ec00f495d2ff6c2c3e2eb1c8e48165497482bc8/debugd/src/helpers/capture_utility.sh
,
Feb 7 2017
Looks like it should work now (for some definition of work; it's still a little bit finicky if your Wifi is currently in used. But hey, it's a dev-mode feature).
,
Jan 22 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by kirtika@chromium.org
, Feb 3 2017