Commit Graph
2321 Commits
Author SHA1 Message Date
Adam Gessaman ccaaa534ff Added MQTTBridge memory management and debugging capabilities
- Added memory debugging features to log heap usage and fragmentation recovery for MQTT clients.
- Introduced `recreateMqttClientsForFragmentationRecovery()` to manage MQTT client lifecycles and reduce memory fragmentation.
- Updated critical memory checks to log detailed heap statistics and active MQTT client counts.
- Included new debug logging for memory status every 60 seconds when memory debugging is enabled.

This update aims to improve stability and performance in memory-constrained environments.
2026-02-04 18:28:17 -08:00
agessaman 498566e6c9 MQTT bridge: fix memory use, improve status reporting
- Main broker: only allocate _mqtt_client when custom broker configured
  (analyzer-only saves one PsychicMqttClient). Reconnect main broker after
  forced disconnect with 30s throttle; set last_attempt on disconnect so
  throttle applies and avoids reconnect storms on flaky WiFi.
- Analyzer clients: call disconnect() when WiFi transitions to disconnected
  so ESP-IDF frees MQTT buffers (it does not free on WiFi drop). Reduces
  fragmentation and Max drop after disconnect/reconnect cycles.
- get wifi.status: report WiFi uptime (Xd Xh Xm Xs) when WITH_MQTT_BRIDGE.
  Track connect time in bridge; backfill when already connected at first check.
- get mqtt.status: show msgs on/off, broker (connected/disconnected/n/a),
  analyzer US/EU (connected/disconnected/off), and queue count.

