mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-23 17:42:26 +00:00
acw: airtime-scale jitter caps, companion surroundings awareness
- flood retransmit jitter now capped at min(2000ms, 6·airtime) instead of fixed 2000ms — spreads tighter at SF7, unchanged at SF8 - reactive per-dupe backoff cap now min(2000ms, 12·airtime), keeps semantic of "push past ~12 relay slots" - contention ring 16 → 24 for 50-neighbor hilltops - companions passively track heard floods (warms EMA without forwarding) and spread their own TX by up to min(1000ms, 3·airtime), hopefully fixing repeaters missing companion's first transmission config cleanup: - move BLE TX buffer bumps (ACL_TX=12 etc.) from zephcore_common.conf to esp32_common.conf — the Espressif blob needs them, nRF doesn't, and the bumps were overflowing nRF52840 RAM - remove CONFIG_ZEPHCORE_MAX_CONTACTS=510 overrides from 5 nRF52840 companion boards; Kconfig default of 350 fits with comfortable margin (wio prod: 91% → 79% RAM)
This commit is contained in:
1 parent
cba81af196
commit
ba4b86752d
17 files changed
+1909
-1864
No files matched your search
@@ -15,6 +15,15 @@ CONFIG_BT_PRIVACY=y
|
||||
# BLE thread stacks — ESP32 software BLE controller needs larger stacks
|
||||
CONFIG_BT_TX_PROCESSOR_STACK_SIZE=2048
|
||||
|
||||
# BLE TX buffers — the Espressif BLE controller blob bursts more aggressively
|
||||
# than the nRF softdevice and will deadlock the system workqueue if ACL TX
|
||||
# buffers run dry (bt_hci_cmd_alloc(K_FOREVER) blocks the cooperative syswq).
|
||||
# EVT_RX must strictly exceed ACL_TX (enforced by BUILD_ASSERT in buf.h).
|
||||
CONFIG_BT_BUF_ACL_TX_COUNT=12
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=12
|
||||
CONFIG_BT_CONN_TX_MAX=12
|
||||
CONFIG_BT_BUF_EVT_RX_COUNT=14
|
||||
|
||||
# ========== Heap ==========
|
||||
# ESP32 BLE stack requires larger heap (override zephcore_common 2KB default)
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=32768
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
# Production Config - Common to ALL boards (Companion & Repeater)
|
||||
# Build: west build -b <board> zephcore --pristine -- \
|
||||
# -DEXTRA_CONF_FILE="boards/common/prod.conf"
|
||||
#
|
||||
# Disables logging for smaller binary and lower power consumption.
|
||||
# USB CDC still works for CLI commands on repeaters.
|
||||
|
||||
# Disable logging subsystem (saves ~62KB flash, ~2-5mA power)
|
||||
CONFIG_LOG=n
|
||||
|
||||
# Disable asserts (saves flash, removes CMake warning)
|
||||
CONFIG_ASSERT=n
|
||||
|
||||
# Disable SEGGER RTT (saves ~4KB RAM ring buffer + init code)
|
||||
CONFIG_USE_SEGGER_RTT=n
|
||||
|
||||
# Disable thread name strings (saves flash — only useful for debug)
|
||||
CONFIG_THREAD_NAME=n
|
||||
|
||||
# Max contacts: Kconfig default is 350 (safe for 100KB ExtraFS).
|
||||
# Do NOT set here — EXTRA_CONF_FILE overrides board.conf, which would
|
||||
# prevent boards with more storage (Wio QSPI=510) from raising the limit.
|
||||
# Production Config - Common to ALL boards (Companion & Repeater)
|
||||
# Build: west build -b <board> zephcore --pristine -- \
|
||||
# -DEXTRA_CONF_FILE="boards/common/prod.conf"
|
||||
#
|
||||
# Disables logging for smaller binary and lower power consumption.
|
||||
# USB CDC still works for CLI commands on repeaters.
|
||||
|
||||
# Disable logging subsystem (saves ~62KB flash, ~2-5mA power)
|
||||
CONFIG_LOG=n
|
||||
|
||||
# Disable asserts (saves flash, removes CMake warning)
|
||||
CONFIG_ASSERT=n
|
||||
|
||||
# Disable SEGGER RTT (saves ~4KB RAM ring buffer + init code)
|
||||
CONFIG_USE_SEGGER_RTT=n
|
||||
|
||||
# Disable thread name strings (saves flash — only useful for debug)
|
||||
CONFIG_THREAD_NAME=n
|
||||
|
||||
# Max contacts: Kconfig default is 350 — fits nRF52840 RAM with ~10% headroom
|
||||
# and is safe for 100KB ExtraFS. RAM-limited boards (xiao_nrf54l15=450,
|
||||
# xiao_esp32c3=300) override in their own board.conf. Do not set here.
|
||||
@@ -93,12 +93,11 @@ CONFIG_BT_BUF_ACL_RX_SIZE=251
|
||||
CONFIG_BT_BUF_ACL_TX_SIZE=251
|
||||
CONFIG_BT_L2CAP_TX_MTU=247
|
||||
|
||||
# BLE TX buffers — default 3 is too low, causes system workqueue deadlock
|
||||
# when BLE activity bursts (DLE + param update + ATT) exhaust all buffers
|
||||
# and bt_hci_cmd_alloc(K_FOREVER) blocks the cooperative syswq forever.
|
||||
CONFIG_BT_BUF_ACL_TX_COUNT=12
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=12
|
||||
CONFIG_BT_CONN_TX_MAX=12
|
||||
# BLE TX buffers — platform-specific. ESP32 gets a large bump in
|
||||
# esp32_common.conf to prevent syswq deadlock during BLE bursts (DLE +
|
||||
# param update + ATT exhausting buffers and bt_hci_cmd_alloc(K_FOREVER)
|
||||
# blocking the cooperative syswq). nRF52 uses Zephyr defaults — RAM is
|
||||
# tight on nRF52840 and the nRF controller rarely deadlocks.
|
||||
|
||||
# BLE RX thread stack — default 1200 too small for ATT handlers + logging + asserts
|
||||
CONFIG_BT_RX_STACK_SIZE=2048
|
||||
|
||||
Reference in new issue
Block a user