Add BLE host transport selectable via DIP8 alongside UART.

Master can speak the same framed protobuf protocol over NimBLE or UART; goTool gains -ble, ble-rtt, and ble-stream timing checks for ESP-NOW coexistence.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-23 16:11:10 +02:00
co-authored by Cursor
parent d7441cb85f
commit 92a13d7fd0
28 changed files with 2306 additions and 250 deletions
+12
View File
@@ -35,6 +35,8 @@ enum MessageType {
SET_LOG_LEVEL = 31;
/** Host → master: get/set BMA456H multitap detection parameters. */
TAP_CONFIG = 32;
/** Master → host (BLE only): periodic pushed cache snapshot with ESP timestamp. */
BLE_STREAM_TICK = 33;
}
message UartMessage {
@@ -75,6 +77,7 @@ message UartMessage {
SetLogLevelResponse set_log_level_response = 38;
TapConfigRequest tap_config_request = 39;
TapConfigResponse tap_config_response = 40;
BleStreamTick ble_stream_tick = 41;
}
}
@@ -141,11 +144,13 @@ message AccelDeadzoneResponse {
// Host → master: enable/disable slave accel ESP-NOW stream (~16 ms per slave).
// write=false: read; write=true: apply. client_id 0 invalid for write (use >0 or all_clients).
// period_ms (8–16): BLE host push interval for BleStreamTick; ignored on UART (default 16).
message AccelStreamRequest {
bool write = 1;
bool enable = 2;
uint32 client_id = 3;
bool all_clients = 4;
uint32 period_ms = 5;
}
message AccelStreamResponse {
@@ -257,6 +262,13 @@ message CacheStatusResponse {
repeated CacheClientStatus clients = 1 [(nanopb).max_count = 16];
}
/** Master → host over BLE notify: aggregated cache + ESP timer timestamp. */
message BleStreamTick {
uint64 esp_timestamp_us = 1;
uint32 period_ms = 2;
repeated CacheClientStatus clients = 3 [(nanopb).max_count = 16];
}
message EspNowUnicastTestRequest {
uint32 client_id = 1;
uint32 seq = 2;