From 2088eb7c76607395474f0ffe3733cf61458ffdab Mon Sep 17 00:00:00 2001 From: Joseph <162703152+josephnef@users.noreply.github.com> Date: Sat, 14 Nov 2026 12:28:31 +0300 Subject: [PATCH 1/4] cell witness: per-path RSSI on each logged frame Co-Authored-By: Claude Opus 5.5 (1M context) --- examples/cell/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/cell/main.cpp b/examples/cell/main.cpp index d9c95270..ef4de0d4 100644 --- a/examples/cell/main.cpp +++ b/examples/cell/main.cpp @@ -5295,11 +5295,14 @@ int run_witness(IRadio *dev, const Cfg &c) { } else if (auto m = devourer::cell::find_grant_map(d, p.Data.size(), wauth)) { ep = m->epoch; } + /* Per-path RSSI (dBm, as the DU reads it: raw - 110): what this frame + * arrived at, for a TX power sweep read at a second receiver. */ snprintf(l, sizeof l, "{\"ev\":\"cell.w\",\"k\":\"%s\",\"st\":%d,\"tsfl\":%u,\"egress\":%llu," - "\"epoch\":%u,\"len\":%zu,\"cell\":%u}", + "\"epoch\":%u,\"len\":%zu,\"cell\":%u,\"rssi\":[%d,%d]}", st == 0 ? "bcn" : "ul", st, p.RxAtrib.tsfl, - (unsigned long long)(eg ? *eg : 0), ep, p.Data.size(), cell); + (unsigned long long)(eg ? *eg : 0), ep, p.Data.size(), cell, + static_cast(p.RxAtrib.rssi[0]) - 110, static_cast(p.RxAtrib.rssi[1]) - 110); emit(l); return; } else if (auto rf = parse_rach_frame( From 67efe32075a0bf7e62b3cd77f1584c74477f6301 Mon Sep 17 00:00:00 2001 From: Joseph <162703152+josephnef@users.noreply.github.com> Date: Sat, 14 Nov 2026 12:35:12 +0300 Subject: [PATCH 2/4] cell witness: per-path SNR beside the RSSI Co-Authored-By: Claude Opus 5.5 (1M context) --- examples/cell/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/cell/main.cpp b/examples/cell/main.cpp index ef4de0d4..095304c7 100644 --- a/examples/cell/main.cpp +++ b/examples/cell/main.cpp @@ -5295,14 +5295,16 @@ int run_witness(IRadio *dev, const Cfg &c) { } else if (auto m = devourer::cell::find_grant_map(d, p.Data.size(), wauth)) { ep = m->epoch; } - /* Per-path RSSI (dBm, as the DU reads it: raw - 110): what this frame - * arrived at, for a TX power sweep read at a second receiver. */ + /* Per-path RSSI (dBm, as the DU reads it: raw - 110) and SNR (dB, + * raw / 2): what this frame arrived at, for a TX power sweep read at + * a second receiver. */ snprintf(l, sizeof l, "{\"ev\":\"cell.w\",\"k\":\"%s\",\"st\":%d,\"tsfl\":%u,\"egress\":%llu," - "\"epoch\":%u,\"len\":%zu,\"cell\":%u,\"rssi\":[%d,%d]}", + "\"epoch\":%u,\"len\":%zu,\"cell\":%u,\"rssi\":[%d,%d],\"snr\":[%.1f,%.1f]}", st == 0 ? "bcn" : "ul", st, p.RxAtrib.tsfl, (unsigned long long)(eg ? *eg : 0), ep, p.Data.size(), cell, - static_cast(p.RxAtrib.rssi[0]) - 110, static_cast(p.RxAtrib.rssi[1]) - 110); + static_cast(p.RxAtrib.rssi[0]) - 110, static_cast(p.RxAtrib.rssi[1]) - 110, + p.RxAtrib.snr[0] / 2.0, p.RxAtrib.snr[1] / 2.0); emit(l); return; } else if (auto rf = parse_rach_frame( From 806f710dfc59fc1f1e37c0786d662856d4878837 Mon Sep 17 00:00:00 2001 From: Joseph <162703152+josephnef@users.noreply.github.com> Date: Sat, 14 Nov 2026 12:55:54 +0300 Subject: [PATCH 3/4] docs cell M6: the power-to-RSSI non-linearity is one radio; the roam's slow return is a stale station (#566) Co-Authored-By: Claude Opus 5.5 (1M context) --- docs/cell-m6.md | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/docs/cell-m6.md b/docs/cell-m6.md index d17c1c96..099af91b 100644 --- a/docs/cell-m6.md +++ b/docs/cell-m6.md @@ -997,9 +997,18 @@ channel, with one UE (UE1, starting in cell 1). 15 s while cell 2 rises by as much. They hold, then reverse. - **The UE's measured margin** (the other cell against the serving one) sweeps from about −13 to +24 dB and back. -- **The rig's power-to-RSSI curve** is not linear: −8 dB of offset reads - about −9 dB at the UE, and −9 dB about −12 dB. Its cause is not - established; the tests use the measured margins, not the offsets. +- **The rig's power-to-RSSI curve** is not linear here: −8 dB of offset + reads about −9 dB at the UE, and −9 dB about −12 dB. That is one radio, + DU1's (j6412-1 09:00), in both directions (testrig + `scripts/m6_txpwr_sweep.sh`, `results/2026-11-14-m6-causes.txt`): + - as a transmitter it steps down at 8 dBm commanded (offset −12 dB), with + the receivers' SNR falling 13–15 dB with it; + - as a receiver it collapses below about −62 dBm; + - every link without it is linear within about 1 dB over 20 dB. A + roles-swapped sweep moves the effect with the radio. + + The mechanism inside that unit is not established. The tests use the + measured margins, not the offsets. **Crossing, there and back** (3 runs, all pass: exactly 1 → 2 then 2 → 1 in each). @@ -1882,11 +1891,21 @@ Linux stack: to connected (authentication, association, four-way handshake). The M6 switch costs 84–123 ms on the same radios, with no scan, no re-association and no clock re-acquisition. - **Returning to the AP the client joined first took 5.6–5.9 s, every - time.** That AP logs its authentication response three times as not - acknowledged, and the supplicant gets in on a retry ~5 s later. It follows - the first AP, not a channel or a box. The cause is not established. It is - a property of this stack on these radios, reported as measured, not a - general Wi-Fi figure. + time.** The cause is a stale station at the AP the client left. An SME + roam tells the old AP nothing, so it keeps the client: + - on the return, hostapd first deletes that station, and `DEL_STATION` + took 428–443 ms on every removal on these radios (mac80211 + rtw89); + - the client's authentication wait runs out first. It falls back to the + AP it was leaving, which pays the same deletion, and ignores both for + ~4.5 s; + - each fallback clears the other AP's entry, so the cycle alternates. + Returns to one AP are always slow and roams into the other always + fast; "the first AP" is only where the cycle starts. + + With the old AP dropping the client as it leaves (`hostapd_cli + deauthenticate STA tx=0`, testrig `m6_roam_baseline.sh --drop-left 1`), + every roam took 0.41–0.57 s (10/10). Which part of the 430 ms deletion is + spent where in the kernel was not traced. ## The rig suite (where the M6 tests live) From 3cd28251e213cd7ef051c866edbe800f49202418 Mon Sep 17 00:00:00 2001 From: Joseph <162703152+josephnef@users.noreply.github.com> Date: Sat, 14 Nov 2026 12:58:56 +0300 Subject: [PATCH 4/4] cell witness: an unmeasured path logs null; docs: the roam alternation as measured (review) Co-Authored-By: Claude Opus 5.5 (1M context) --- docs/cell-m6.md | 13 ++++++++----- examples/cell/main.cpp | 19 +++++++++++++++---- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/docs/cell-m6.md b/docs/cell-m6.md index 099af91b..d7305d00 100644 --- a/docs/cell-m6.md +++ b/docs/cell-m6.md @@ -1898,14 +1898,17 @@ Linux stack: - the client's authentication wait runs out first. It falls back to the AP it was leaving, which pays the same deletion, and ignores both for ~4.5 s; - - each fallback clears the other AP's entry, so the cycle alternates. - Returns to one AP are always slow and roams into the other always - fast; "the first AP" is only where the cycle starts. + - each fallback deletes the station at the AP being left (hostapd logs + its `DEL_STATION` there). In every run (4 runs, 40 roams), every roam + into one AP was slow and every roam into the other fast; which AP is + slow follows where the cycle started (the AP joined first), not a radio + or a channel. With the old AP dropping the client as it leaves (`hostapd_cli deauthenticate STA tx=0`, testrig `m6_roam_baseline.sh --drop-left 1`), - every roam took 0.41–0.57 s (10/10). Which part of the 430 ms deletion is - spent where in the kernel was not traced. + every roam took 0.41–0.57 s (10/10, against 5/5 slow returns without it in + the same session; testrig `results/2026-11-14-m6-causes.txt`). Which part + of the 430 ms deletion is spent where in the kernel was not traced. ## The rig suite (where the M6 tests live) diff --git a/examples/cell/main.cpp b/examples/cell/main.cpp index 095304c7..b4438c5b 100644 --- a/examples/cell/main.cpp +++ b/examples/cell/main.cpp @@ -5298,13 +5298,24 @@ int run_witness(IRadio *dev, const Cfg &c) { /* Per-path RSSI (dBm, as the DU reads it: raw - 110) and SNR (dB, * raw / 2): what this frame arrived at, for a TX power sweep read at * a second receiver. */ + /* Raw 0 = the path was not measured: null, never -110 dBm / 0 dB. */ + auto rssi_s = [&](int i) { + return p.RxAtrib.rssi[i] ? std::to_string(static_cast(p.RxAtrib.rssi[i]) - 110) + : std::string("null"); + }; + auto snr_s = [&](int i) { + char b[16]; + if (!p.RxAtrib.snr[i]) + return std::string("null"); + snprintf(b, sizeof b, "%.1f", p.RxAtrib.snr[i] / 2.0); + return std::string(b); + }; snprintf(l, sizeof l, "{\"ev\":\"cell.w\",\"k\":\"%s\",\"st\":%d,\"tsfl\":%u,\"egress\":%llu," - "\"epoch\":%u,\"len\":%zu,\"cell\":%u,\"rssi\":[%d,%d],\"snr\":[%.1f,%.1f]}", + "\"epoch\":%u,\"len\":%zu,\"cell\":%u,\"rssi\":[%s,%s],\"snr\":[%s,%s]}", st == 0 ? "bcn" : "ul", st, p.RxAtrib.tsfl, - (unsigned long long)(eg ? *eg : 0), ep, p.Data.size(), cell, - static_cast(p.RxAtrib.rssi[0]) - 110, static_cast(p.RxAtrib.rssi[1]) - 110, - p.RxAtrib.snr[0] / 2.0, p.RxAtrib.snr[1] / 2.0); + (unsigned long long)(eg ? *eg : 0), ep, p.Data.size(), cell, rssi_s(0).c_str(), + rssi_s(1).c_str(), snr_s(0).c_str(), snr_s(1).c_str()); emit(l); return; } else if (auto rf = parse_rach_frame(