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)