bump to 1.17.3

This commit is contained in:
liquidraver
2026-08-25 14:26:35 +02:00
parent ea86815c95
commit 4632797e3e
4 changed files with 282 additions and 233 deletions
+3 -3
View File
@@ -24,9 +24,9 @@ env:
# Release artifacts are still built and attached, so a manual download and
# flash works exactly as usual.
#
# 1.17.1: normal release. (1.17.0 was bumped but never pushed to master, so it
# was never published — 1.17.1 is the first release since 1.16.8 and its notes
# carry the 1.17.0 content forward.)
# "false" is the normal state. It is easy to leave this on "true" and then
# silently keep shipping nothing to the configurator, so check it when cutting
# a release rather than assuming.
prerelease: "false"
jobs:
@@ -0,0 +1,49 @@
# ZephCore 1.17.3-zephcore
One fix. The antenna amplifier setting added in 1.17.2 switched the amplifier off completely instead
of just its receive boost, leaving those nodes barely able to hear anything.
> [!NOTE]
> Upgrading from 1.17.2 is straightforward — your contacts, settings and phone pairing all survive.
> **If you never touched `radio.fem.rxgain`, nothing about your node changes.** The default is on, and
> on behaves exactly as it did.
---
## `radio.fem.rxgain 0` no longer makes a node deaf
Some boards carry an extra amplifier chip between the radio and the antenna. 1.17.2 added
`set radio.fem.rxgain 0` to switch off its receive boost and save the current that part draws, while
leaving transmit untouched.
It switched off the entire amplifier instead. With the chip powered down, nothing reaches the receiver
— not the boost, and not the signal either. Measured on a Heltec V4.3 that was about **69 dB** of loss,
where the setting promised around 16 dB. One node could no longer hear its own repeater from 50 metres
away.
The setting now does what it says. The signal goes **around** the amplifier's receive boost rather than
through it, costing about **17 dB**, and the chip stays powered — so transmit, and everything else, are
unaffected. If you deliberately switched it off to save power, it now costs you what it was always
supposed to cost.
Available on the **Heltec T096**, **Wireless Tracker V2** and **WiFi LoRa 32 V4.3**.
> [!IMPORTANT]
> **The WiFi LoRa 32 V4 no longer has this setting.** Its amplifier is a different chip with no separate
> receive-side control, so there was never a working version of this on the V4 — it only ever got the
> broken behaviour. It now replies `Error: unsupported`. If you had switched it off on a V4, that node
> gets its hearing back, and simply stops saving the current it was trying to save.
> [!NOTE]
> The 17 dB figure was measured on a V4.3. The T096 and Wireless Tracker V2 use the same amplifier and
> are wired the same way, but were not measured — if the number looks different on yours, please say so.
---
## Also in this release
Nothing here changes how a node behaves.
- **A build fix.** After resetting the Zephyr sources by hand, a rebuild could quietly skip re-applying
ZephCore's patches and produce firmware without them. It now checks the sources instead of trusting a
marker file. This only ever affected people building from source.
+1 -1
View File
@@ -578,7 +578,7 @@ add_definitions(-DFIRMWARE_BUILD_EPOCH=${ZEPHCORE_BUILD_EPOCH}u)
# release is tagged/named, and what the Mesh America catalog uses as its version
# key — so the configurator can match a running device against the catalog. Keep
# all four identical; the release workflow reads this value directly.
set(ZEPHCORE_FIRMWARE_VERSION "1.17.2-zephcore")
set(ZEPHCORE_FIRMWARE_VERSION "1.17.3-zephcore")
add_definitions(-DFIRMWARE_VERSION="${ZEPHCORE_FIRMWARE_VERSION}")
add_subdirectory(lib/monocypher)
+229 -229
View File
@@ -1,229 +1,229 @@
# ZephCore Common Configuration
# Included by ALL boards regardless of MCU (nRF52, nRF54L, ESP32, MG24, etc.)
# Contains application-level settings and platform-agnostic BLE/storage/radio config.
#
# Platform-specific configs (nrf52_common.conf, esp32_common.conf, etc.) only
# contain overrides and additions unique to that platform.
# ========== Core Settings ==========
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=8192
CONFIG_EVENTS=y
CONFIG_CPP=y
CONFIG_STD_CPP17=y
# ========== Printf Formatting ==========
# Enable floating point support in printf/sprintf (required for CLI)
CONFIG_CBPRINTF_FP_SUPPORT=y
# ========== Crypto (PSA) ==========
# Required for mesh encryption (AES-ECB, SHA256, HMAC)
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
CONFIG_PSA_WANT_ALG_SHA_256=y
CONFIG_PSA_WANT_ALG_ECB_NO_PADDING=y
CONFIG_PSA_WANT_KEY_TYPE_AES=y
CONFIG_PSA_WANT_ALG_HMAC=y
CONFIG_PSA_WANT_KEY_TYPE_HMAC=y
# ========== Stack Protection ==========
CONFIG_HW_STACK_PROTECTION=y
# ========== Hardware Basics ==========
CONFIG_ADC=y
CONFIG_HWINFO=y
CONFIG_REBOOT=y
# Portable CPU cycle counter (DWT on Cortex-M, CCOUNT on Xtensa) — the fast
# clock of ZephyrRNG's universal two-clock beat entropy source. Small: enables
# the DWT counter on ARM; no timekeeping impact.
CONFIG_TIMING_FUNCTIONS=y
# ========== LoRa ==========
CONFIG_LORA=y
CONFIG_LORA_MODULE_BACKEND_NATIVE=y
CONFIG_REGULATOR=y
# ========== Display Subsystem ==========
# Display and CFB are auto-enabled by ZEPHCORE_UI_DISPLAY (Kconfig select)
# when "zephyr,display" chosen node exists in the board's devicetree.
# No need to set CONFIG_DISPLAY or CONFIG_CHARACTER_FRAMEBUFFER here.
# Heap baseline — display boards override for larger framebuffers.
CONFIG_HEAP_MEM_POOL_SIZE=2048
# ========== Sensor Subsystem ==========
# Sensors are auto-detected at runtime via I2C scan
CONFIG_SENSOR=y
CONFIG_I2C=y
# ========== GNSS Subsystem ==========
# Driver auto-selected from board DTS compatible (zero overhead if no GNSS in DT):
# quectel,lc76g -> Quectel LCx6G driver
# luatos,air530z -> LuatOS Air530Z driver
# gnss-nmea-generic -> passive NMEA parser
CONFIG_GNSS=y
CONFIG_MODEM_MODULES=y
# ========== BLE Stack (common to ALL platforms) ==========
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
# Note: not using upstream BT_ZEPHYR_NUS service — its macro hardcodes
# plaintext permissions on the CCC and RX char. We define our own NUS
# service in adapters/ble/ZephyrBLE.cpp with BT_GATT_PERM_WRITE_AUTHEN
# to force reactive pairing per Apple ADG §55. UUID macros from nus.h
# are still used (header is always available regardless of Kconfig).
CONFIG_BT_DEVICE_NAME="MeshCore"
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=29
# GAP Device Name is read-only over BLE. Renames happen via the
# NUS-protected CMD_SET_ADVERT_NAME command, which updates prefs.node_name,
# calls bt_set_name(), and triggers an adv-data rebuild (see
# zephcore_ble_update_name in ZephyrBLE.cpp). Allowing GAP writes would
# (a) expose an unbonded-peer rename surface (default perm is plain WRITE
# unless WRITABLE_AUTHEN is also set), and (b) create two sources of
# truth — the GAP write updates bt_get_name() but not prefs.node_name,
# so the advertised name wouldn't track the GAP-written name.
# CONFIG_BT_DEVICE_NAME_GATT_WRITABLE=y
CONFIG_BT_DEVICE_APPEARANCE=0
CONFIG_BT_MAX_CONN=1
# SMP: MITM passkey, bonding, enforce bonding
CONFIG_BT_SMP=y
CONFIG_BT_SMP_ENFORCE_MITM=y
CONFIG_BT_APP_PASSKEY=y
CONFIG_BT_BONDABLE=y
CONFIG_BT_BONDING_REQUIRED=y
CONFIG_BT_MAX_PAIRED=5
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
# Connection parameter update — disabled because we apply conn params
# manually after initial sync completes (zephcore_ble_conn_params_ready).
# The auto-update would fire too early and disrupt channel/contact sync.
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n
# MTU max (controller limit 251, L2CAP MTU 247, ATT payload 244)
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_L2CAP_TX_MTU=247
# 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
# Data Length Extension update support (host side)
CONFIG_BT_USER_DATA_LEN_UPDATE=y
# PHY update callback — lets us log the negotiated PHY and sequence DLE
# after the PHY procedure completes (avoids LL procedure collision).
#
# NOTE: BT_USER_PHY_UPDATE disables BT_AUTO_PHY_UPDATE (Kconfig default).
# We intentionally do NOT set BT_AUTO_PHY_UPDATE — peripheral-initiated
# PHY updates cause iOS disconnects. The phone (central) initiates PHY
# update and le_phy_updated fires regardless. Coded PHY can be requested
# manually after security is established (future enhancement).
CONFIG_BT_USER_PHY_UPDATE=y
# Privacy disabled — Android's Flutter BLE plugin fails to connect to
# RPA-advertised devices from app context (system BT settings works fine).
# Arduino MeshCore doesn't use RPA either. Actual link security comes from
# SMP pairing (passkey + SC + MITM + bonding), not address privacy.
# CONFIG_BT_PRIVACY=y
# NOTE: SC_PAIR_ONLY intentionally NOT set — Windows can't handle SC passkey
# pairing (never prompts for PIN). Allowing both Legacy and SC lets Windows
# pair with Legacy while iOS/Android use SC.
# Disable Extended Advertising (ALL boards)
# Some controllers (MG24, ESP32) auto-select ext adv PDUs.
# Web Bluetooth (Chrome) can't discover devices using ext adv PDUs.
# Legacy ADV_IND works universally with all BLE scanners and web apps.
CONFIG_BT_EXT_ADV=n
# Device Information Service (Apple requirement)
CONFIG_BT_DIS=y
CONFIG_BT_DIS_MANUF_NAME=y
CONFIG_BT_DIS_MANUF_NAME_STR="ZephCore"
CONFIG_BT_DIS_MODEL_NUMBER=y
CONFIG_BT_DIS_MODEL_NUMBER_STR="ZephCore"
CONFIG_BT_DIS_FW_REV=y
# Keep in sync with ZEPHCORE_FIRMWARE_VERSION in CMakeLists.txt (the single source
# of truth for the C side, injected as -DFIRMWARE_VERSION). This Kconfig value can't
# read a C macro, so it must be bumped here too. Phones that read DIS and phones
# that query CMD_DEVICE_QUERY should see the same version.
CONFIG_BT_DIS_FW_REV_STR="1.17.2-zephcore"
CONFIG_BT_DIS_SW_REV=y
CONFIG_BT_DIS_SW_REV_STR="Zephyr"
CONFIG_BT_DIS_PNP=n
# Service Changed — lets bonded phones invalidate cached handles after a GATT
# layout bump (ZEPHCORE_GATT_LAYOUT_VERSION in ZephyrBLE.cpp) without re-pairing.
CONFIG_BT_GATT_SERVICE_CHANGED=y
# Disable GATT Caching (Robust Caching / Database Hash)
# With caching enabled (Kconfig default), Zephyr silently drops ATT requests
# from "change-unaware" clients after the GATT database changes. This breaks
# service discovery on phones that enable Robust Caching (modern iOS/Android).
# Arduino SoftDevice has no GATT caching — disabling matches that behavior.
# Layout migration: global ble/gatt_layout = firmware layout epoch (saved on boot,
# diagnostic only); per-peer ble/gatt_peer/* drives Service Changed and is dropped
# on unpair/eviction via the bond_deleted callback.
CONFIG_BT_GATT_CACHING=n
# Persistent bonds (NVS)
CONFIG_BT_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
# ========== Flash & Storage (common to ALL platforms) ==========
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_SETTINGS=y
# BLE bonds via file-based settings on LittleFS (all platforms)
CONFIG_NVS=n
CONFIG_SETTINGS_NVS=n
CONFIG_SETTINGS_FILE=y
CONFIG_SETTINGS_FILE_PATH="/lfs/settings"
# LittleFS for DataStore
CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y
CONFIG_FS_LITTLEFS_NUM_FILES=8
CONFIG_FS_LITTLEFS_NUM_DIRS=4
CONFIG_FS_LITTLEFS_CACHE_SIZE=256
CONFIG_FILE_SYSTEM_MKFS=y
# ========== Input Subsystem ==========
CONFIG_INPUT=y
CONFIG_INPUT_EVENT_DUMP=n
# Synchronous mode: callbacks run in reporting context (GPIO ISR / syswq)
# instead of a dedicated 1KB input thread. Saves a thread stack.
CONFIG_INPUT_MODE_SYNCHRONOUS=y
# ========== Logging ==========
# Log backend tuning lives in boards/common/debug.conf (opt-in).
# Silence USB CH9 control-transfer spam (dozens of INF lines during enumeration).
# WRN keeps real USB errors visible.
CONFIG_USBD_LOG_LEVEL_WRN=y
# ========== Power Management ==========
CONFIG_POWEROFF=y
# ========== LoRa Power Saving ==========
# RX duty cycle defaults are in Kconfig:
# OFF for all roles by default
# LR1110 remains explicitly unsupported (mid-preamble lock bug)
# Override at runtime via CLI "set rxduty on/off".
# ========== ZephCore Log Levels ==========
# Defaults are INF for all modules (Kconfig default — no explicit =y needed).
# Override per-module on command line if needed:
# -DCONFIG_ZEPHCORE_BLE_LOG_LEVEL_DBG=y (BLE adapter only)
# -DCONFIG_ZEPHCORE_MAIN_LOG_LEVEL_DBG=y (mesh, companion, basechat, utils)
# ZephCore Common Configuration
# Included by ALL boards regardless of MCU (nRF52, nRF54L, ESP32, MG24, etc.)
# Contains application-level settings and platform-agnostic BLE/storage/radio config.
#
# Platform-specific configs (nrf52_common.conf, esp32_common.conf, etc.) only
# contain overrides and additions unique to that platform.
# ========== Core Settings ==========
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=8192
CONFIG_EVENTS=y
CONFIG_CPP=y
CONFIG_STD_CPP17=y
# ========== Printf Formatting ==========
# Enable floating point support in printf/sprintf (required for CLI)
CONFIG_CBPRINTF_FP_SUPPORT=y
# ========== Crypto (PSA) ==========
# Required for mesh encryption (AES-ECB, SHA256, HMAC)
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
CONFIG_PSA_WANT_ALG_SHA_256=y
CONFIG_PSA_WANT_ALG_ECB_NO_PADDING=y
CONFIG_PSA_WANT_KEY_TYPE_AES=y
CONFIG_PSA_WANT_ALG_HMAC=y
CONFIG_PSA_WANT_KEY_TYPE_HMAC=y
# ========== Stack Protection ==========
CONFIG_HW_STACK_PROTECTION=y
# ========== Hardware Basics ==========
CONFIG_ADC=y
CONFIG_HWINFO=y
CONFIG_REBOOT=y
# Portable CPU cycle counter (DWT on Cortex-M, CCOUNT on Xtensa) — the fast
# clock of ZephyrRNG's universal two-clock beat entropy source. Small: enables
# the DWT counter on ARM; no timekeeping impact.
CONFIG_TIMING_FUNCTIONS=y
# ========== LoRa ==========
CONFIG_LORA=y
CONFIG_LORA_MODULE_BACKEND_NATIVE=y
CONFIG_REGULATOR=y
# ========== Display Subsystem ==========
# Display and CFB are auto-enabled by ZEPHCORE_UI_DISPLAY (Kconfig select)
# when "zephyr,display" chosen node exists in the board's devicetree.
# No need to set CONFIG_DISPLAY or CONFIG_CHARACTER_FRAMEBUFFER here.
# Heap baseline — display boards override for larger framebuffers.
CONFIG_HEAP_MEM_POOL_SIZE=2048
# ========== Sensor Subsystem ==========
# Sensors are auto-detected at runtime via I2C scan
CONFIG_SENSOR=y
CONFIG_I2C=y
# ========== GNSS Subsystem ==========
# Driver auto-selected from board DTS compatible (zero overhead if no GNSS in DT):
# quectel,lc76g -> Quectel LCx6G driver
# luatos,air530z -> LuatOS Air530Z driver
# gnss-nmea-generic -> passive NMEA parser
CONFIG_GNSS=y
CONFIG_MODEM_MODULES=y
# ========== BLE Stack (common to ALL platforms) ==========
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
# Note: not using upstream BT_ZEPHYR_NUS service — its macro hardcodes
# plaintext permissions on the CCC and RX char. We define our own NUS
# service in adapters/ble/ZephyrBLE.cpp with BT_GATT_PERM_WRITE_AUTHEN
# to force reactive pairing per Apple ADG §55. UUID macros from nus.h
# are still used (header is always available regardless of Kconfig).
CONFIG_BT_DEVICE_NAME="MeshCore"
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=29
# GAP Device Name is read-only over BLE. Renames happen via the
# NUS-protected CMD_SET_ADVERT_NAME command, which updates prefs.node_name,
# calls bt_set_name(), and triggers an adv-data rebuild (see
# zephcore_ble_update_name in ZephyrBLE.cpp). Allowing GAP writes would
# (a) expose an unbonded-peer rename surface (default perm is plain WRITE
# unless WRITABLE_AUTHEN is also set), and (b) create two sources of
# truth — the GAP write updates bt_get_name() but not prefs.node_name,
# so the advertised name wouldn't track the GAP-written name.
# CONFIG_BT_DEVICE_NAME_GATT_WRITABLE=y
CONFIG_BT_DEVICE_APPEARANCE=0
CONFIG_BT_MAX_CONN=1
# SMP: MITM passkey, bonding, enforce bonding
CONFIG_BT_SMP=y
CONFIG_BT_SMP_ENFORCE_MITM=y
CONFIG_BT_APP_PASSKEY=y
CONFIG_BT_BONDABLE=y
CONFIG_BT_BONDING_REQUIRED=y
CONFIG_BT_MAX_PAIRED=5
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
# Connection parameter update — disabled because we apply conn params
# manually after initial sync completes (zephcore_ble_conn_params_ready).
# The auto-update would fire too early and disrupt channel/contact sync.
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n
# MTU max (controller limit 251, L2CAP MTU 247, ATT payload 244)
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_L2CAP_TX_MTU=247
# 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
# Data Length Extension update support (host side)
CONFIG_BT_USER_DATA_LEN_UPDATE=y
# PHY update callback — lets us log the negotiated PHY and sequence DLE
# after the PHY procedure completes (avoids LL procedure collision).
#
# NOTE: BT_USER_PHY_UPDATE disables BT_AUTO_PHY_UPDATE (Kconfig default).
# We intentionally do NOT set BT_AUTO_PHY_UPDATE — peripheral-initiated
# PHY updates cause iOS disconnects. The phone (central) initiates PHY
# update and le_phy_updated fires regardless. Coded PHY can be requested
# manually after security is established (future enhancement).
CONFIG_BT_USER_PHY_UPDATE=y
# Privacy disabled — Android's Flutter BLE plugin fails to connect to
# RPA-advertised devices from app context (system BT settings works fine).
# Arduino MeshCore doesn't use RPA either. Actual link security comes from
# SMP pairing (passkey + SC + MITM + bonding), not address privacy.
# CONFIG_BT_PRIVACY=y
# NOTE: SC_PAIR_ONLY intentionally NOT set — Windows can't handle SC passkey
# pairing (never prompts for PIN). Allowing both Legacy and SC lets Windows
# pair with Legacy while iOS/Android use SC.
# Disable Extended Advertising (ALL boards)
# Some controllers (MG24, ESP32) auto-select ext adv PDUs.
# Web Bluetooth (Chrome) can't discover devices using ext adv PDUs.
# Legacy ADV_IND works universally with all BLE scanners and web apps.
CONFIG_BT_EXT_ADV=n
# Device Information Service (Apple requirement)
CONFIG_BT_DIS=y
CONFIG_BT_DIS_MANUF_NAME=y
CONFIG_BT_DIS_MANUF_NAME_STR="ZephCore"
CONFIG_BT_DIS_MODEL_NUMBER=y
CONFIG_BT_DIS_MODEL_NUMBER_STR="ZephCore"
CONFIG_BT_DIS_FW_REV=y
# Keep in sync with ZEPHCORE_FIRMWARE_VERSION in CMakeLists.txt (the single source
# of truth for the C side, injected as -DFIRMWARE_VERSION). This Kconfig value can't
# read a C macro, so it must be bumped here too. Phones that read DIS and phones
# that query CMD_DEVICE_QUERY should see the same version.
CONFIG_BT_DIS_FW_REV_STR="1.17.3-zephcore"
CONFIG_BT_DIS_SW_REV=y
CONFIG_BT_DIS_SW_REV_STR="Zephyr"
CONFIG_BT_DIS_PNP=n
# Service Changed — lets bonded phones invalidate cached handles after a GATT
# layout bump (ZEPHCORE_GATT_LAYOUT_VERSION in ZephyrBLE.cpp) without re-pairing.
CONFIG_BT_GATT_SERVICE_CHANGED=y
# Disable GATT Caching (Robust Caching / Database Hash)
# With caching enabled (Kconfig default), Zephyr silently drops ATT requests
# from "change-unaware" clients after the GATT database changes. This breaks
# service discovery on phones that enable Robust Caching (modern iOS/Android).
# Arduino SoftDevice has no GATT caching — disabling matches that behavior.
# Layout migration: global ble/gatt_layout = firmware layout epoch (saved on boot,
# diagnostic only); per-peer ble/gatt_peer/* drives Service Changed and is dropped
# on unpair/eviction via the bond_deleted callback.
CONFIG_BT_GATT_CACHING=n
# Persistent bonds (NVS)
CONFIG_BT_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
# ========== Flash & Storage (common to ALL platforms) ==========
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_SETTINGS=y
# BLE bonds via file-based settings on LittleFS (all platforms)
CONFIG_NVS=n
CONFIG_SETTINGS_NVS=n
CONFIG_SETTINGS_FILE=y
CONFIG_SETTINGS_FILE_PATH="/lfs/settings"
# LittleFS for DataStore
CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y
CONFIG_FS_LITTLEFS_NUM_FILES=8
CONFIG_FS_LITTLEFS_NUM_DIRS=4
CONFIG_FS_LITTLEFS_CACHE_SIZE=256
CONFIG_FILE_SYSTEM_MKFS=y
# ========== Input Subsystem ==========
CONFIG_INPUT=y
CONFIG_INPUT_EVENT_DUMP=n
# Synchronous mode: callbacks run in reporting context (GPIO ISR / syswq)
# instead of a dedicated 1KB input thread. Saves a thread stack.
CONFIG_INPUT_MODE_SYNCHRONOUS=y
# ========== Logging ==========
# Log backend tuning lives in boards/common/debug.conf (opt-in).
# Silence USB CH9 control-transfer spam (dozens of INF lines during enumeration).
# WRN keeps real USB errors visible.
CONFIG_USBD_LOG_LEVEL_WRN=y
# ========== Power Management ==========
CONFIG_POWEROFF=y
# ========== LoRa Power Saving ==========
# RX duty cycle defaults are in Kconfig:
# OFF for all roles by default
# LR1110 remains explicitly unsupported (mid-preamble lock bug)
# Override at runtime via CLI "set rxduty on/off".
# ========== ZephCore Log Levels ==========
# Defaults are INF for all modules (Kconfig default — no explicit =y needed).
# Override per-module on command line if needed:
# -DCONFIG_ZEPHCORE_BLE_LOG_LEVEL_DBG=y (BLE adapter only)
# -DCONFIG_ZEPHCORE_MAIN_LOG_LEVEL_DBG=y (mesh, companion, basechat, utils)