From 8871708a98523ebfee875e6ac9c03c992ab5f903 Mon Sep 17 00:00:00 2001 From: Ashin Walpola Date: Fri, 11 Sep 2026 20:19:39 +0200 Subject: [PATCH] Send the GeoNetworking lifetime as 1 s, not 3200 s geonet_wrap_shb wrote lifetime 0x83, commented as about 60 s. The field holds the multiplier in its upper six bits and the base in the lower two (50 ms, 1 s, 10 s, 100 s), so 0x83 is 32 x 100 s = 3200 s. That is over the 600 s itsGnMaxPacketLifetime a sender may use at all; vanetza refuses to send such a packet. The byte arrived with the Phase 03 commit as a placeholder and was never checked against the encoding. For a single-hop CAM this is non-compliance rather than a functional fault: nothing stores or forwards an SHB packet, so no receiver acts on the value, and no dropped CAM was ever traced to it. 0x05 (1 x 1 s) is what every other station in its-g5-receiver-firmware/recordings sends its CAMs with; the recorded GeoBroadcast DENMs use 0x79 (30 s). Changed in obu-cam-transmistter's copy as well. Both firmwares build (IDF 6.1 and 5.5.4), and the disassembled geonet_wrap_shb of each stores 0x05. Not yet seen on air: the production OBU still runs the 2026-09-10 build, and the on-air check is listed in TODO.md. --- obu-cam-transmistter/main/geonet.c | 5 ++++- obu-firmware/main/geonet.c | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/obu-cam-transmistter/main/geonet.c b/obu-cam-transmistter/main/geonet.c index 60ea6e0..418c92c 100644 --- a/obu-cam-transmistter/main/geonet.c +++ b/obu-cam-transmistter/main/geonet.c @@ -19,7 +19,10 @@ int geonet_wrap_shb(const uint8_t *its_payload, int its_len, // ---- GN Basic Header (4 bytes) ---- (EN 302 636-4-1 clause 9.6) *p++ = (uint8_t)((1 << 4) | 1); // version=1, NextHeader=1 (Common Header, unsecured) *p++ = 0x00; // reserved - *p++ = 0x83; // lifetime (~60s in the base/multiplier encoding) - tune if needed + // Lifetime: multiplier in the upper 6 bits, base in the lower 2 (0 = 50 ms, 1 = 1 s, 2 = 10 s, + // 3 = 100 s). 0x05 = 1 x 1 s, what real stations send their CAMs with. Was 0x83, commented as + // ~60 s but decoding to 32 x 100 s = 3200 s. See obu-firmware's geonet.c. + *p++ = 0x05; *p++ = 1; // remaining hop limit = 1 (SHB single-hop; matches CAM in the Rust reference) // ---- GN Common Header (8 bytes) ---- (clause 9.7) diff --git a/obu-firmware/main/geonet.c b/obu-firmware/main/geonet.c index e80ec36..477a127 100644 --- a/obu-firmware/main/geonet.c +++ b/obu-firmware/main/geonet.c @@ -33,7 +33,12 @@ int geonet_wrap_shb(const uint8_t *its_payload, int its_len, // ---- GN Basic Header (4 bytes) ---- (EN 302 636-4-1 clause 9.6) *p++ = (uint8_t)((1 << 4) | 1); // version=1, NextHeader=1 (Common Header, unsecured) *p++ = 0x00; // reserved - *p++ = 0x83; // lifetime (~60s in the base/multiplier encoding) - tune if needed + // Lifetime: multiplier in the upper 6 bits, base in the lower 2 (0 = 50 ms, 1 = 1 s, 2 = 10 s, + // 3 = 100 s). 0x05 = 1 x 1 s, which is what every other station in + // its-g5-receiver-firmware/recordings sends its CAMs with. This was 0x83, commented as ~60 s but + // decoding to 32 x 100 s = 3200 s, beyond the 600 s itsGnMaxPacketLifetime a sender may use at + // all. A DENM would want a longer one (the captured GeoBroadcast DENMs use 0x79, 30 s). + *p++ = 0x05; *p++ = 1; // remaining hop limit = 1 (SHB single-hop; matches CAM in the Rust reference) // ---- GN Common Header (8 bytes) ---- (clause 9.7)