Commit Graph
177 Commits
Author SHA1 Message Date
mikecarper 493e188894 feat: integrate R8 observer and companion updates 2026-08-28 18:39:26 -07:00
mikecarper 2143d3e04b Merge upstream dev companion CLI updates 2026-08-28 17:31:28 -07:00
mikecarper 6d6c89e411 fix: harden ESP-NOW and full companion networking
Add selectable shared ESP-NOW channels, raw/wrapped bridge compatibility, and bounded fragmentation for maximum-size packets.\n\nGive ESP32 Full profiles WiFi coexistence, stabilize WebConfig and USB terminal lifecycles, and keep disabled bridges stopped during observer updates.\n\nUpdate generated UI, firmware selection, documentation, and regression coverage.
2026-08-28 16:36:34 -07:00
mikecarper bd3a94bddb fix: harden firmware builds and runtime reliability 2026-08-26 15:42:12 -07:00
mikecarper b7e0445451 fix: default advert location to stored preferences 2026-08-25 23:47:40 -07:00
mikecarper f1515ef1c6 feat: retain multi-channel voltage telemetry 2026-08-25 22:51:22 -07:00
mikecarper 8705e7f551 feat: add selective flood retry rules 2026-08-25 21:38:23 -07:00
mikecarper ba2170d21b feat: add capability-aware firmware build profiles 2026-08-25 20:07:09 -07:00
mikecarper 9b5541a44d Harden external radio recovery and power limits 2026-08-25 10:27:26 -07:00
mikecarper e7433abb80 Make RXPS preamble adaptive for fast radio settings 2026-08-24 20:42:54 -07:00
Scott Powell 5a162ff4c6 * new DynamicConfigSerializer
* board/variant KeyValueStore now can write to 'custom' object in Json prefs
2026-08-24 17:12:56 +10:00
mikecarper 5362d36ac7 Unify full firmware profiles and add dual USB logging 2026-08-23 19:22:45 -07:00
Scott Powell 47b0b7b3b8 * T096, and Station G3: refactoring the 'FEM' prefs to variant-specific code
* CommonCLI: 'FEM' commands removed
* introduced static no-op attachDynamicPrefs() for all boards
2026-08-24 01:50:22 +10:00
Scott Powell 2c0ace2519 * new TXT_TYPE_CLI_COMMAND (3) 2026-08-23 22:04:05 +10:00
mikecarper fec74517ee Add normalradio to common CLI 2026-08-19 12:44:49 -07:00
mikecarper e742333a0e Update MeshCore features and OTA layout handling 2026-08-18 23:17:42 -07:00
mikecarper 7a4da3ccfb Fix Cascade power saving, USB Companion, and mOTA flows 2026-08-18 14:02:10 -07:00
mikecarper 9161dfd7d5 Expose RX power saving in WebConfig 2026-08-15 09:07:41 -07:00
mikecarper 7605b12cc7 Merge remote-tracking branch 'review/observer-firmware' into keymindCascade
# Conflicts:
#	.github/workflows/build-observer-firmwares.yml
#	.gitignore
#	MQTT_IMPLEMENTATION.md
#	MQTT_INTERNALS.md
#	README.md
#	STABILITY_TESTABILITY_HANDOFF.md
#	docs/cli_commands.md
#	examples/companion_radio/MyMesh.cpp
#	examples/simple_repeater/MyMesh.cpp
#	examples/simple_repeater/UITask.cpp
#	examples/simple_room_server/MyMesh.cpp
#	examples/simple_room_server/UITask.cpp
#	examples/simple_sensor/SensorMesh.cpp
#	platformio.ini
#	scripts/generate_webconfig_html.py
#	scripts/webconfig_mock_server.py
#	src/helpers/CommonCLI.cpp
#	src/helpers/CommonCLI.h
#	src/helpers/JWTHelper.cpp
#	src/helpers/MQTTDefaults.h
#	src/helpers/MQTTMessageBuilder.cpp
#	src/helpers/MQTTPayloadBuilder.h
#	src/helpers/MQTTPresets.h
#	src/helpers/bridges/MQTTBridge.h
#	src/helpers/esp32/WebConfigServer.cpp
#	src/helpers/esp32/WebConfigServer.h
#	src/helpers/ui/SH1106Display.cpp
#	variants/lilygo_tbeam_SX1262/platformio.ini
#	variants/lilygo_tbeam_SX1276/platformio.ini
#	variants/lilygo_tlora_v2_1/platformio.ini
#	variants/thinknode_m7/platformio.ini
#	webui/index.html
2026-08-14 08:53:02 -07:00
mikecarper c2e64da695 Merge remote-tracking branch 'upstream/dev' into keymindCascade
# Conflicts:
#	examples/companion_radio/MyMesh.cpp
#	examples/companion_radio/NodePrefs.h
#	examples/simple_repeater/MyMesh.cpp
#	examples/simple_room_server/MyMesh.cpp
#	examples/simple_room_server/MyMesh.h
#	examples/simple_sensor/SensorMesh.cpp
#	src/Identity.cpp
#	src/MeshCore.h
#	src/Utils.cpp
#	src/helpers/CommonCLI.cpp
#	src/helpers/CommonCLI.h
#	src/helpers/radiolib/CustomLR2021Wrapper.h
#	src/helpers/radiolib/CustomSX1262Wrapper.h
#	src/helpers/radiolib/CustomSX1268Wrapper.h
#	src/helpers/radiolib/RadioLibWrappers.cpp
#	src/helpers/radiolib/RadioLibWrappers.h
#	src/helpers/ui/SH1106Display.cpp
#	variants/minewsemi_me25ls01/target.cpp
#	variants/minewsemi_me25ls01/target.h
#	variants/muziworks_r1_neo/target.cpp
2026-08-14 08:14:12 -07:00
mikecarper cd824765b4 Prioritize and pace private TempRadio OTA 2026-08-13 17:53:33 -07:00
ripplebiz b09cb27a1f Merge pull request #3106 from ViezeVingertjes/fix/scoped-reply-routing
Fix replies dropped when flood.max.unscoped is low
2026-08-13 15:00:37 +10:00
mikecarper b80971b85f Enable mesh clock sync for infrastructure roles 2026-08-11 15:55:07 -07:00
mikecarper ea3843e0b4 Merge branch 'PowerSaving-v17' of https://github.com/IoTThinks/MeshCore into keymindCascade
# Conflicts:
#	examples/companion_radio/MyMesh.cpp
#	examples/companion_radio/NodePrefs.h
#	examples/simple_repeater/MyMesh.cpp
#	examples/simple_room_server/MyMesh.cpp
#	examples/simple_sensor/SensorMesh.cpp
#	platformio.ini
#	src/MeshCore.h
#	src/helpers/CommonCLI.cpp
#	src/helpers/CommonCLI.h
#	src/helpers/radiolib/CustomSX1262Wrapper.h
#	src/helpers/radiolib/CustomSX1268Wrapper.h
#	src/helpers/radiolib/LR11x0Reset.h
#	src/helpers/radiolib/SX126xReset.h
2026-08-11 13:28:43 -07:00
Kevin Le 7509e51e3d Station G3: Expose, persist, and apply FEM gain preferences. https://github.com/meshcore-dev/MeshCore/pull/3137 2026-08-12 00:07:37 +07:00
mikecarper 2ff1166c15 Fix BLE pairing display and RX gain defaults 2026-08-10 19:42:44 -07:00
agessaman 4bcbcd8ce0 fix(webconfig): pass the build date from the room server too
Adding build_date to the WebConfigServer constructor broke every
*_room_server_observer_mqtt target: simple_room_server constructs the portal as
well, and only simple_repeater was updated. Nothing caught it because every
build run to that point had been a repeater target.
2026-08-08 16:30:56 -07:00
mikecarper 26d6e0f99a Harden message retry replacement and seed testing channel 2026-08-07 23:22:31 -07:00
mikecarper 11b692abfa Harden firmware recovery and retries
Improve companion BLE delivery and idempotent remote CLI retries, make FPF7 persistence atomic with FPF6 migration, verify staged OTA data on resume, and clarify filter policy wildcard and BlackHole semantics.
2026-08-07 16:24:53 -07:00
mikecarper 7f56da7a34 Extend flood policy and harden message retries 2026-08-07 14:26:31 -07:00
agessaman 23066573e5 fix(station-g3): expose FEM gain preferences 2026-08-06 15:29:14 -07:00
mikecarper 5640fe0641 Merge remote-tracking branch 'IoTThinks/PowerSaving-v16' into keymindCascade
# Conflicts:
#	build-iotthinks.sh
#	examples/companion_radio/MyMesh.cpp
#	examples/simple_repeater/MyMesh.cpp
#	src/helpers/CommonCLI.cpp
#	src/helpers/CommonCLI.h
#	variants/rak4631/platformio.ini
2026-08-05 16:28:53 -07:00
mikecarper 61cb8d6e96 Merge upstream dev into keymindCascade
# Conflicts:
#	docs/payloads.md
#	examples/companion_radio/DataStore.cpp
#	examples/companion_radio/DataStore.h
#	examples/companion_radio/MyMesh.cpp
#	examples/companion_radio/MyMesh.h
#	examples/companion_radio/NodePrefs.h
#	examples/companion_radio/main.cpp
#	examples/simple_room_server/MyMesh.cpp
#	examples/simple_room_server/MyMesh.h
#	examples/simple_sensor/SensorMesh.cpp
#	platformio.ini
#	src/Utils.cpp
#	src/helpers/CommonCLI.cpp
#	src/helpers/CommonCLI.h
#	src/helpers/NRF52Board.cpp
#	src/helpers/nrf52/SerialEthernetInterface.cpp
#	src/helpers/radiolib/CustomLLCC68.h
#	src/helpers/radiolib/CustomLLCC68Wrapper.h
#	src/helpers/radiolib/CustomLR1110.h
#	src/helpers/radiolib/CustomSTM32WLxWrapper.h
#	src/helpers/radiolib/CustomSX1262.h
#	src/helpers/radiolib/CustomSX1268.h
#	src/helpers/radiolib/CustomSX1268Wrapper.h
#	src/helpers/ui/ST7735Display.cpp
#	test/mocks/Stream.h
#	variants/minewsemi_me25ls01/target.h
#	variants/wio-tracker-l1/platformio.ini
2026-08-03 14:53:59 -07:00
ViezeVingertjes fad11c90f3 Fix replies dropped when flood.max.unscoped is low 2026-08-03 22:57:12 +02:00
agessaman a3a0a94dc4 feat(mqtt-neighbors): support non-PSRAM observer boards
Neighbors publication was gated on BOARD_HAS_PSRAM. Removing that gate alone
was not enough: the feature built but was inert without PSRAM, because three
allocation sites asked for MALLOC_CAP_SPIRAM (which returns null with no
PSRAM), the bridge's persistent buffer was allocated inside a BOARD_HAS_PSRAM
block, and neighborDiscoverReady() rejected every pass at runtime on
psramFound(). The entry table also did not fit: finishNeighborDiscover put
pubkey_hex[50][65] plus entries[50] on the stack, a 4752-byte frame against
the mesh loop task's 8 KB.

