2026-09-23 17:27:54 +02:00
|
|
|
menu "micrOBU firmware"
|
2026-11-11 00:13:57 +01:00
|
|
|
choice MICROBU_BOARD
|
|
|
|
|
prompt "Board"
|
|
|
|
|
default MICROBU_BOARD_MAINBOARD_V5
|
|
|
|
|
config MICROBU_BOARD_MAINBOARD_V5
|
|
|
|
|
bool "micrOBU mainboard v5"
|
|
|
|
|
config MICROBU_BOARD_XIAO_C5
|
|
|
|
|
bool "Seeed XIAO ESP32-C5"
|
|
|
|
|
endchoice
|
|
|
|
|
config MICROBU_XIAO_C5_BATTERY
|
|
|
|
|
bool "XIAO ESP32-C5 battery voltage monitor (GPIO6/26)"
|
|
|
|
|
depends on IDF_TARGET_ESP32C5 && MICROBU_BOARD_XIAO_C5
|
2026-09-23 17:27:54 +02:00
|
|
|
default y
|
|
|
|
|
help
|
2026-11-11 00:13:57 +01:00
|
|
|
Calibrated ADC voltage through the onboard 100k/100k divider.
|
|
|
|
|
Disable when building for another board. No percentage or charging state is inferred.
|
|
|
|
|
config MICROBU_STATUS_LED
|
|
|
|
|
bool "Drive the TX/RX indication LED"
|
|
|
|
|
default y if MICROBU_BOARD_XIAO_C5
|
2026-09-23 17:27:54 +02:00
|
|
|
default n
|
|
|
|
|
help
|
2026-11-11 00:13:57 +01:00
|
|
|
Disable for power measurements and on boards whose GPIO27 is not a plain LED
|
|
|
|
|
(ESP32-C5-DevKitC-1: addressable RGB LED and strapping pin). The GPIO is then never touched.
|
2026-09-23 17:27:54 +02:00
|
|
|
config MICROBU_TX_LED_GPIO
|
2026-11-11 00:13:57 +01:00
|
|
|
int "Active-low transmit LED GPIO"
|
|
|
|
|
depends on MICROBU_STATUS_LED
|
|
|
|
|
range 0 28
|
|
|
|
|
default 27
|
2026-09-23 17:27:54 +02:00
|
|
|
help
|
2026-11-11 00:13:57 +01:00
|
|
|
GPIO27 drives the on-board yellow user LED on the XIAO ESP32-C5.
|
2026-09-23 17:27:54 +02:00
|
|
|
config MICROBU_TX_LED_BLINK_MS
|
|
|
|
|
int "LED indication pulse (ms)"
|
|
|
|
|
range 10 2000
|
|
|
|
|
default 100
|
2026-11-11 00:13:57 +01:00
|
|
|
help
|
|
|
|
|
Duration in milliseconds for the LED visual indication (pulse on for TX, pulse off for RX).
|
2026-09-23 17:27:54 +02:00
|
|
|
config MICROBU_LED_INVERTED_RX
|
|
|
|
|
bool "Inverted LED mode for receiver/bridge (normally ON, blink OFF on packet)"
|
2026-11-11 00:13:57 +01:00
|
|
|
depends on MICROBU_STATUS_LED
|
2026-10-28 16:48:37 +01:00
|
|
|
default n
|
|
|
|
|
help
|
2026-11-11 00:13:57 +01:00
|
|
|
When enabled, the LED stays constantly ON and blinks OFF briefly whenever a packet is
|
|
|
|
|
received (useful for bridge and receiver nodes). When disabled, the LED stays OFF and
|
|
|
|
|
blinks ON briefly whenever a packet is disseminated (sender mode).
|
|
|
|
|
config MICROBU_BLE_PASSKEY
|
|
|
|
|
int "Station BLE pairing passkey (0 disables BLE)"
|
|
|
|
|
range 0 999999
|
|
|
|
|
default 123456
|
2026-10-28 16:48:18 +01:00
|
|
|
help
|
2026-11-11 00:13:57 +01:00
|
|
|
Override the public default with a random six-digit passkey per station.
|
|
|
|
|
Supply it to the owner separately. It is never advertised or logged.
|
|
|
|
|
BLE does not require secure boot or flash encryption. The bond is kept
|
|
|
|
|
in NVS. This firmware rejects build settings that could program eFuses.
|
|
|
|
|
config MICROBU_BLE_ADVERTISE_AT_BOOT
|
|
|
|
|
bool "Start BLE advertising at boot"
|
|
|
|
|
default y
|
2026-10-28 16:48:18 +01:00
|
|
|
help
|
2026-11-11 00:13:57 +01:00
|
|
|
Disable for power measurements driven over USB: the board then stays silent on BLE
|
|
|
|
|
until a serial RAW_CAPTURE request switches advertising back on.
|
|
|
|
|
config MICROBU_TX_BLE_GUARD
|
|
|
|
|
bool "Hold ITS-G5 frames out of BLE connection events"
|
|
|
|
|
default y
|
2026-10-28 16:48:18 +01:00
|
|
|
help
|
2026-11-11 00:13:57 +01:00
|
|
|
The C5 shares its RF between BLE and ITS-G5: a frame handed to the driver while a BLE
|
|
|
|
|
connection event holds the RF is accepted but never sent. The station delays such a frame
|
|
|
|
|
to the end of the calibrated connection event window (main/tx_policy.hpp). Disable only
|
|
|
|
|
to measure the losses without it.
|
2026-10-28 16:48:18 +01:00
|
|
|
config MICROBU_BATTERY_WARN_MV
|
|
|
|
|
int "Low-battery warning below this cell voltage (mV)"
|
|
|
|
|
range 3000 4200
|
|
|
|
|
default 3500
|
|
|
|
|
config MICROBU_BATTERY_SHUTDOWN_MV
|
2026-11-11 00:13:57 +01:00
|
|
|
int "Shutdown below this cell voltage (mV), see battery_policy.hpp"
|
2026-10-28 16:48:18 +01:00
|
|
|
range 3000 4200
|
|
|
|
|
default 3300
|
|
|
|
|
help
|
|
|
|
|
There is no protection board on the prototype cell, so this is the only guard against
|
|
|
|
|
over-discharge. The board shuts down (deep sleep) once the smoothed voltage has stayed below
|
|
|
|
|
this for 30 s and no phone is talking over USB; it checks the cell again every
|
2026-11-11 00:13:57 +01:00
|
|
|
MICROBU_BATTERY_SLEEP_S and runs again from MICROBU_BATTERY_RESUME_MV.
|
2026-10-28 16:48:18 +01:00
|
|
|
config MICROBU_BATTERY_RESUME_MV
|
|
|
|
|
int "After a shutdown, run again at or above this cell voltage (mV)"
|
|
|
|
|
range 3300 4200
|
|
|
|
|
default 3600
|
|
|
|
|
config MICROBU_BATTERY_SLEEP_S
|
|
|
|
|
int "Seconds between cell checks while shut down"
|
|
|
|
|
range 30 3600
|
|
|
|
|
default 300
|
2026-09-23 17:27:54 +02:00
|
|
|
endmenu
|