Commit Graph
371 Commits
Author SHA1 Message Date
liquidraver 16238a129e bump zephyr to 4.4.1 2026-06-14 12:58:42 +02:00
liquidraver 9d4fed9119 wismesh tag adc fix v20260613.205222 2026-06-13 08:37:25 +02:00
liquidraver bf71542751 Make Rxdutycycling Great Again 2026-06-13 08:23:01 +02:00
liquidraver 061a65a7f0 cli commands fix 2026-06-12 21:07:37 +02:00
liquidraver d4a48ae5f3 joystick UI: proper accents, emojis stripped, new unlock mechanism 2026-06-11 20:55:56 +02:00
liquidraver cc8ade8298 bound AdvertDataParser name copy to _name size (helpers audit) 2026-06-11 14:18:15 +02:00
liquidraver b7c72fe5ee route CAD_DONE/CAD_DETECTED to DIO1 so LR1110 LBT CAD completes (radio2 audit) 2026-06-11 13:58:08 +02:00
liquidraver a9c797b837 guard GPS month_days[] index against out-of-range GNSS month (gps audit) 2026-06-11 13:30:01 +02:00
liquidraver 966bf24c96 defer MQTT connect publish to main loop (uplink cross-thread fix) 2026-06-11 12:32:37 +02:00
liquidraver a03390baa7 guard TRACE path append, multi-ack len, runt flood ACK (core-mesh audit) 2026-06-11 08:43:00 +02:00
liquidraver 0ce847b9bb small fixes 2026-06-11 07:32:50 +02:00
liquidraver a7642cc3e2 3 consecutive battery reading before shutdown (3 hits / 90 s) 2026-06-09 14:50:11 +02:00
liquidraver 5564dcbde0 fix RTC and time display 2026-06-09 14:46:30 +02:00
liquidraver a43f46f942 bump to 1.16.1 v20260608.105434 2026-06-08 12:23:46 +02:00
liquidraver 0090634cab bump zephyr to 4.4.1-rc1 2026-06-08 12:19:00 +02:00
liquidraver 2b90605fe1 bump Service Changed to 2 2026-06-08 11:56:38 +02:00
liquidraver 4a9da3a43c contact_iter_work race 2026-06-08 10:22:25 +02:00
liquidraver f9bc6934b9 initial_advert_work race 2026-06-08 10:21:55 +02:00
liquidraver 7e00a6682d ble race fixes 2026-06-08 09:57:58 +02:00
liquidraver 81a4365b0f fix nrf54 build 2026-06-08 09:11:26 +02:00
liquidraver 6861822127 route zephcore_rtc_save() through the deferred-to-main-thread mechanism 2026-06-08 09:01:18 +02:00
liquidraver 2ad185bab4 license "refactor" :) 2026-06-07 22:47:17 +02:00
liquidraver 2cf4b9704e BT DFU fixes + power bump up 2026-06-07 22:33:50 +02:00
liquidraver 7c46f4a343 legacy code cleanup 2026-06-07 13:02:07 +02:00
liquidraver 4fc20de854 legacy dfu hard dep to nrf52 2026-06-07 12:54:37 +02:00
liquidraver 37edf303a2 fix MAX_ANON_CONTACTS 2026-06-07 12:51:31 +02:00
liquidraver 01fd56a573 wire up RTC to out-of-the-box capable nodes 2026-06-07 12:00:05 +02:00
liquidraver 9ef6774d6a add legacy nordic DFU service 2026-06-06 23:55:15 +02:00
liquidraver ffe9ea652d sync to vanilla 1.16 v20260606.150211 2026-06-06 16:42:39 +02:00
liquidraver 4353936328 lr2021 experiments 2026-06-06 15:33:37 +02:00
liquidraver d13d6f4621 version to 1.15.9 v20260605.132226 2026-06-05 14:59:12 +02:00
liquidraver f508c14dbb display improvements 2026-06-05 14:56:11 +02:00
liquidraver 28a8a6999d nrf companion auto-shutdown 2026-06-05 09:27:24 +02:00
liquidraver eda46166b4 companion CLI 2026-06-04 22:43:01 +02:00
liquidraver d3ebb2f172 adc tuning improvements 2026-06-04 13:30:51 +02:00
liquidraver e052f3d231 sync with upstream dev 2026-06-03 22:01:23 +02:00
liquidraver 136bfd5c85 fix battery curve not compiling v20260603.123327 2026-06-03 14:06:00 +02:00
liquidraver 743076b850 bump some magic numbers 2026-06-03 14:02:46 +02:00
liquidraver a77e877ad8 linux native Pi fixes 2026-06-03 13:48:54 +02:00
liquidraver d37b401033 battery: centralized LiPo OCV curve + ADC multiplier corrections
Add a board-aware battery SOC system replacing the two independent
linear approximations that existed in the UI helpers.