- Gate on MAX_NEIGHBOURS plus PSRAM or an explicit per-variant
  MQTT_NEIGHBORS_WITHOUT_PSRAM opt-in.
- Move the entry table and its hex strings into one heap block sized to the
  pass; the frame drops from 4752 to 304 bytes.
- Prefer PSRAM and fall back to internal DRAM in the mesh-side allocations
  and the ArduinoJson pool; hoist the bridge's persistent buffer out of the
  BOARD_HAS_PSRAM block (psram_malloc already falls back).
- Keep the runtime psramFound() check only where the buffers are sized for
  PSRAM, so a board whose PSRAM failed to init still refuses.
- Size for internal DRAM without PSRAM: 4 KB text buffer and 20 entries per
  publish, keeping the pool to a single block and the peak near 13 KB rather
  than ~35 KB. Oversized tables truncate and report total_neighbors as before.

Enabled on the ESP32-S3 observer envs (Heltec V3/WSL3, RAK3112, Heltec
Tracker v1.1/v2). Left off for the classic ESP32 T-LoRa V2.1-1.6, which is
already limited to one active TLS slot.

Costs ~7.4 KB static DRAM on repeaters and ~9.6 KB on room servers. The
prefs layout is unchanged, so this is neutral for existing devices.
2026-08-03 10:29:54 -07:00
agessaman 34037f202d fix(mqtt-neighbors): budget the JSON pool separately from the publish buffer
ArduinoJson v7 hands out document-pool blocks in fixed 4096-byte chunks, so
the pool is not bounded by the size of the text it serialises to. Budgeting
it at NEIGHBORS_JSON_BUFFER_SIZE starved it once the table grew: a 50-entry
table needs 12541 B of pool against the 10240 B cap, and a starved allocator
sets doc.overflowed(), which makes buildNeighborsMessage return 0 and drop
the entire publish rather than truncating the tail.

