Introduces a fourth ACL role (value 4) that can manage the region map
without full admin privileges. The role is intended for trusted users
who curate regions on a repeater but should not have access to general
admin commands.
ClientACL:
- Widen PERM_ACL_ROLE_MASK from 2 to 3 bits so the new value fits.
- Add PERM_ACL_REGION_MGR and ClientInfo::isRegionMgr().
- Exempt region_mgr entries from least-recently-active eviction in
putClient(), same as admins.
simple_repeater:
- Phones may still gate UI on the legacy is_admin byte (reply_data[6]),
so report region_mgr as admin there. Without this, the phone CLI
falls back to guest view.
- Allow region_mgr to send TXT_MSG CLI commands. handleCommand()
gates non-whitelisted commands with "Err - not permitted". The
whitelist covers region.* (read+write) plus a small set of
read-only queries (get, ver, board, neighbors, clock, sensor
get/list).
- Pass the ClientInfo* through to handleCommand and drop the
redundant sender_timestamp parameter (derived from
sender->last_timestamp; NULL means Serial CLI).
- Use ~PERM_ACL_ROLE_MASK instead of ~0x03 when clearing role bits
on login, so the wider mask is honored.
Battery (TechoBoard.h/cpp): Added PIN_VBAT_MEAS_EN (P0.31) — the T-Echo
Lite has a gated voltage divider that must be enabled before reading. Also
added pinMode(PIN_VBAT_READ, INPUT) before each ADC read to reclaim P0.02
from other peripherals. Pin definitions hardcoded from LilyGo's
t_echo_lite_config.h.
I2C (variant.h): Corrected SDA/SCL from P0.04/P0.02 to P1.04/P1.02 per
LilyGo's IIC_1_SDA/IIC_1_SCL. The old P0.02 mapping conflicted with the
battery ADC pin.
GPS (variant.h): Corrected all five GPS pin assignments to match LilyGo's
config — UART TX/RX, wake, PPS, and power enable were all scrambled.
SPI (variant.h): Fixed SPI_INTERFACES_COUNT from _PINNUM(0, 2) to (2).
Tested on T-Echo Lite Non-Shell (USB-C, no display). Battery readings match
Heltec V4 reference within 10mV.
T-Echo Lite Non-Shell has no ePaper display, but the existing
companion BLE env inherits DISPLAY_CLASS=GxEPDDisplay from the base
env. This causes display.begin() to run on non-existent hardware,
corrupting BLE initialization and generating a random PIN that
cannot be displayed, making BLE connection impossible.
Add LilyGo_T-Echo-Lite_non_shell_companion_radio_ble env that:
- excludes DISPLAY_CLASS and ePaper-related build flags
- removes GxEPDDisplay.cpp and ui-new from build sources
- uses static BLE_PIN_CODE=123456 (avoids random PIN generation)
Also fix boards/t-echo.json:
- add nrfutil to upload protocols list
- add use_1200bps_touch=true and wait_for_upload_port=true
to enable reliable flashing via PlatformIO upload button