New helpers/battery_curve.{h,c}: a 21-point (5% step) OCV lookup table
with integer linear interpolation. The default generic LiPo curve is a
weak symbol — any board can override it by dropping a battery_curve.c
into its board directory. CMakeLists.txt selects the board-specific file
when present, falling back to the generic.

Board.h gains getBattPercent() (default 0); ZephyrBoard implements it
via battery_curve_lookup().

Board-specific curves added for boards with measured cell data:
t1000_e, rak_wismesh_tag, thinknode_m6, sensecap_solar, wio_tracker_l1.

ADC multiplier corrections applied across all nRF52840 boards:
- Boards using a correctly-derived 3600×ratio formula get +0.5% to
  compensate for nRF SAADC gain error (7200→7236, 6300→6332, etc.)
- rak_wismesh_tag, rak3401_1watt, gat562_30s had multipliers copied
  from Arduino's 3.0V AREF formula; corrected to 3600×1.73×1.005=6259
- xiao_nrf52840 (10911) left unchanged — empirically calibrated value
  above the theoretical, assumed already correct for that hardware

get adc.multiplier now reports current mV reading and the board's
curve 100% target, making field calibration self-guiding.
2026-06-03 13:21:06 +02:00
liquidraver 8761a82d93 fix USB protocol handling and bump version v20260603.083228 2026-06-03 10:09:43 +02:00
liquidraver 876e818b00 cleanup repeat function in room servers more v20260603.055722 2026-06-03 07:33:20 +02:00
liquidraver ad4c28cdb0 unbreak build #1 2026-06-03 07:25:24 +02:00
liquidraver a45eace01c Merge pull request #26 from rlwilliamson-dev/room-server
room-server: drop repeater forwarding, neighbour tracking and discovery
2026-06-03 07:14:46 +02:00
rlwilliamson-dev f3da3f7cee room-server: drop repeater forwarding, neighbour tracking and discovery
A room server is an endpoint, not a repeater. Strip the repeater
machinery the role inherited from the RepeaterMesh clone:

- allowPacketForward() returns false unconditionally — never relays
  transit traffic. (Upstream's simple_room_server gates this on
  disable_fwd; hard-off here since the role should never repeat.)
- neighbour tracking: NeighbourInfo/neighbours[], putNeighbour,
  onAdvertRecv, removeNeighbor; formatNeighborsReply -> "not supported"
- node discovery: onControlDataRecv, sendNodeDiscoverReq, the
  discover.neighbors CLI, discover rate-limiter + pending state
- loop detection: isLooped + max_loop_* tables + loop_detect pref
- dead code: RepeaterStats struct, GET_NEIGHBOURS handler, simple_sort

-344 lines net. Builds clean (FLASH 30.7% / RAM 32.2%); login, post,
push/sync, read-only guest and admin remote-management all
hardware-verified on the GAT562 kit.
2026-06-02 18:19:22 -05:00
liquidraver 9ffb3802bf Merge pull request #25 from rlwilliamson-dev/room-server
app: add Room Server (BBS) role
2026-06-02 23:05:25 +02:00
liquidraver 209f74411c fix linux repeater build 2026-06-02 22:56:32 +02:00
rlwilliamson-dev 79afecf11b docs: document the Room Server role
- README: add Room Server to "Device Roles" + a build command in "Building"
- ARCHITECTURE.md: role list two -> four (add Room Server + the
  previously-undocumented Observer)
- Repeater_CLI_commands.md: note the room server shares this CLI
- boards/example_board/README.md: add the room_server.conf build snippet
2026-06-02 15:53:27 -05:00
rlwilliamson-dev 05fce66b16 room-server: drop dead anon-request handlers inherited from the clone
The room server's onAnonDataRecv handles login inline (the room login
protocol carries a sync_since cursor the repeater's doesn't), so the
cloned repeater helpers handleLoginReq + handleAnonRegionsReq /
handleAnonOwnerReq / handleAnonClockReq — and the anon_limiter they used
— were dead after the port. Remove them (~160 lines). No behavior change.

The inherited neighbor-tracking / node-discovery machinery is also unused
on a room server; left in place for now (can be trimmed in a follow-up).
2026-06-02 15:43:29 -05:00
rlwilliamson-dev fcd5fd8641 room-server: fix login when a password is set over a longer one
StrHelper::strncpy null-terminates but does NOT zero-pad the 16-byte
password buffer, so setting a shorter password over a longer previous
value (e.g. one inherited from a prior repeater config) leaves trailing
garbage. onAnonDataRecv's constant-time compare runs over the full
buffer width, so a correct password stopped matching — admin/guest
logins were silently rejected, or downgraded to a read-only guest when
allow_read_only was on (the login looked identical to read-only).

Fix: copy both stored passwords into zeroed buffers (up to strnlen)
before the constant-time compare, so the comparison reflects the actual
string while staying constant-time over the full width.

Hardware-verified on the kit: admin login with the correct password now
grants ADMIN (post + remote management), confirmed server-side via
get acl (perms 03).

Note: the repeater's handleLoginReq shares this latent issue.
2026-06-02 15:07:50 -05:00