release(firmware): v0.6.9-esp32 — sync-packet wired, CONFIG_C6_SYNC_EVERY_N_FRAMES tunable

Bundles the iter 8 + iter 9 sync-packet work (§A0.11 + §A0.12) into a
shipped release. v0.6.8 didn't carry the sync emission; v0.6.9 closes
the loop.

What ships:
- csi_collector emits a 32-byte UDP sync packet (magic 0xC511A110)
  every CONFIG_C6_SYNC_EVERY_N_FRAMES CSI callbacks (default 20).
- New Kconfig knob lets operators tune cadence from ~0.1 Hz (N=1000)
  to ~10 Hz (N=1) without rebuilding — sensible defaults for
  mainstream multistatic at ~2 s sync interval.
- Backwards-compatible at the wire level: old aggregators drop the new
  magic on existing parser mismatch path.

Build artifacts (both green on IDF v5.4):
- S3 8 MB: 1094 KB, 47% partition slack
- C6 4 MB: 1019 KB, 45% partition slack

The macro define was renamed from SYNC_EVERY_N_FRAMES to
CONFIG_C6_SYNC_EVERY_N_FRAMES so the Kconfig generator wires through.
Header guard preserves the default for builds without the kconfig
applied.

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
ruv 2026-05-23 12:41:19 -04:00
parent d2effcc6f6
commit 4e1b62ab4f
3 changed files with 26 additions and 5 deletions

View File

@ -402,6 +402,20 @@ menu "ESP32-C6 capabilities (ADR-110)"
range 1 13
depends on C6_SOFTAP_HE_ENABLE
config C6_SYNC_EVERY_N_FRAMES
int "Sync-packet emission cadence (CSI frames per sync)"
default 20
range 1 1000
help
How many CSI callbacks fire before csi_collector emits one
ADR-110 §A0.11 sync packet (magic 0xC511A110) carrying the
mesh-aligned epoch + sequence high-water for the host
aggregator to pair against incoming CSI frames.
Default 20 = ~2 s between sync packets at the bench's
observed 10 fps CSI rate. Raise for less wire overhead;
lower for tighter multistatic alignment windows.
endmenu
menu "ADR-018 frame extensions (ADR-110)"

View File

@ -296,14 +296,21 @@ static void wifi_csi_callback(void *ctx, wifi_csi_info_t *info)
(int8_t)info->rx_ctrl.rssi, info->rx_ctrl.channel);
}
/* ADR-110 §A0.11 — Emit a sync-packet every SYNC_EVERY_N CSI frames so the
/* ADR-110 §A0.11/§A0.12 — Emit a sync-packet every N CSI frames so the
* host aggregator can pair node-local sequence numbers with the mesh-aligned
* epoch coming out of c6_sync_espnow_get_epoch_us(). Backwards-compatible
* with the ADR-018 frame format: new packet uses a distinct magic so the
* existing CSI parser can dispatch by first 4 bytes. */
* existing CSI parser can dispatch by first 4 bytes.
*
* Cadence is operator-tunable via CONFIG_C6_SYNC_EVERY_N_FRAMES (default 20).
* At 10 Hz observed CSI rate that's ~2 s between sync packets; raise to 50
* for ~5 s (less overhead, slower convergence), lower to 5 for ~0.5 s
* (heavier wire, tighter ADR-029/030 multistatic alignment window). */
{
#define SYNC_EVERY_N_FRAMES 20 /* ~1 Hz at the 20 Hz send-rate gate */
if ((s_cb_count % SYNC_EVERY_N_FRAMES) == 0) {
#ifndef CONFIG_C6_SYNC_EVERY_N_FRAMES
#define CONFIG_C6_SYNC_EVERY_N_FRAMES 20
#endif
if ((s_cb_count % CONFIG_C6_SYNC_EVERY_N_FRAMES) == 0) {
uint8_t sync[32];
uint32_t sync_magic = 0xC511A110u; /* CSI-ADR-110 sync packet */
uint64_t local_us = (uint64_t)esp_timer_get_time();

View File

@ -1 +1 @@
0.6.8
0.6.9