capture_scan
Run a live Wi-Fi packet capture on selected channels and return a dissected summary of access points and frame types, including security and signal details.
Instructions
Run a live streaming Wi-Fi packet capture and return what was on the air.
This is a streaming capture: it captures real 802.11 frames off the air (unlike scan_wlan, which asks the driver for a scan), so it reports what is actually being transmitted. The call blocks for duration_s seconds and returns a dissected summary. The raw pcapng is also saved on the device and its path returned in 'pcap_path' (fetch it with fetch_pcap_file to verify the summary against the frames). For a capture longer than the 60 s window, use the non-streaming file-capture tools (start_pcap_file/fetch_pcap_file) instead.
The result has two parts:
'aps': one row per BSSID from beacons/probe-responses, with SSID, channel, signal, 802.11 amendments, advertised TX power, full security detail — the compact 'security' label plus 'akm' (the AKM suite list), 'pairwise_ciphers', 'group_cipher' and 'pmf' — and, when the AP advertises a QBSS/BSS Load element, 'stations' (the associated client count) and 'channel_utilization' (percent).
'frames' / 'frame_types': every frame's named type/subtype counted exactly in 'frame_types', plus up to max_frames per-frame records in 'frames'. Each record has the source/destination addresses (addr1..addr4), a full radiotap decode, and — for the frames that carry one — a decoded 'result': authentication algorithm+status, association status+AID, deauth/disassoc reason, or probe/assoc SSID.
The capture is owned by this call and is stopped before it returns. If another application is already capturing on the interface, this tool subscribes to that capture read-only instead of failing; the result always says whether the role was 'owner' or 'subscriber' and reports the running config.
Single-radio caveat: where the capture interface shares a radio with the managed wlan0, channel changes fail while wlan0 scans. Any such failures come back in 'channel_issues' — treat those results as partial rather than complete.
Args: interface: Monitor-mode capture interface, always named 'wlanpiN' (e.g. 'wlanpi0'), not 'wlan0'. Use get_network_interfaces or get_capture_channels to see what exists on this device. channels: Channel numbers to hop (e.g. [1, 6, 11, 36]); 6 GHz can be given as explicit frequencies in MHz. Omit to hop every channel the adapter supports. width: Channel width in MHz: 20, 40, 80 or 160. dwell_ms: Milliseconds to dwell on each channel (50-60000). duration_s: How long to capture, 1-60 seconds. The tool call blocks for this whole window. pcap_filter: Optional BPF/pcap filter, e.g. 'type mgt subtype beacon'. max_frames: Cap on per-frame records returned in 'frames'; per-kind counts in 'frame_types' are always exact. Set 0 to skip the per-frame records and get only the AP table and counts, or a negative value for no cap (every frame — a busy capture can then return tens of thousands of records, so use the file-capture tools for a full pcap instead). Beacons dominate a busy capture, so a pcap_filter such as 'not type mgt subtype beacon' makes the record list focus on the control/data/auth exchanges.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| channels | No | ||
| dwell_ms | No | ||
| interface | No | wlanpi0 | |
| duration_s | No | ||
| max_frames | No | ||
| pcap_filter | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||