All notable changes to µMesh will be documented in this file. Format follows Keep a Changelog.
- PHY layer — raw IEEE 802.11 abstraction (
src/phy/); ESP32 port viaesp_wifi_80211_tx+ promiscuous mode (port/esp32/phy_esp32.c); POSIX loopback simulation for host testing (port/posix/phy_posix.c) - Common utilities — CRC16/CCITT (
src/common/crc.c) and ISR-safe SPSC ring buffer (src/common/ring.c) - MAC layer — frame serialization/deserialization with CRC validation
(
src/mac/frame.c); carrier-sense / CCA (src/mac/cca.c); CSMA/CA with binary-exponential backoff, ACK mechanism and up to 4 retries (src/mac/mac.c) - Security layer — AES-128-CTR encryption with per-frame NONCE
(SRC||NET_ID||SEQ||SALT||COUNTER), HMAC-SHA256 4-byte MIC with
constant-time comparison, 32-bit sliding-window replay detection
(
src/sec/sec.c); AES-128-ECB key derivation for ENC_KEY and AUTH_KEY (src/sec/keys.c); optional microcrypt back-end (third_party/microcryptgit submodule) - Network layer — distance-vector routing table with hop×10 + RSSI
penalty metric, 90 s timeout, 16-entry capacity (
src/net/routing.c); JOIN / ASSIGN / LEAVE / NODE_JOINED / NODE_LEFT discovery protocol (src/net/discovery.c); network FSM (UNINIT→SCANNING→JOINING→CONNECTED→DISCONNECTED), periodic ROUTE_UPDATE broadcast (coordinator/router only), SEQ_NUM wrap-around salt regeneration to prevent NONCE reuse (src/net/net.c) - Public API (
include/umesh.h,src/umesh.c) —umesh_init,umesh_start,umesh_stop,umesh_reset,umesh_send,umesh_broadcast,umesh_send_raw,umesh_send_cmd,umesh_on_receive,umesh_on_cmd,umesh_get_info,umesh_get_stats,umesh_err_str - Test suite — 9 test executables (test_crc, test_ring, test_frame,
test_sec, test_posix_loopback, test_mac, test_routing, test_net, test_e2e),
all passing on the POSIX build (
tests/) - Examples — coordinator (
examples/coordinator/main.c) and end-node (examples/end_node/main.c) for ESP32 / ESP-IDF
- BUGFIX-02: END_NODE no longer sends ROUTE_UPDATE (coordinator/router only)
- BUGFIX-03: SEQ_NUM wrap-around triggers
sec_regenerate_salt()to prevent NONCE reuse across counter cycles
- Versioned multi-hop wire frame format with explicit version, source/destination separation, hop limit, flags, payload length, and integrity trailer
- Join and election state binding to stable device identity and transaction tokens
- Context-owned packet identity, replay rejection, and authenticated ACK matching
- Bounded forwarding, duplicate suppression, and route freshness checks
- Power-management corrections, explicit current-estimate API, and unsupported-measurement rejection
- ESP32 compile integration updates, POSIX/ESP32 smoke coverage, and CI workflow
- Release metadata now targets
v1.5.0while keepingv1.4.0historical - Documentation now separates package version, wire protocol version, and compatibility wrappers
- Protected header and ACK handling now reject stale, duplicate, wrong-sender, wrong-destination, and bad-MIC traffic
- Power beacon payload handling now uses explicit 32-bit fields and rejects unsupported claims
- New compile-time target capability header:
include/umesh_caps.h - ESP32 target matrix for ESP32 / S2 / S3 / C3 / C6
- Unsupported target guards for ESP32-H2 and ESP32-C2
- Runtime capability API:
umesh_get_target()umesh_get_wifi_gen()umesh_target_supports(...)
- Extended
umesh_info_twith target metadata (target,wifi_gen,tx_power_max) - ESP32-C6 TWT stub (
port/esp32/twt_esp32c6.c) - New capability tests (
tests/test_caps.c) - New target info example (
examples/target_info/)
- Target-aware CMake source selection for ESP32-C6 TWT stub
UMESH_LOW_MEMORYcompile option support
- Full POSIX test matrix passes with power management ON and OFF
- Compile-time power feature flag:
UMESH_ENABLE_POWER_MANAGEMENT - Runtime power profiles:
ACTIVE,LIGHT,DEEP - Power API (
umesh_set_power_mode,umesh_get_power_mode,umesh_deep_sleep_cycle, statistics, current estimate) - Coordinator
POWER_BEACONcommand for sleep profile signaling - ESP32 + POSIX power HAL implementations
- Deep sleep sensor example (
examples/deep_sleep_sensor/) - Power documentation (
docs/POWER_MANAGEMENT.md)
- With
-DUMESH_ENABLE_POWER_MANAGEMENT=OFF, power API remains available via no-op stubs - Test matrix verified for both PM enabled and disabled
- Split-brain convergence in auto coordinator election
- Auto-router transition from election to connected state
- Coordinator route refresh timestamps (prevents intermittent
NOT_ROUTABLE) - Dashboard/device serial robustness for late-connect status handshake
- 3-node auto-mesh runtime stabilized (1 coordinator + 2 routers)
- 120s hardware capture with active traffic and zero error events
- Auto role mode
UMESH_ROLE_AUTOwith startup coordinator scan window - Election opcodes:
UMESH_CMD_ELECTION(0x57)UMESH_CMD_ELECTION_RESULT(0x58)
- Election flow in network FSM (
UMESH_STATE_ELECTION) - Public API:
umesh_get_role()umesh_is_coordinator()umesh_trigger_election()
- Auto-mesh timing config:
scan_mselection_ms
- New callback:
on_role_elected(umesh_role_t role) - Election unit tests (
tests/test_election.c) - Single-firmware hardware image for auto mode:
tests/hardware/firmware/auto_mesh_node/auto_mesh_node.ino
- Coordinator failover now re-enters scanning/election when coordinator
route updates are not seen within
UMESH_NODE_TIMEOUT_MSin auto mode
- New routing mode enum:
UMESH_ROUTING_DISTANCE_VECTOR(default)UMESH_ROUTING_GRADIENT
- Gradient opcodes:
UMESH_CMD_GRADIENT_BEACON(0x59)UMESH_CMD_GRADIENT_UPDATE(0x5A)
- Neighbor table for gradient routing (distance + RSSI + expiry)
- Uphill forwarding for coordinator-destined packets in gradient mode
- New public API:
umesh_gradient_distance()umesh_get_routing_mode()umesh_gradient_refresh()umesh_get_neighbor_count()umesh_get_neighbor()
- New config/callback fields:
routinggradient_beacon_msgradient_jitter_max_mson_gradient_ready(uint8_t distance)
- Gradient unit tests (
tests/test_gradient.c) - New examples:
examples/gradient_sensor/sensor_node.cexamples/gradient_sensor/coordinator.c
- New API documentation:
docs/API_REFERENCE.md
README.mdnow documents sensor-network gradient mode usagedocs/NETWORK_LAYER.mdnow includes routing-mode guidance and gradient behavior