Commit Graph

95 Commits

Author SHA1 Message Date
Adam Gessaman 8b841d9cfd Merge remote-tracking branch 'origin/dev' into mqtt-bridge-implementation 2026-02-09 09:50:44 -08:00
ripplebiz f6fc05601c Merge pull request #1609 from weebl2000/bridge-always-has-work
Bridge always has work (prevents sleep)
2026-02-08 22:42:05 +11:00
Wessel Nieboer c4c287d01b Bridge always has work (prevents sleep) 2026-02-07 15:39:24 +01:00
Wessel Nieboer d0720c63c2 Allow negative tx power
Like SX1262 allows -9 dBm lowest, some allow lower but that probably
isn't useful
2026-02-06 02:24:51 +01: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
ripplebiz 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
liamcottle ed589f9620 boot adverts are now zero hop instead of flood 2026-01-26 22:20:36 +13:00
ripplebiz 4b7684c7df Merge pull request #1477 from Cisien/dev
Expose a counter to track RadioLib receive errors
2026-01-26 19:04:48 +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
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
agessaman c055228c91 Refactor MQTTBridge connection handling for improved stability and responsiveness
- Simplified connection attempt logic to allow immediate reconnects after failures.
- Added checks to ensure the MQTT client is disconnected before new connection attempts.
- Enhanced error handling during publish operations to reset connection state on failures.
- Removed aggressive health checks that caused connection instability, relying on the MQTT client library for connection management.
- Updated status publishing to verify connection state before attempting to publish, ensuring accurate broker status.
2026-01-22 07:51:38 -08:00
agessaman 39ba020fab Merge upstream/dev into mqtt-bridge-responsiveness-changes
Resolved conflicts in:
- examples/simple_repeater/MyMesh.cpp: merged comparison functions with new handler functions
- src/helpers/CommonCLI.cpp: merged MQTT fields handling with adc_multiplier and owner_info
- src/helpers/CommonCLI.h: merged NodePrefs struct changes
- variants/heltec_v3/platformio.ini: kept upstream WiFi settings
- variants/xiao_s3_wio/platformio.ini: added upstream environment definitions

