From 9cf72deb12d2f18786c46c53065450d4318820a9 Mon Sep 17 00:00:00 2001 From: nomdetom Date: Mon, 12 Oct 2026 22:39:44 +0100 Subject: [PATCH 1/2] bridge: report what the chip's IrqMask kept out The radio stats record grows from 37 bytes to 47. Bytes 37-42 take the emulator's tail so the two writers keep one shape: the DIO1 mask, then a console rate of zero, since a native console is a socket rather than a UART. Bytes 43-46 carry irqSuppressed(), the number of events the firmware's IrqMask kept out of the chip's status register. MeshBench reads the record by length, so a host that predates the field keeps working with either size. irqSuppressed() comes from MeshBench/virtual-sx1262#2; this does not build against the chip at the current pin (2861950). --- bridge/main.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bridge/main.cpp b/bridge/main.cpp index 5898775..87dc574 100644 --- a/bridge/main.cpp +++ b/bridge/main.cpp @@ -338,7 +338,7 @@ int main(int argc, char** argv) { // make every comparison between them a comparison of our own code. auto& c = sim_hal.chip(); uint32_t st[4] = {c.irqReads(), c.busyReads(), c.busyMs(), c.spuriousRaises()}; - uint8_t sb[37]; + uint8_t sb[47]; for (int k = 0; k < 4; k++) { sb[k*4+0] = (uint8_t)(st[k] >> 24); sb[k*4+1] = (uint8_t)(st[k] >> 16); sb[k*4+2] = (uint8_t)(st[k] >> 8); sb[k*4+3] = (uint8_t)st[k]; @@ -369,6 +369,16 @@ int main(int argc, char** argv) { // the engine would dock every native node on a board that has a // module for a fault it did not have. sb[36] = 0; + // The emulator's tail, so the two writers stay one shape: the DIO1 + // mask, then the console's line rate, which is zero because a native + // node's console is a socket rather than a UART. + put16(37, c.dio1Mask()); + put32(39, 0); + // Events the firmware's IrqMask kept out of the status register. + // A masked event is silence, and silence reads exactly like a quiet + // channel, so without this count a firmware that never enabled + // PREAMBLE_DETECTED and one that never heard a preamble look alike. + put32(43, c.irqSuppressed()); writeMsg(gFd, kRadioStats, sb, sizeof(sb)); } if (!writeMsg(gFd, kAck, payload.data(), 4)) goto done; From cb18c69e14d45fb582e6cbc6bf08f685bdabf99a Mon Sep 17 00:00:00 2001 From: nomdetom Date: Tue, 13 Oct 2026 03:50:39 +0100 Subject: [PATCH 2/2] vendor: virtual-sx1262 at f2604d1, which has irqSuppressed() --- vendor/virtual-sx1262 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/virtual-sx1262 b/vendor/virtual-sx1262 index 2861950..f2604d1 160000 --- a/vendor/virtual-sx1262 +++ b/vendor/virtual-sx1262 @@ -1 +1 @@ -Subproject commit 28619507d592d47582c1ad57db6621f573edb0c0 +Subproject commit f2604d12934b643b50730581addfd77e387185e2