Two tutorials that run on their own or together. wifi-inject makes one radio send 802.11 frames you build field by field: type, rate or MCS, width, guard interval, size, count. wifi-sniff puts any number of radios, on any number of nodes, into monitor mode at the same time and describes everything they hear, down to the signal on each receive chain. Run both and the sniffer scores every injected stream: what arrived, at which PHY, how strong, and what was lost.
grid from the released package cosmos-experiments-wifi-monitor 0.1.0-2 (sniff ansible + inject manual, PASS, 4800 frames) and the release content (both pairings, PASS), evidence evidence/wifi-trio-grid-20261108/; 2026-11-07 on grid (current defaults: ansible and manual modes of both tutorials, channel 6 and channel 36 at 40 MHz, seven radio types on four nodes); 2026-11-06 on sb5, sb4, sb6 and sb7, image baseline.ndz: the ansible and manual modes of both tutorials on all four, parity on sb5, 2.4 GHz channel 6 everywhere and 5 GHz channel 36 at 40 MHz on sb5. The wifi-sniff notebook ran under papermill on both shipped samples and on a two-radio run. Evidence: evidence/wifi-monitor-grid-20261107/, evidence/wifi-monitor-sb5-20261106/ and evidence/wifi-monitor-sb4-sb6-sb7-20261106/ in cosmos-orchestration.A Wi-Fi card normally hides the air from you: it joins one network, filters what is not addressed to it, and decides the rate itself. In monitor mode the card does none of that. It hands every frame it can decode to the kernel with a radiotap header in front: the receiver's own record of the frequency, rate or MCS, signal per antenna, and whether the checksum was good. In the other direction the same interface accepts a frame you built, radiotap header and all, and sends it. That is injection.
These tutorials are about what is in a frame and what a radio does with it. The tools are short Python programs that build and parse the bytes themselves, with the standard library only, so every field on this page can be traced to a line of code.
iw phy), and why it may still refuse: regulatory "no IR" and radar (DFS) channels.| Where | any domain with Wi-Fi nodes (Wi-Fi nodes in the inventory (2026-11-08): grid (about 200), sb4 (9, on the RF matrix), sb5, sb6, sb7 (2 each). bed, sb2, sb9, minicity and osc have none, and cosmos-tutorial check refuses there); run on sb4, sb5, sb6, sb7 and grid (see Where the frames go) |
| Nodes | one to send, one or more to listen (or one node with two radios) |
| Image | baseline.ndz |
| Radio | 2.4 and 5 GHz, monitor mode; transmits only in wifi-inject |
| Time | under 2 minutes per run |
| Results | contract.json, a pcap and a summary.json per radio; two sample captures ship with the package |
| Domains | any domain - the node checks below decide |
| Nodes | 1 or more (the first sends, unless inject_node names another), named in OMF_NODES |
| On the console | python3, ansible-playbook, ssh, tar |
cosmos-tutorial check wifi-inject verifies, on each node:
| Domains | any domain - the node checks below decide |
| Nodes | 1 or more (every node listens, unless sniff_nodes lists some), named in OMF_NODES |
| On the console | python3, ansible-playbook, ssh, tar |
cosmos-tutorial check wifi-sniff verifies, on each node:
Load the image on the nodes, then power them on: omf load leaves every node off.
omf tell on -t node1-1,node1-2
omf load -t node1-1,node1-2 -i baseline.ndz -r 0
omf tell on -t node1-1,node1-2
Check where your radios are before you transmit. On sb5, sb6 and sb7 the Wi-Fi radios hear the building's own network, and sb6 and sb7 hear each other, so what you send reaches people who are not part of your experiment. Keep counts small, use your own SSID (the default is cosmos-inject), and leave probe_req out: real access points answer it. On sb4 the radios are cabled to the RF matrix and hear nothing else at all; see Where the frames go.
| Sandbox | Wi-Fi radios | Path between nodes |
|---|---|---|
sb4 |
AR928X + Intel 6250 on node1-3 to node1-6 (node1-7, node1-8 have none) |
cabled through the RF matrix only: node1-N's card is on matrix port N when that port's switch is at position 1. With every attenuator at 63 dB the radios heard nothing, not even the building. |
sb5 |
AR928X + Intel 6250 on both nodes | over the air; the building's network is audible at about -88 dBm |
sb6 |
AR928X + Intel 6250 on both nodes | over the air; the building and sb7 are audible |
sb7 |
AR928X + Atheros AR5413 (ath5k) on both nodes |
over the air; the building and sb6 are audible |
grid |
mixed: AR928X, AR922X, Intel 6250 and 7260, ath5k, carl9170 and rt2800usb (USB), one to three per node; cosmos-tutorial checks list them |
over the air across the room; channel 6 carries 11-19 other networks, so delivery there stays below 1.0 even at strong signal |
On sb4, set the attenuator between the two ports first, for example ports 4 and 5 for node1-4 and node1-5:
curl -s -X POST -H "Content-Type: application/json" -d '{"portA":4,"portB":5,"att":20}' \
http://am-rt1.cosmos-lab.org:5054/rfmatrix/set
curl -s http://am-rt1.cosmos-lab.org:5054/rfmatrix/status # switches and attenuators
Put it back to 63 dB when you finish.
The tutorials are installed on the console. There is nothing to download. The code is in /usr/share/cosmos-experiments/wifi-inject/ and /usr/share/cosmos-experiments/wifi-sniff/, and the programs that run on the nodes are in their node/ subdirectories; each run copies them to the nodes. To change anything, cosmos-tutorial copy wifi-inject (or wifi-sniff) puts an editable copy in the current directory, and cosmos-tutorial run uses it in place of the installed one.
Listen first, in one terminal:
cosmos-tutorial check wifi-sniff
cosmos-tutorial run wifi-sniff # ansible
cosmos-tutorial run wifi-sniff --mode manual # manual
cosmos-tutorial jupyter wifi-sniff # jupyter
cosmos-tutorial run wifi-sniff --mode parity # parity
cosmos-tutorial run wifi-sniff --mode teardown # teardown
Then send, in another, while the capture runs (sniff_duration_s, 60 s by default). The capture must outlast the injection: with the defaults, 24 streams of 100 frames 5 ms apart take 12 s, plus about 30 s for the run to start.
cosmos-tutorial check wifi-inject
cosmos-tutorial run wifi-inject # ansible
cosmos-tutorial run wifi-inject --mode manual # manual
cosmos-tutorial run wifi-inject --mode parity # parity
cosmos-tutorial run wifi-inject --mode teardown # teardown
OMF_NODES names the nodes: the first one sends unless inject_node says otherwise, and every node listens unless sniff_nodes lists some. By default every radio of the sending node sends in turn and every radio of every listening node listens; a radio that cannot do what was asked is skipped and the report says why. On one node with two radios, set inject_radio: ath9k and sniff_radios: [iwlwifi]. inject_rates, inject_mcs and inject_vht_mcs default to auto: each radio sends the rates it offers on the channel's band. A list is taken literally, and a radio that cannot send it is refused.
The tools also run by hand on a node, after any run has copied them there:
ssh root@node1-1
cd /var/tmp/cosmos/wifi-monitor/bin
./wifi-inject --list
./wifi-inject --radio ath9k --channel 36 --width 40 --sgi --type data beacon \
--rate 6 54 --mcs 0 7 15 --size 100 1500 --count 100
./wifi-inject --dry-run --type beacon --rate 6 # build and decode, send nothing
./wifi-sniff --radio iwlwifi --channels 1 6 11 36 149 --dwell 2 --duration 60
python3 wifi_stats.py summary /var/tmp/wifi-sniff/<time>/capture.pcap
Change any of these with cosmos-tutorial run wifi-inject --params my.yml. An unknown key or a wrong type is refused. cosmos-tutorial params wifi-inject prints the file.
| Key | Default | Meaning |
|---|---|---|
inject_node |
`` | Where to send from. "" = the first node of OMF_NODES. |
inject_radio |
all |
Which radio: an index, a phy name, a driver (ath9k, iwlwifi, ath10k_pci...), or "all" for every radio of the node in turn, each with its own streams. |
inject_channel |
6 |
Channel and width. 2.4 GHz: 1-11. 5 GHz: 36-48 and 149-165; the radar (DFS) channels 52-144 are refused for transmission, and so is any channel the radio lists as "no IR". |
inject_width |
20 |
20, 40 (HT40, paired automatically), 80, 160 |
inject_types |
data, qos_data, beacon, rts |
What to send. |
inject_rates |
auto |
"auto" = what each radio offers on the channel's band: legacy 1, 6, 24, 54 Mb/s (no 1 Mb/s at 5 GHz), HT MCS 0 and 7 if the radio has HT, VHT MCS 0 and 7 if it has VHT at 5 GHz. |
inject_mcs |
auto |
or a list of HT MCS 0-31 (8 per spatial stream); [] for none |
inject_vht_mcs |
auto |
or a list of VHT MCS 0-9; [] for none |
inject_nss |
1 |
VHT spatial streams |
inject_sgi |
False |
short guard interval (HT/VHT) |
inject_ldpc |
False |
|
inject_sizes |
300 |
MAC frame bytes including the FCS |
inject_count |
100 |
frames per stream |
inject_interval_ms |
5 |
300 bytes at 1 Mb/s take 2.6 ms on air: keep this above that |
inject_dst |
ff:ff:ff:ff:ff:ff |
broadcast is never acknowledged; a unicast address makes data frames wait for an ACK |
inject_ssid |
cosmos-inject |
in beacons and probe responses |
inject_tid |
0 |
QoS frames |
inject_retries |
`` | hardware retries for unicast frames; null = the driver's |
inject_regdomain |
US |
Change any of these with cosmos-tutorial run wifi-sniff --params my.yml. An unknown key or a wrong type is refused. cosmos-tutorial params wifi-sniff prints the file.
| Key | Default | Meaning |
|---|---|---|
sniff_nodes |
`` | Where to listen. "" = every node of OMF_NODES. |
sniff_radios |
all |
Which radios on each node: indexes, phy names or drivers (ath9k, iwlwifi, ath10k_pci...), or [all]. |
sniff_channels |
6 |
One channel listens there; several hop between them, sniff_dwell_s each. |
sniff_dwell_s |
1.0 |
|
sniff_width |
20 |
20, 40, 80, 160: a 20 MHz receiver cannot decode wider frames |
sniff_duration_s |
60 |
must outlast a wifi-inject run started meanwhile |
sniff_flags |
fcsfail, control, otherbss |
Monitor flags: fcsfail keeps frames with a bad checksum, plcpfail those with a bad PHY header, control keeps RTS/CTS/ACK, otherbss frames of other networks. |
sniff_filter |
`` | BPF, e.g. "type mgmt subtype beacon" or "wlan addr2 02:43:4f:01:01:00" |
sniff_snaplen |
0 |
bytes kept per frame; 0 = all |
sniff_jsonl |
False |
also write one decoded frame per line |
sniff_expect |
auto |
Score delivery of frames sent by wifi-inject. "auto" uses every wifi-inject run that finished during this capture (from ~/cosmos-runs/wifi-inject), "" none, or a path to a wifi-inject run directory. |
sniff_regdomain |
US |
wifi-inject --list and wifi-sniff --list read each radio's capabilities from the kernel (iw phy <phy> info), not from the inventory:
0 phy0 ath9k 168c:002a bands=2.4(11ch),5(24ch) phy=ht monitor=yes antennas=2
1 phy1 iwlwifi 8086:0087 bands=2.4(11ch),5(24ch) phy=ht monitor=yes antennas=?
Behind each line is a frequency list in which every channel carries regulatory flags. On the AR928X, channel 36 is open and channel 52 says no IR, radar detection: the radio may listen there but must not start a transmission, because 52-144 are shared with radar. The Intel 6250 lists every 5 GHz channel as no IR, so it can listen at 5 GHz but never inject there. wifi-inject checks the request against these lists before it sends and refuses with the reason:
radio 1 refused: channel 36 forbids initiating transmission here (no_ir); pick a channel without 'no IR' or radar detection
An injected packet is a radiotap header followed by the MAC frame, without the FCS: the radio computes and appends it. The radiotap header is the instruction to the transmitter. A legacy rate is one byte in half-Mb/s units; an HT MCS is three bytes, known, flags and index. The known byte says which of the others to believe, and the kernel ignores the whole field unless the MCS-index bit (0x02) is set. With that bit missing, every "MCS 7" frame went out at 1 Mb/s and nothing said so; only the sniffer showed it.
The MAC frame starts with the frame control field, whose type and subtype bits make it a beacon, a QoS data frame or an RTS. Data and management frames then carry three addresses and a sequence number. The tutorials send from 02:43:4f:<node>:<radio>, a locally administered address, and put a 23-byte tag in every frame that has a body: run id, stream, sequence and send time. Data frames carry it behind an LLC/SNAP header with the local experimental ethertype 0x88b5, management frames in a vendor-specific element. RTS, CTS, ACK and null frames have no body, so they are counted by address alone.
A QoS data frame from the shipped sample (samples/sb5-ch36-ht40.pcap), as node1-2's AR928X received it:
radiotap 00 00 29 00 version 0, length 0x29 = 41 bytes
2b 40 08 a0 | 20 08 00 a0 | 20 08 00 00 three "present" words: namespace 0, then one per antenna
55 00 6d 00 00 00 00 00 TSFT: the card's microsecond clock, 7 143 509
10 flags: 0x10 = FCS at the end of the frame
00 3c 14 40 01 channel: 0x143c = 5180 MHz (36), flags 0x0140 = OFDM, 5 GHz
c5 signal: -59 dBm (combined)
00 00 00 RX flags
27 05 07 MCS: known 0x27, flags 0x05 = 40 MHz + short GI, index 7
c3 00 c0 01 chain 0: -61 dBm, chain 1: -64 dBm
MAC 88 00 frame control: type 2 (data), subtype 8 (QoS data)
00 00 duration 0: broadcast, nobody acknowledges
ff ff ff ff ff ff address 1, the receiver: broadcast
02 43 4f 01 01 00 address 2, the transmitter: node1-1, radio 0
02 43 4f 01 01 00 address 3, the BSSID
00 00 sequence 0, fragment 0
20 00 QoS control: TID 0, ack policy "no ack"
body aa aa 03 00 00 00 88 b5 LLC/SNAP, ethertype 0x88b5
43 53 4d 53 01 7c 11 e0 a5 1e 00 00 00 00 00 ... the tag: "CSMS", v1, run 7c11e0a5, stream 30, seq 0, send time
FCS 16 77 88 e4 CRC-32 of everything from frame control on: matches
Run python3 wifi80211.py decode samples/sb5-ch36-ht40.pcap 1 to get the same frame as JSON. The notebook (cosmos-tutorial jupyter wifi-sniff) takes the same frame apart cell by cell, needs no reservation on the shipped samples, and reads your own run with run_dir set.
wifi_stats.py walks the pcap once. Frames whose FCS fails are counted as errors on their channel and nowhere else, since none of their fields can be trusted. For every other frame it records type and subtype, PHY, width, guard interval and coding, MAC flags, signal per chain and noise when present, the transmitter, and from beacons and probe responses the network itself: SSID, channel, width from the HT and VHT operation elements, security from the RSN element, standards from the HT, VHT, HE and EHT capability elements, country and load.
Airtime is computed from the PHY and the length. At 1 Mb/s a 300-byte frame takes 192 µs of preamble plus 2 400 µs of payload; at 54 Mb/s, 20 µs plus 12 OFDM symbols of 4 µs. Summed per channel and divided by the time spent there, this gives the channel's utilization.
For tagged frames, the sequence numbers of each stream give received, unique, duplicate and missing frames, and the PHY each frame was actually received at sits beside the PHY that was asked for.
When wifi-sniff hops, it also checks that the radio really went where it was told. iw set channel reports success either way, so the evidence is each frame's own radiotap frequency during each dwell.
Measured 2026-11-06. Unless a table says otherwise, node1-1's AR928X on sb5 sends 100 frames per stream, 5 ms apart, and both radios of node1-2 listen.
What each card offers for each tutorial parameter, as its driver reports it (iw phy <phy> info on baseline.ndz, regulatory domain US, read 2026-11-07 on grid; the AR928X and Intel 6250 also on sb4 to sb6). wifi-inject --list prints the short form on any node. auto and every check in the tools work from exactly these values, so a parameter a card does not offer is skipped (auto, all) or refused (a value you set).
| Parameter | AR928Xath9k 168c:002a |
AR922Xath9k 168c:0029 |
Intel 6250iwlwifi 8086:0087 |
Intel 7260iwlwifi 8086:08b1 |
AR5212/5413ath5k 168c:0013 |
NetGear WNDA3100carl9170 (USB) |
Ralinkrt2800usb (USB) |
|---|---|---|---|---|---|---|---|
| Where | sb4, sb5, sb6, grid |
grid |
sb4, sb5, sb6, grid |
grid |
sb7, grid |
grid |
grid |
*_channel, 2.4 GHz |
1-11 | 1-11 | 1-11 | 1-11 | 1-11 (1-13 under its own EEPROM domain) | 1-11 | 1-11 |
sniff_channels, 5 GHz |
24 channels | 24 | 24 | 25 | 24 | 28 | none (2.4 GHz only) |
inject_channel, 5 GHz (no "no IR", no radar) |
36-48, 149-165 | 36-48, 149-165 | none: all "no IR" | none: all "no IR" | 36-48, 149-165 (under US) | 36-48, 149-165 and more | - |
*_width |
20, 40 | 20, 40 | 20, 40 | 20, 40, 80 (80 at 5 GHz) | 20 only | 20, 40 | 20, 40 |
inject_rates |
2.4 GHz: 1, 2, 5.5, 11, 6-54; 5 GHz: 6-54 | same | same | same | same | same | 2.4 GHz only |
inject_mcs (HT) |
0-15 | 0-15 | 0-15 | 0-15 | none (legacy only) | 0-15 | 0-15 |
inject_vht_mcs, inject_nss |
none | none | none | 0-9, 1-2 streams, 5 GHz only | none | none | none |
inject_sgi |
40 MHz only | 40 MHz only | 20 and 40 MHz | 20, 40, 80 MHz | - | 40 MHz only | 20 and 40 MHz |
inject_ldpc |
no | no | no | no | - | no | no |
STBC transmit (wifi-inject --stbc) |
yes | yes | no | yes | - | no | yes |
| Antennas (TX/RX) | 2/2 | 2/2 | not reported | 2/2 | 2/2 | not reported | not reported |
wifi-sniff --active (ACKs while listening) |
yes | yes | no | no | no | no | no |
| Other modes (for later tutorials) | AP, IBSS, mesh point | AP, IBSS, mesh point | AP, IBSS | AP, IBSS | AP, IBSS, mesh point | AP, IBSS, mesh point | AP, IBSS, mesh point |
What auto chooses from that: legacy 1, 6, 24 and 54 Mb/s that the band lists (no 1 Mb/s at 5 GHz), HT MCS 0 and 7 if the card has HT, VHT MCS 0 and 7 if it has VHT on the channel's band. The report's auto field shows the choice per radio, and why a family is empty.
Measured with these tutorials on sb4 to sb7 (2026-11-06) and grid (2026-11-07). A dash means not measured.
| AR928X | AR922X | Intel 6250 | Intel 7260 | ath5k |
carl9170 |
rt2800usb |
|
|---|---|---|---|---|---|---|---|
| Injects what it is asked | yes: rate, MCS, width | - | no: data always at 1 Mb/s; HT beacons at 1 Mb/s, and exactly the even sequence numbers never arrive | yes, HT MCS 0 and 7 as asked | refused on sb7 (EEPROM domain CO, not US) |
- | - |
| Frame types delivered in monitor mode | all | all | all | - | beacons, RTS and ACK; never a data frame | all | all |
Keeps frames with a bad FCS (fcsfail) |
yes | yes (967-1,450 in a 75 s capture on grid) |
no, never | - | yes | 413 in one run, none in the next | yes (about 550 per run) |
| Signal per receive chain | yes, 2 chains | yes, 2 chains | no, combined only | - | no | no | no |
| Noise | not reported | not reported | not reported | - | not reported | not reported | not reported |
| Regulatory domain | follows the one set | follows the one set | follows the one set | - | its EEPROM's (CO on sb7) whatever is set |
follows the one set | follows the one set |
Delivery, channel 6, grid, from node16-20 (−30 to −50 dBm) |
- | 0.93-1.00 | 0.67-0.98 | (sender) | beacons 0.96-1.00 | 0.83-1.00 | 0.51-0.84 |
| Delivery, channel 36 HT40, MCS 0-7 | 1.00 (sb5) |
0.99-1.00 | 0.97-1.00 (grid), 0.11-0.81 at MCS 7 (sb5) |
- | cannot (20 MHz only) | 0.99-1.00 | cannot (no 5 GHz) |
| Delivery, MCS 15 (2 streams, HT40) | 0.31 short frames, 0.99 long (sb5) |
0.02-0.03 at −70 dBm | 0.27-0.93 | - | - | 0.82-0.93 | - |
Fraction of the 100 frames of each stream received (data frames shown; QoS data, beacons and probe requests are alike):
| Sent as | AR928X | Intel 6250 |
|---|---|---|
| 1 Mb/s | 0.93 | 1.00 |
| 6 Mb/s | 0.95 | 1.00 |
| 24 Mb/s | 0.99 | 0.89 |
| 54 Mb/s | 0.86 | 0.54 |
| HT MCS 0 | 0.94 | 0.97 |
| HT MCS 7 | 0.97 | none to 0.01 |
Every frame the AR928X sent at an HT MCS was received at that MCS; legacy rates likewise. The Intel radio, 20 dB weaker on this path, hears 64-QAM poorly: 54 Mb/s at 0.54-0.90 and HT MCS 7 almost never. These are broadcast frames, which are never retried, on a channel the building also uses (12-18% of airtime). A loss here is a collision, interference or the receiver; to tell them apart, see Try it yourself.
Spacing matters. With frames 2 ms apart, 1 Mb/s streams received only 0.62-0.82, and their send-to-receive time grew to about 30 ms against 0.2 ms at 54 Mb/s. A 300-byte frame takes 2.6 ms on air at 1 Mb/s, so the transmit queue grew and overflowed. At the default 5 ms, 1 Mb/s delivery rose to 0.93-0.99.
| Sent as | AR928X, 100 bytes | AR928X, 1500 bytes | Intel, 100 bytes | Intel, 1500 bytes |
|---|---|---|---|---|
| 6, 24 and 54 Mb/s | 1.00 | 1.00 | 1.00 | 1.00 |
| HT MCS 0 | 1.00 | 1.00 | 1.00 | 1.00 |
| HT MCS 7 | 1.00 | 1.00 | 0.81 | 0.11 |
| HT MCS 8 (2 streams) | 1.00 | 1.00 | 1.00 | 1.00 |
| HT MCS 15 (2 streams) | 0.31 | 0.99 | none | none |
Channel 36 was quiet, so the losses here are the link's own. Two of them pull in opposite directions:
sb4 matrixnode1-4 sends with both radios, node1-5 listens with both; data frames, 300 bytes:
| Sent as | 4-5 at 20 dB, AR928X hears | 4-5 at 0 dB, AR928X hears | 4-5 at 0 dB, Intel hears |
|---|---|---|---|
| 1 and 6 Mb/s | 1.00 | 1.00 | 1.00 |
| 24 Mb/s | 0.57 | 1.00 | 1.00 |
| 54 Mb/s | none | 1.00 | 0.24-0.43 |
| HT MCS 0 | 1.00 | 1.00 | 1.00 |
| HT MCS 7 | none | 1.00 | none |
The matrix setting is not the path loss: at 20 dB the AR928X read -87 dBm, at 0 dB -69 dBm, so the cables, splitters and switches add far more than the attenuator. node1-3 and node1-6, whose ports were switched to the SDRs, heard nothing in either case.
The Intel radio on node1-4, asked for every rate in turn, sent all its data frames at 1 Mb/s. The sniffer shows it at once, because each stream records the PHY observed beside the PHY requested. Its driver does not take the rate from the radiotap header.
The same 50 data frames, 24 Mb/s, channel 36, sent to 02:43:4f:01:02:00, a station that does not exist, so no ACK ever comes:
inject_retries |
Frames on air | Unique | With the retry flag |
|---|---|---|---|
driver default (null) |
50 | 50 | 0 |
| 3 | 200 | 50 | 150 |
An injected unicast frame is sent once unless you ask for retries: the AR928X's default for injection is none. With three retries every unanswered frame went out four times, the last three marked as retries, and the sniffer counted them as duplicates of one sequence number.
probe_req is not a default.sb6 and sb7 injecting at the same time, sb6's capture held two streams of run 529dcd01, which was sb7's, and sb7's held sb6's Intel beacons. The tag names the run, so the table lists such streams as "not ours". While both ran, sb6's own delivery fell from about 1.00 to 0.78-0.93.sb5. Only differences between streams mean anything.Change one parameter at a time with --params my.yml.
| Parameters | Question |
|---|---|
inject_dst: "02:43:4f:01:02:00", inject_retries: 3 |
Unicast to a station that is not there: count the retries. Then listen with wifi-sniff --active on an AR928X, which acknowledges frames addressed to its own MAC address (ip link show snf0), and send to that address: do the retries stop, and do the ACKs show up? |
inject_interval_ms: 2, inject_rates: [1] |
Where does the queue start to overflow? Compare with the airtime the sniffer computes. |
inject_sizes: [60, 100, 200, 500, 1000, 1500], inject_mcs: [7, 15] |
How does delivery depend on frame length at each MCS? Why does the AR928X lose short MCS 15 frames? Try inject_ldpc, the other radio as the receiver, and inject_width: 20. |
inject_width: 40, inject_sgi: true |
What does each change in airtime and delivery? Listen with sniff_width: 20 too: a 20 MHz receiver cannot decode a 40 MHz frame. |
inject_channel: 36, inject_width: 40 |
Which radios are skipped at 5 GHz, and why? What does auto choose for each radio (the report's auto field)? |
sniff_channels: [1, 6, 11, 36, 44, 149, 157], sniff_dwell_s: 2 |
Which networks are around, how wide, how secured, and how busy is each channel? |
sniff_flags: [control] |
What do you lose without fcsfail and otherbss? |
sniff_filter: "type mgmt subtype beacon" |
A BPF filter in the kernel instead of the whole channel. |
Each contract.json passes only when its part worked:
wifi-inject: the kernel accepted every frame of every stream.wifi-sniff: every capture recorded frames.Neither proves the other. Delivery is in the sniffer's table, and --mode parity runs the ansible and manual modes and compares them.
cosmos-tutorial run wifi-sniff --mode teardown
cosmos-tutorial run wifi-inject --mode teardown
Each stops its own units (wifi-sniff-*, wifi-inject-*) and deletes the monitor interfaces it created. Nothing else needs tidying: the next image wipes the nodes.
| Symptom | Cause |
|---|---|
refused: channel N forbids initiating transmission here |
The radio lists that channel as "no IR" or radar. Pick another channel or radio; --list shows each radio's bands. |
| Every HT frame arrives at 1 Mb/s | The radiotap MCS field was ignored. The tools set the MCS-index-known bit; a hand-built header must too. If the sender is an Intel radio, its driver ignores the requested rate for data frames whatever the header says: send from an AR928X. |
follows regulatory domain CO, not US |
That radio's EEPROM fixes its domain (the AR5413s on sb7). It cannot inject here; it can still listen, with a warning. |
Every radio on sb4 hears nothing |
The matrix is at 63 dB, or the port's switch is at the SDR position. Read /rfmatrix/status, then set the attenuator between your two ports. |
| A stream is listed as "not ours" | Another experiment within range is injecting: its run id is in the table. On sb5-sb7 the radios share the air. |
| A stream's delivery is low at 1 Mb/s only | The frames are closer together than their airtime. Raise inject_interval_ms. |
Delivery reads highest seq seen instead of inject report |
The capture ended before wifi-inject wrote its report. Score it afterwards: python3 wifi-sniff_lib.py rescore <sniff run> <inject run>. |
| A radio hears nothing on a 5 GHz channel others hear | Check hop_check in capture.json: frames from another channel during that dwell mean the radio never moved. Otherwise the radio may simply be less sensitive there; compare its median signal with the other radio's. |
capture.json shows "flags": [] |
The driver refused the monitor flags, and the capture ran without them. |
| No radio is listed | COSMOS images do not load the Wi-Fi drivers at boot; the tools load them, but a missing firmware file leaves a radio out. Check dmesg. |
| ath10k radios receive but send nothing | Expected: their stock firmware does not transmit injected frames. |
Package cosmos-experiments-wifi-monitor 0.1.0-3 - on every console it is released to (cosmos-tutorial list shows the installed version). The code is installed on the console in /usr/share/cosmos-experiments/wifi-inject/; the programs in its node/ subdirectory are copied to the nodes by every run, so the node image does not need to carry them. To change anything, cosmos-tutorial copy wifi-inject puts an editable copy in the current directory, and cosmos-tutorial run wifi-inject then runs that copy instead of the installed one (cosmos-tutorial which wifi-inject shows which will run). Repository (GitLab account needed, not needed to run or change it): packages/cosmos-experiments-wifi-monitor/usr/share/cosmos-experiments/wifi-inject.
Package cosmos-experiments-wifi-monitor 0.1.0-3 - on every console it is released to (cosmos-tutorial list shows the installed version). The code is installed on the console in /usr/share/cosmos-experiments/wifi-sniff/; the programs in its node/ subdirectory are copied to the nodes by every run, so the node image does not need to carry them. To change anything, cosmos-tutorial copy wifi-sniff puts an editable copy in the current directory, and cosmos-tutorial run wifi-sniff then runs that copy instead of the installed one (cosmos-tutorial which wifi-sniff shows which will run). Repository (GitLab account needed, not needed to run or change it): packages/cosmos-experiments-wifi-monitor/usr/share/cosmos-experiments/wifi-sniff.