Verified observer firmwares compile successfully.
2026-01-21 20:37:40 -08:00
agessaman ed27ebd015 Refactor MQTTBridge to utilize FreeRTOS for improved task management and responsiveness
- Moved MQTT processing to a dedicated FreeRTOS task on Core 0, enhancing non-blocking behavior.
- Implemented a FreeRTOS queue for thread-safe packet handling, replacing the previous circular buffer approach.
- Updated WiFi initialization and connection management to occur within the FreeRTOS task, improving overall system responsiveness.
- Enhanced logging and error handling for MQTT connections and packet processing.
- Cached broker and analyzer server statuses to reduce redundant checks and improve efficiency.
2026-01-21 20:28:36 -08:00
Scott Powell 69a71d0e25 * repeater login response, FIRMWARE_VER_LEVEL now bumped to 2 2026-01-12 17:47:51 +11:00
Scott Powell b6110eee38 * new req/resp (after login): REQ_TYPE_GET_OWNER_INFO (includes firmware-ver)
* ANON_REQ_TYPE_OWNER, firmware-ver removed (security exploit)
* ANON_REQ_TYPE_BASIC, formware-ver removed, just remote clock + some 'feature' bits
* CTL_TYPE_NODE_DISCOVER_REQ now ingored if 'repeat off' has been set
2026-01-12 16:58:35 +11:00
Scott Powell 4e4f6d92a0 * ANON_REQ_TYPE_VER_OWNER now delimited by newline chars 2026-01-09 16:32:08 +11:00
Scott Powell 65796c8f20 * CommonCLI: added "set name ..." validation
* ANON_REQ_TYPE_VER_OWNER, now removes commas from node_name
2026-01-09 16:28:08 +11:00
agessaman ffa2a1ecdd Refactor advert timer calculation in MyMesh and SensorMesh for type consistency
- Updated the advert timer calculation to explicitly cast the advert interval to an integer type, ensuring consistent behavior across different mesh implementations.
- Enhanced the savePrefs function in CommonCLI to trigger advert timer updates when the advert interval changes, improving responsiveness to user configuration changes.
- Removed the aggressive 4-hour health check in MQTTBridge to prevent connection instability, allowing the MQTT client library to manage connection health internally.
2026-01-08 20:57:28 -08:00
Scott Powell fd69acb421 * new ANON_REQ_TYPE_VER (for just simple clock + ver info) 2026-01-09 13:54:18 +11:00
Scott Powell 2a035ad816 * ANON_REQ_TYPE_VER_OWNER, now includes node_name 2026-01-09 13:20:20 +11:00
Scott Powell 5475043083 * new ANON_REQ_TYPE_VER_OWNER
* CommonCLI: new "get/set owner.info ..."
2026-01-09 11:07:31 +11:00
Scott Powell 5cc44dd802 * ANON_REQ_TYPE_REGIONS now direct only, with reply_path encoded in request 2026-01-08 13:20:52 +11:00
Scott Powell 3af25495bb * Repeater: new anon request sub-type: ANON_REQ_TYPE_REGIONS (rate limited to max 4 every 3 mins)
* Companion: new CMD_SEND_ANON_REQ command (reply with existing RESP_CODE_SENT frame)
2026-01-03 12:02:15 +11:00
agessaman 2185523df6 Add sorting functions for neighbour information in MyMesh and optimize MQTTBridge for memory efficiency
- Introduced comparison functions for sorting neighbours by timestamp and signal strength in MyMesh.
- Implemented early exit conditions in MQTTBridge to improve processing efficiency when no neighbours are present.
- Enhanced MQTTBridge to optimize memory usage by adjusting MQTT client configurations and implementing memory pressure checks.
- Reduced processing limits in MQTTBridge to maintain responsiveness and prevent blocking during packet handling.
2026-01-02 13:36:41 -08:00
agessaman 617e3b17c0 Enhance loop processing in MyMesh and MQTTBridge to prioritize radio reception and improve responsiveness. Add comments for clarity on packet processing limits and WiFi status handling during MQTT operations. 2026-01-02 13:36:41 -08:00
agessaman e5dbd56b5d Enhance CommonCLI and JWTHelper for MQTT owner public key support
- Added functionality to load, save, and handle the MQTT owner public key in CommonCLI.
- Implemented validation for the owner public key format and updated command handling to set the key.
- Modified JWTHelper to include optional owner and client fields in JWT token creation.
- Increased buffer sizes for JWT tokens in MQTTBridge to accommodate new fields.
2026-01-02 13:36:41 -08:00
agessaman e4ff06cbfd Enhance MQTTBridge and related components for improved status reporting and stats collection
- Added support for automatic stats collection in MQTTBridge, allowing for detailed status messages including battery voltage, uptime, error flags, and air time metrics.
- Updated MQTTMessageBuilder to accommodate additional stats in the status message, increasing buffer size for JSON documents.
- Modified CommonCLI to display MQTT status interval in minutes and adjusted command handling for setting the interval.
- Introduced new methods in MQTTBridge for setting stats sources
2026-01-02 13:36:41 -08:00
agessaman c23663da98 Update MQTT implementation to include dynamic build date and enhance client versioning 2026-01-02 13:36:41 -08:00
agessaman a645355670 Implement Let's Mesh Analyzer integration in MQTT Bridge
- Switch from PubSub to PsychicMqttClient for async operations and websockets support
- Add support for US and EU Let's Mesh Analyzer servers with JWT authentication.
- Introduce CLI commands to enable/disable analyzer servers.
- Update NodePrefs to store analyzer server settings.
- Modify MQTTBridge to publish status and packet data to analyzer servers via WebSocket MQTT.
- Enhance documentation to reflect new features and configuration options.
2026-01-02 13:36:41 -08:00
agessaman 787af7b026 added timezone handling, updated mqtt packet output to use the proper timezones for timestamp and time/date, updated mqtt packet to use raw data instead of parsed packet structure, updated packet upload to use proper packet hash 2026-01-02 13:36:41 -08:00
agessaman 26c4b9704c Add timezone support to MQTT Bridge and CLI configuration
- Introduce timezone settings in NodePrefs for persistent storage
- Update CLI commands to get/set timezone and offset
- Modify MQTT message builder to utilize timezone for accurate timestamps
- Implement timezone handling in MQTTBridge for local time conversion
- Include timezone library dependency in platformio.ini
2026-01-02 13:36:41 -08:00
agessaman efc15eb643 Add MQTT Bridge implementation with WiFi CLI configuration
- Implement MQTT bridge for packet uplink to multiple brokers
- Add JSON message formatting for status, packets, and raw data
- Add WiFi SSID/password CLI configuration (get/set wifi.ssid, wifi.pwd)
- Add persistent storage for WiFi credentials
- Add NTP time synchronization for accurate MQTT timestamps
- Add CLI commands for MQTT configuration (origin, iata, status, packets, raw)
- Support multiple MQTT brokers with automatic reconnection
- Integrate with existing MeshCore bridge architecture
2026-01-02 13:36:41 -08:00
agessaman 8f34d96628 Enhance CommonCLI and JWTHelper for MQTT owner public key support
- Added functionality to load, save, and handle the MQTT owner public key in CommonCLI.
- Implemented validation for the owner public key format and updated command handling to set the key.
- Modified JWTHelper to include optional owner and client fields in JWT token creation.
- Increased buffer sizes for JWT tokens in MQTTBridge to accommodate new fields.
2026-01-02 13:36:41 -08:00
agessaman 8ca969be78 Enhance MQTTBridge and related components for improved status reporting and stats collection
- Added support for automatic stats collection in MQTTBridge, allowing for detailed status messages including battery voltage, uptime, error flags, and air time metrics.
- Updated MQTTMessageBuilder to accommodate additional stats in the status message, increasing buffer size for JSON documents.
- Modified CommonCLI to display MQTT status interval in minutes and adjusted command handling for setting the interval.
- Introduced new methods in MQTTBridge for setting stats sources
2026-01-02 13:36:41 -08:00
agessaman ed70ceb284 Update MQTT implementation to include dynamic build date and enhance client versioning 2026-01-02 13:36:40 -08:00
agessaman 180c1d49fe Implement Let's Mesh Analyzer integration in MQTT Bridge
- Switch from PubSub to PsychicMqttClient for async operations and websockets support
- Add support for US and EU Let's Mesh Analyzer servers with JWT authentication.
- Introduce CLI commands to enable/disable analyzer servers.
- Update NodePrefs to store analyzer server settings.
- Modify MQTTBridge to publish status and packet data to analyzer servers via WebSocket MQTT.
- Enhance documentation to reflect new features and configuration options.
2026-01-02 13:36:40 -08:00
agessaman f39d229988 added timezone handling, updated mqtt packet output to use the proper timezones for timestamp and time/date, updated mqtt packet to use raw data instead of parsed packet structure, updated packet upload to use proper packet hash 2026-01-02 13:36:40 -08:00
agessaman 91cc4f50ed Add timezone support to MQTT Bridge and CLI configuration
- Introduce timezone settings in NodePrefs for persistent storage
- Update CLI commands to get/set timezone and offset
- Modify MQTT message builder to utilize timezone for accurate timestamps
- Implement timezone handling in MQTTBridge for local time conversion
- Include timezone library dependency in platformio.ini
2026-01-02 13:36:40 -08:00
agessaman ee6a756591 Add MQTT Bridge implementation with WiFi CLI configuration
- Implement MQTT bridge for packet uplink to multiple brokers
- Add JSON message formatting for status, packets, and raw data
- Add WiFi SSID/password CLI configuration (get/set wifi.ssid, wifi.pwd)
- Add persistent storage for WiFi credentials
- Add NTP time synchronization for accurate MQTT timestamps
- Add CLI commands for MQTT configuration (origin, iata, status, packets, raw)
- Support multiple MQTT brokers with automatic reconnection
- Integrate with existing MeshCore bridge architecture
2026-01-02 13:36:40 -08:00
ripplebiz f9720f0b0c Merge pull request #1266 from IoTThinks/MCdev-Powersaving-for-esp32-202512
Added powersaving to all ESP32 boards with RTC-supported DIO1
2025-12-31 11:35:46 +11:00
Kevin Le 26321162ee To fix the default temperature to be overridden by external sensors (if any) 2025-12-27 15:23:23 +07:00
Kevin Le 1706f759b7 Modified hasPendingWork to return bool 2025-12-24 11:00:34 +07:00
Kevin Le 5c6c15942b Added powersaving to all ESP32 boards with RTC-supported DIO1
Added CLI to enable/disable powersaving
2025-12-23 12:48:08 +07:00
Kevin Le 2deb9cf144 Fixed to call getMCUTemperature once. 2025-12-13 07:32:26 +07:00
Kevin Le 4504ad4daf Added default temperature from ESP32 MCU and NRF52 MCU
Added NRF52Board.h and NRF52Board.cpp
Modified NRF52 variants to extend from NRF52Board to share common feature
2025-12-12 19:01:15 +07:00
ripplebiz 79a036f995 Merge pull request #1131 from wel97459/dev-uint
Changed uint used in flags to uint8_t
2025-11-25 21:51:36 +11:00
Scott Powell dc58f0ea83 * BUG FIX: repeater remote admin, flood login should invalidate the client->out_path 2025-11-24 22:56:55 +11:00