mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-03 01:03:47 +00:00
Add the MeshCore Room Server role to ZephCore — a store-and-forward shared message room. Clients log in with an admin or guest password and post messages; the server pushes each new post to all other logged-in clients (round-robin, per-client sync cursor, ACK + retry, 3-strike eviction). Ported from upstream MeshCore's simple_room_server, structured as a near-clone of RepeaterMesh so it reuses the proven ACL, region filtering, CLI, adverts and telemetry; the post buffer + push engine are the only net-new pieces: - RoomServerMesh: PostInfo ring (MAX_UNSYNCED_POSTS=32), addPost, pushPostToClient, getUnsyncedCount, processAck, onAckRecv, the loop() push driver; room login (onAnonDataRecv parses the sync_since cursor); posts/admin-CLI/keep-alive (onPeerDataRecv); ADV_TYPE_ROOM advert; ServerStats wire layout; disable_fwd=1. - main_room_server.cpp: event-loop entry (USB serial CLI, no BLE). - Kconfig: ZEPHCORE_ROLE_ROOM_SERVER + ZEPHCORE_MAX_UNSYNCED_POSTS. - CMakeLists role gating; boards/common/room_server.conf. Post frame, SHA-256 ACK and login-reply layouts match upstream for MeshCore app compatibility. Builds for gat562_30s (FLASH 30.95% / RAM 32.46%). Not yet hardware-tested.
20 lines
724 B
Plaintext
20 lines
724 B
Plaintext
# Room server-specific config
|
|
#
|
|
# Build with: -DEXTRA_CONF_FILE="boards/common/room_server.conf"
|
|
#
|
|
# Room servers use USB serial CLI for configuration — no BLE, no bonding, no NUS.
|
|
# This overrides the BLE settings in zephcore_common.conf.
|
|
|
|
# ========== Role Selection ==========
|
|
CONFIG_ZEPHCORE_ROLE_ROOM_SERVER=y
|
|
|
|
# ========== Disable BLE entirely ==========
|
|
# Room servers have zero BLE functionality — all config via USB serial CLI.
|
|
# Saves ~100KB flash and ~30KB RAM on nRF52.
|
|
CONFIG_BT=n
|
|
|
|
# ========== Entropy (required when BT is disabled) ==========
|
|
# BT normally pulls in the entropy subsystem. Without BT, we need it explicitly
|
|
# for Ed25519 key generation, LoRa random delays, etc.
|
|
CONFIG_ENTROPY_GENERATOR=y
|