Repeaters with roughly 40 or more neighbours therefore published no neighbors
message at all, silently, while smaller tables published normally.

Give the pool its own NEIGHBORS_DOC_POOL_BUDGET and add an explicit
NEIGHBORS_MAX_PUBLISH_ENTRIES cap alongside the existing text-size check.
2026-08-03 10:29:32 -07:00
mikecarper 9b8c68d926 Extend GPIO timers and status reporting 2026-08-03 02:07:03 -07:00
mikecarper 1e009abe4c Add user-controlled GPIO commands 2026-08-02 22:57:17 -07:00
agessaman 5828a3c563 fix(mqtt-neighbors): report unusable heard ages as null
A neighbour heard before the clock is set carries the firmware's unset-clock
default (1715770351, 15 May 2024). Subtracting that from an NTP-synced clock
published ages of ~806 days for neighbours that had just answered a live scope
query, and a backwards clock step reported 0, i.e. "heard just now".

- finishNeighborDiscover() reports the age as unknown ("heard_secs_ago": null)
  when the stored stamp and the current clock come from different epochs, or
  when the clock has stepped backwards
- handleNeighborDiscoverResponse() re-stamps heard_timestamp on a zero-hop scope
  reply, in both the snapshot and the live table, so entries heal once per
  discovery cycle instead of waiting for the neighbour's next advert