Note: PsychicMqttClient change (register event only on first client creation)
belongs in the library repo if committed separately.
2026-02-02 19:09:31 -08:00
Adam GessamanandGitHub 7fda48d5d6 Merge pull request #2 from atoomnetmarc/mqtt-bridge-implementation
Add Heltec_T190_repeater_observer_mqtt environment
2026-02-02 10:06:58 -08:00
agessaman f91b715e51 Refactor MQTTBridge packet handling to clarify ownership and memory management
- Updated comments to specify that the Dispatcher owns the packet memory and should handle freeing.
- Removed unnecessary calls to free queued packets in the MQTTBridge, ensuring only references are discarded.
- Enhanced code clarity regarding packet lifecycle management in the end and processPacketQueue methods.
2026-01-31 22:19:19 -08:00
agessaman ee57731441 Add receive error tracking to Dispatcher and MQTT message builder
- Introduced `getPacketsRecvErrors()` method in `Dispatcher` to track receive errors.
- Updated `buildStatusMessage()` in `MQTTMessageBuilder` to include `recv_errors` parameter.
- Modified `publishStatus()` in `MQTTBridge` to retrieve and send receive error statistics.
- Adjusted `RadioLibWrappers` to override `getPacketsRecvErrors()` for consistency.
2026-01-29 19:18:52 -08:00
atoomnetmarc b20e05bd8b Add Heltec_T190_repeater_observer_mqtt environment 2026-01-29 20:35:23 +01:00
Adam Gessaman 37e51f3eb1 Merge branch 'dev' into mqtt-bridge-implementation 2026-01-29 08:58:58 -08:00
fdlamotteandGitHub acca73f57e Merge pull request #1524 from recrof/thinknode-m3-m6-fixes
Elecrow ThinkNode M3, M6 build errors fix after NRF52Board base class migration
2026-01-29 11:07:32 -04:00
Rastislav Vysoky 2a321b53eb renamed board files 2026-01-29 16:00:19 +01:00
Rastislav Vysoky 3a7ccc085d fixed build errors and typos/inconsistencies 2026-01-29 15:32:51 +01:00
Scott Powell 465776d667 * ver 1.12.0 2026-01-29 21:12:31 +11:00
Liam CottleandGitHub 629adc23c5 Merge pull request #1508 from recrof/rak4631-cleanup
cleanup: moved RAK4631 pindefs from board file to variant.h
2026-01-29 12:35:47 +13:00
Liam CottleandGitHub 8f605f83fc Merge pull request #1507 from recrof/rak3401-board-fix
fix: build errors because of changes in RAK3401Board base class
2026-01-29 12:05:58 +13:00
Rastislav Vysoky f41872420e moved pindefs from board file to variant.h 2026-01-28 17:28:48 +01:00
Rastislav Vysoky d5a73b2394 fix: build errors because of changes in NRF52 base class 2026-01-28 17:18:39 +01:00
ripplebizandGitHub 93367b9f8f Merge pull request #1493 from Cisien/dev
Add a cli command reference document
2026-01-28 15:44:26 +11:00
Liam CottleandGitHub 3fc736e3b0 Merge pull request #1499 from Meshcore-Portugal/jbrazio/2026_2768c833
Update runArgs in devcontainer.json
2026-01-28 16:44:02 +13:00
Chris 4e1e8bbffb Add a cli command reference document 2026-01-27 19:08:04 -08:00
agessaman bb27cdedb6 Fix display header include for heltec_v4 when DISPLAY_CLASS is set directly
When DISPLAY_CLASS is defined via build flags but HELTEC_LORA_V4_OLED
or HELTEC_LORA_V4_TFT flags aren't set, include SSD1306Display.h as
fallback. This fixes compilation errors for environments like
heltec_v4_repeater_observer_mqtt that extend Heltec_lora32_v4 directly
and set DISPLAY_CLASS=SSD1306Display.
2026-01-27 12:52:09 -08:00
agessaman d96c900f10 Merge upstream/dev into mqtt-bridge-implementation
Resolved conflict in variants/heltec_v4/platformio.ini by keeping
detailed comments and PIN_BOARD_SDA/SCL definitions from HEAD.
2026-01-27 12:50:30 -08:00
agessaman 066df192a3 Revert to upstream's _max variable name in RegionMap.cpp
Upstream has fixed the _max macro conflict issue. Accepting their solution.
2026-01-27 12:47:08 -08:00
ripplebizandGitHub 58a3782325 Merge pull request #1497 from oltaco/meshtiny-build-fix
Build fix for Meshtiny
2026-01-28 05:55:01 +11:00
João Brázio 9665feeebf Update runArgs in devcontainer.json 2026-01-27 16:57:54 +00:00
taco 4a83a6658a build fix for meshtiny (nrf52board ota refactor) 2026-01-28 00:59:42 +11:00
fdlamotteandGitHub ac79b38fa6 Merge pull request #1246 from fschrempf/nrf-dcdc
NRF52 boards: Enable internal DC/DC regulator to reduce power consumption and enable OTA support for all boards
2026-01-27 09:02:47 -04:00
fdlamotteandGitHub 3f3978c7d3 Merge branch 'dev' into nrf-dcdc 2026-01-27 08:42:58 -04:00
ripplebizandGitHub c0194d889a Merge pull request #1492 from oltaco/meshtiny
Support for Meshtiny
2026-01-27 19:54:16 +11:00
ripplebizandGitHub fedf703262 Merge pull request #1486 from Quency-D/fix-heltec-v4-tft
Add heltec v4-tft code.
2026-01-27 19:47:20 +11:00
Scott Powell 5ff6e813bd * Fix: RegionMap build fail on _max 2026-01-27 18:16:21 +11:00
Scott Powell 5627500988 * new "clkreboot" CLI command 2026-01-27 15:22:18 +11:00
agessaman 2c99967c35 Refactor BufStream class in RegionMap.cpp to rename max variable for clarity
Updated the variable name from _max to _max_size in the BufStream class to improve code readability and maintainability. This change ensures consistency in naming conventions within the class.
2026-01-26 19:38:04 -08:00
agessaman 2a84e58b3a Merge upstream/dev into mqtt-bridge-responsiveness-changes
Resolved conflicts in:
- examples/simple_repeater/MyMesh.cpp: kept analyzer/MQTT origin code, updated acl.load() signature
- examples/simple_room_server/MyMesh.cpp: kept MQTT bridge init, added acl parameter to _cli constructor
- src/helpers/CommonCLI.cpp: merged MQTT get commands with ADC/power management commands
2026-01-26 19:30:45 -08:00
taco 5a20e8674f support for meshtiny 2026-01-27 14:15:02 +11:00
ripplebizandGitHub d81616ec68 Merge pull request #1476 from mattzzw/region_via_LoRa
Add cli command `region list {allowed|denied}`, enable output of region cmd via remote cli
2026-01-27 11:07:22 +11:00
Matthias Wientapper 0805a47f35 Add output of region cmd via lora cli
Add cli commands "region list {allowed|denied}"
2026-01-26 17:44:43 +01:00
ripplebizandGitHub f1be7d0914 Merge pull request #1488 from liamcottle/firmware/boot-adverts
Change advert on boot from flood to zero hop
2026-01-26 21:55:48 +11:00
liamcottle 7e24bd00b9 increase maximum flood advert interval to 168 hours (7 days) 2026-01-26 23:05:10 +13:00
liamcottle d13bc446de added build flag to enable/disable boot advert 2026-01-26 22:39:39 +13:00
liamcottle ed589f9620 boot adverts are now zero hop instead of flood 2026-01-26 22:20:36 +13:00
ripplebizandGitHub 4b7684c7df Merge pull request #1477 from Cisien/dev
Expose a counter to track RadioLib receive errors
2026-01-26 19:04:48 +11:00
Quency-D c7ac16f0e3 Add v4-tft code. 2026-01-26 13:48:15 +08:00
Scott Powell 7ae164217c * region names now don't need '#' prefix. (SHA still adds a '#' for back compat) 2026-01-25 18:35:55 +11:00
Chris c16bcd2fe3 Expose a counter to track RadioLib receive errors
This change counts when readData returns an err code other than RADIOLIB_ERR_NONE. In most cases this is going to be a CRC error. This counter is exposed in the `stats-packets` command, and in the repeater stats payload (4 additional bytes to the payload, which is now 56 bytes with this change. My incompetent robot claims the total payload size is 96 bytes (unverified but probably close).
2026-01-24 20:06:29 -08:00
ripplebizandGitHub a5f3766016 Merge pull request #1429 from Snayler/dev
Fix Serial and TX LED not working on Heltec Wireless Paper V1.2
2026-01-25 14:58:07 +11:00
ripplebizandGitHub f0269c9bff Merge pull request #1465 from recrof/rak3112-port
initial RAK 3112 support
2026-01-25 14:56:17 +11:00
ripplebizandGitHub 153bcdc6a3 Merge pull request #1457 from oltaco/remote-set-prvkey
Allow set prv.key over LoRa, clear ACL and validate key
2026-01-25 14:46:41 +11:00
agessaman 9e1ce23ed1 Optimize MQTTBridge memory usage and NTP synchronization handling
- Updated NTP synchronization logic to prevent multiple simultaneous syncs, enhancing stability.
- Optimized buffer allocation for JSON messages, reducing stack memory usage by using size-adaptive buffers.
- Improved publish functions to utilize active buffers based on packet size, ensuring efficient memory management.
2026-01-24 17:19:26 -08:00
taco 96ef5e5efe allow set prv.key from remote, validate new prv.key 2026-01-25 01:32:48 +11:00
taco 988287bfd7 recalc ClientACL shared_secrets at startup 2026-01-25 01:32:44 +11:00
taco 6336bd5b72 refactor ClientACL and CommonCLI, add ClientACL::clear() 2026-01-25 01:31:53 +11:00