Forward MAPEM and VAM from the ESP32-C5, and add a bench listener
gn_unwrap.c now passes BTP ports 2003 (MAPEM) and 2018 (VAM), signed or not, besides CAM, DENM and SPATEM. A message over 494 bytes still does not fit one 512-octet link message (also the largest GATT value) and is dropped and counted, not fragmented. The bench RSU's MAPEM is 295 bytes. CONFIG_MICROBU_BENCH_LISTEN (off in sdkconfig) is for a board whose only PC connection is the UART0 console: it configures itself receive-only at boot and logs every V2X_RX message; tools/bench_listen_watch.py tallies the log. On air on 2026-10-28 it forwarded 104 MAPEM, 185 SPATEM and 472 CAM in 90 s, with nothing oversize. The RSU sent all of them unsigned. Host tests: signed GeoBroadcast SPATEM/MAPEM frames of 58 to 1243 bytes with every truncation length; the replay cuts frames at c5_radio.cpp's 2346 bytes (not the old C firmware's 800) and checks MAPEMs with asn1tools.
This commit is contained in:
@@ -119,6 +119,19 @@ void station_task(void*) {
|
||||
microbu::Battery battery;
|
||||
microbu::BatteryMonitor monitor(battery_config());
|
||||
std::int64_t next_battery_us = 0;
|
||||
#if CONFIG_MICROBU_BENCH_LISTEN
|
||||
{ // MicrOBU: a console-only test board has nothing that would configure it (Kconfig help)
|
||||
microbu::link::StationConfigure bench;
|
||||
bench.security = 0;
|
||||
bench.address_configuration = 0;
|
||||
bench.beaconing = 0;
|
||||
bench.radio = 1; // receive only
|
||||
microbu::link::Bytes detail;
|
||||
const auto code = station.configure(bench, detail);
|
||||
ESP_LOGW(TAG, "BENCH LISTEN build: radio receive only, security off, logging every V2X_RX (result %u)",
|
||||
unsigned(code));
|
||||
}
|
||||
#endif
|
||||
ESP_LOGI(TAG, "station task ready; the phone/PC configures the station over BLE or USB Serial-JTAG");
|
||||
for (;;) { /// main loop: drain the incoming queue, tick the station and link service, tick the controls
|
||||
Incoming* incoming = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user