- publish ordering places usable ages ahead of unknown ones so a poisoned stamp
  cannot displace fresh entries when the JSON buffer truncates
- document the null case, and the always-present total_neighbors /
  queried_neighbors / truncated fields the payload sample omitted
- add UPSTREAM_BUGS.md, tracking the monotonic-uptime fix to propose upstream
  plus the unclamped subtraction in the companion and CLI readouts

Containment only: upstream still stamps neighbours from the wall clock at
packet-reception time, which on a cold boot always precedes NTP.
2026-07-31 08:54:39 -07:00
agessaman 612c52132c merge: upstream/dev into observer-firmware-dev (2026-07-30, db232808)
Absorbs 106 upstream commits. Seven files conflicted; the substantive one
was upstream's new JSON ConfigSerializer (PR #2982), which replaces the
binary /com_prefs layout with /prefs.json and makes NodePrefs a
ConfigSerializer subclass.

Prefs migration
- Adopt upstream's ConfigSerializer. writeCommonPrefsImage() and its
  documented offsets (0-294) are deleted, along with the now-unreachable
  saveCommonPrefsImageAtomically()/CommonPrefsFileStore atomic rename path.
- Load order is /prefs.json, then /com_prefs, then /node_prefs. Upstream
  dropped the /node_prefs fallback; it is restored here so devices that
  never advanced past that filename keep their config.
- Legacy files are never removed, so migration cannot destroy its own
  source and a deferred or failed save simply retries next boot.
- /com_prefs is treated as a format migration only, not an "upgrade", so
  it does not trip the bridge.source tx->rx flip on existing nodes.
- The MQTTPrefsAtomicStore legacy gate is retained: the observer tail
  recovered from an old-format file still commits to /mqtt_prefs before
  /prefs.json is written.
- MQTTPrefs and /mqtt_prefs are untouched; savePrefs keeps its save_mqtt
  parameter and now returns upstream's bool.

Fixes to upstream code
- RadioPrefs::structure() bound both "rxgain" and "fem_rxgain" to
  rx_boosted_gain, so radio_fem_rxgain was never persisted. Bound to the
  correct field.
- discovery_mod_timestamp was dropped from structure(); it gates
  'since'-filtered DISCOVER replies and is set on every config change, so
  losing it would silently stop discovery responses after a reboot. Added
  as "disc_mod".

Merge artifacts repaired
- Restored bblanchon/ArduinoJson to the native test env; a clean but wrong
  auto-merge at the lib_deps block boundary dropped it and broke all 19
  host test suites.
- Migrated the fork's WebConfig UITask screens off the removed
  DisplayDriver::Color enum to upstream's UIColor element types.
- Removed duplicate getCADEnabled() definitions in companion MyMesh.cpp
  and simple_sensor SensorMesh.cpp that both sides had added.
- Dropped memset(&_prefs, 0, ...) in the four example meshes; NodePrefs now
  has a vtable. guard gains an initializer that memset used to provide.

Other resolutions
- simple_room_server keeps both the fork's discover.* commands and
  upstream's new room.post.
- docs/payloads.md taken from upstream, undoing content earlier merges had
  reverted (Control data section, split login tables).

Verified: 273/273 host tests pass across native and native_kiss_modem;
Heltec v3 repeater, repeater_observer_mqtt, room_server_observer_mqtt,
sensor, and companion_radio_ble all build clean.
2026-07-30 14:56:23 -07:00
mikecarper c19f248d97 Fix firmware matrix build failures 2026-07-30 01:18:21 -07:00
agessaman 8b16af3830 feat(mqtt): add default_scope to neighbor discovery JSON handling
Enhance the neighbor discovery JSON structure by introducing a
default_scope field, which indicates the region name this node
floods to by default. This change improves clarity in the
neighbor discovery process and aligns with the unscoped flood
behavior when no default region is set. Updates include
modifications to the MyMesh class and related message building
functions to accommodate the new field.
2026-07-29 15:00:32 -07:00
mikecarper a6ace6076c Add WebConfig CLI and standalone WiFi controls 2026-07-29 13:13:37 -07:00
mikecarper 0dcb4b7d19 Expand ESP32 FULL neighbor capacity 2026-07-29 13:10:52 -07:00
mikecarper e6abf3ea7d Share WiFi OTA seeding across full ESP32 builds 2026-07-29 01:51:01 -07:00
Che177 5a04e060a5 room_server: use standard mesh debug logging 2026-07-28 21:57:42 -07:00
mikecarper 586423d0d2 Extend repeater flood control and logging reliability 2026-07-28 16:05:52 -07:00
agessaman 52bd27190f feat(mqtt): enhance packet filter functionality with named types
Add support for named packet types in per-slot filters, allowing users
to specify packet types using descriptive names alongside numeric values.
This improves usability and clarity in configuring MQTT slot filters.
Updates include modifications to the parsing logic, WebConfig interface,
and related documentation to reflect the new naming conventions.
2026-07-27 22:29:11 -07:00
Che177 3a9f19c14b room_server: add room.post system posts 2026-07-27 19:50:13 -07:00
agessaman 3c5b25c2cf feat(mqtt): enhance neighbor discovery JSON handling
Introduce new methods to manage neighbor discovery JSON budget and
entries in MyMesh. This includes tracking the number of queried and
published neighbors, measuring JSON sizes, and handling truncation
when the buffer limit is reached. These improvements optimize the
neighbor discovery process and ensure efficient JSON message
construction for MQTT communications.
2026-07-26 19:10:51 -07:00