Commit graph

52 commits

Author SHA1 Message Date
agessaman
e6f28002cd Enhance packet capture and installation scripts for MeshCore compatibility
- Updated .gitignore to exclude advert_state.json.
- Added version checks for MeshCore in install.sh to ensure compatibility with multi-byte path support.
- Implemented path length decoding in packet_capture.py to handle new MeshCore firmware specifications.
- Adjusted requirements.txt to require meshcore version 2.2.31 or higher for multi-byte path support.
2026-03-15 08:34:04 -07:00
agessaman
f221e04cbc Update .gitignore, modify IATA code in install.sh, and enhance advert state management in packet_capture.py
- Added 'local-docs/' to .gitignore to exclude local documentation files.
- Changed PACKETCAPTURE_IATA value from 'LOC' to 'XYZ' in install.sh.
- Implemented persistent state management for last_advert_time in packet_capture.py, including methods to load and save the state to a JSON file, improving reliability of advert timing.
2026-03-09 19:34:39 -07:00
agessaman
b6a1d1d072 Fix reconnection setup. 2025-12-18 10:36:45 -08:00
agessaman
a5faeb75e7 Add retry limits and connection handling improvements in PacketCapture
- Introduced configurable retry limits for various device commands, including BLE, TCP, health checks, stats, and device info queries.
- Enhanced the retryable_device_command method to utilize connection-specific defaults when max_retries is not specified.
- Implemented connection state management methods to streamline connection checks and state resets after reconnections.
- Improved health check logic to incorporate connection-specific timeout and retry configurations, enhancing reliability and error handling.
2025-12-18 09:46:59 -08:00
agessaman
a83bc27eec Enhance health check logic for BLE connections
- Introduced a grace period for health checks on BLE connections, allowing for a limited number of consecutive failures before considering the connection degraded.
- Adjusted health check timeout and retry logic for BLE and TCP connections to improve reliability.
- Reset health check failure count upon successful connection and health check, ensuring accurate tracking of connection status.
- Improved logging for health check failures and timeouts to aid in debugging and monitoring connection health.
2025-12-18 08:48:32 -08:00
agessaman
6d030af555 Add retry logic for device commands in auth_token and packet_capture modules
- Introduced `_retryable_device_sign` in `auth_token.py` to handle transient errors during device signing operations with exponential backoff.
- Implemented `retryable_device_command` in `packet_capture.py` for executing device commands with timeout and retry logic, enhancing robustness against communication issues.
- Updated various device command calls in `packet_capture.py` to utilize the new retry logic, improving error handling and reliability in device interactions.
2025-12-18 08:04:02 -08:00
agessaman
d825d2860d Update installation scripts to version 1.2 and improve logging
- Bump version in install.ps1 and install.sh to 1.2.
- Remove unnecessary debug logging in Bluetooth pairing functions.
- Enhance error handling in connection health checks for TCP with SDK auto-reconnect.
- Streamline MQTT configuration checks in install.sh.
2025-12-17 16:34:08 -08:00
agessaman
6725fc0a5e Fixed logic in device signing to python signing fallback 2025-12-17 14:20:55 -08:00
agessaman
e174cfc21f Refactor auth token generation and improve signing methods
- Introduced on-device signing as the default method for JWT token generation, with fallback options to Python signing and meshcore-decoder CLI.
- Enhanced error handling and logging for token generation processes.
- Updated installation scripts to reflect changes in authentication methods, removing the requirement for meshcore-decoder.
- Added async support for token creation to improve performance in asynchronous contexts.
- Updated requirements to ensure compatibility with the latest meshcore package for on-device signing support.
2025-12-17 13:40:23 -08:00
agessaman
a7c8a3bf39 More meaningful error logging in health check process 2025-12-14 18:42:54 -08:00
agessaman
049c844f02 Improve BLE disconnection handling
- Capture BLE address before disconnecting to ensure proper cleanup.
- Implement forced disconnection via bluetoothctl on Linux systems for BLE devices.
2025-12-14 18:38:06 -08:00
agessaman
4cb24a72c6 Add dialout group check for serial connections and fix device name fallback
- Add check_dialout_group() function in install.sh to prompt users to add themselves to dialout group when using serial connections
- Fix device name retrieval: wait for self_info to populate and add fallback to PACKETCAPTURE_ORIGIN
- Prevents 'Cannot connect to MQTT without device name' errors when device info is delayed or unavailable
- Fixes indentation errors in packet_capture.py
2025-12-05 10:07:53 -08:00
agessaman
8407eeec70 Add status telemetry stats support to PacketCapture. 2025-11-24 09:49:03 -08:00
agessaman
aaa0cac188 Add packet type filtering for MQTT uploads
- Introduced a new environment variable `PACKETCAPTURE_UPLOAD_PACKET_TYPES` to specify which packet types to upload to MQTT.
- Updated `packet_capture.py` to filter packets based on the allowed types, ensuring only specified types are uploaded while still capturing all packets.
- Updated documentation in README.md to explain the new filtering feature and provide usage examples.
2025-11-09 11:56:23 -08:00
agessaman
29d98f791b Enhance JWT token configuration to include optional owner email
- Updated `install.ps1` and `install.sh` to prompt for an optional owner email address during JWT configuration.
- Added email validation and storage in the environment configuration.
- Modified `packet_capture.py` to include the owner email in JWT claims if configured.
2025-11-06 16:09:55 -08:00
agessaman
210edcee6e Add JWT token configuration options to install scripts
- Introduced `Configure-JwtOptions` in `install.ps1` and `configure_jwt_options` in `install.sh` to allow optional configuration of an owner public key for JWT tokens.
- Updated the MQTT broker configuration to prompt for JWT options if not already set.
- Enhanced `packet_capture.py` to include the owner public key and client agent in JWT claims if configured.
2025-11-06 15:59:35 -08:00
agessaman
155fba7fab Introduced brief delays to allow for complete cleanup and connection establishment, particularly for BLE connections. Updated event subscription cleanup. 2025-11-02 09:31:40 -08:00
agessaman
fc53df1fdb Refactor transport retrieval and TCP keepalive configuration in packet_capture.py 2025-11-01 19:01:32 -07:00
agessaman
cc10de3fd4 Add MQTT health check and transport retrieval functionality
- Introduced `get_transport` function to retrieve transport from meshcore instance.
- Added MQTT health check with grace period to track broker connection status.
- Enhanced connection handling for TCP with SDK auto-reconnect settings.
- Implemented cleanup of event subscriptions before disconnecting to prevent pending tasks.
- Updated connection monitoring to handle MQTT health checks and reconnection logic more effectively.
2025-11-01 15:23:49 -07:00
agessaman
052d7b55f6 improve handling of situations where an IATA code is not set to prevent publishing to meshcore/packets and meshcore/status on Let's Mesh Analyzer servers. 2025-11-01 09:19:16 -07:00
agessaman
16786b6507 Added version reporting fallback in packet_capture.py to use git information if .version_info doesn't exist. Adjust Dockerfile syntax for consistency. 2025-10-29 21:55:10 -07:00
agessaman
e12cc156b9 added better shutdown event handling and introduced radio clock sync 2025-10-27 18:33:06 -07:00
agessaman
da920eee9b added meshcore-decoder to the Dockerfile
Moved from custom reconnection logic back to letting paho-mqtt manage reconnection.
2025-10-26 10:03:27 -07:00
agessaman
dbc9210fe4 added the ability to set log levels in .env.local 2025-10-25 09:55:36 -07:00
agessaman
30f97b562e Update installation script to version 1.1.1, enhancing MQTT broker configuration with redundancy for US and EU servers. Modify PacketCapture class to enable clean session for improved connection management. 2025-10-23 20:14:01 -07:00
agessaman
f34288cef6 clean up duplicate stop() functions, removed unused sync_status_post(), removed unused sys import 2025-10-23 18:51:28 -07:00
agessaman
1a6ac07d2f Update installation scripts and PacketCapture class to enhance resource management and failure tracking. Introduce resource limits, exponential backoff for retries, and service failure handling for improved stability. 2025-10-22 22:04:18 -07:00
agessaman
f312d2ae55 Enhance JWT token renewal process in PacketCapture class to prevent duplicate tasks and improve resource management. Introduce active task tracking and adjust sleep duration to reduce CPU usage. Update README to clarify compatibility for Companion radios and provide installation guidance. 2025-10-22 19:41:39 -07:00
agessaman
461b2e49b9 Updated status payload to include radio information 2025-10-20 22:28:07 -07:00
agessaman
5e7bd234f0 Update installation scripts to version 1.1.0, adding version info generation with GitHub commit hash and branch details. Enhance the packet capture Python class to load and publish client version information in status. Adjust default advertisement interval and improve logging for firmware information retrieval. 2025-10-20 21:47:48 -07:00
agessaman
5e50cba74d fixing reason code errors on Windows 2025-10-17 20:25:56 -07:00
agessaman
13805bb74b fixed disconnection reporting error 2025-10-17 20:23:43 -07:00
agessaman
2f7477dad2 add debug logging for resolved MQTT topics in packet_capture.py 2025-10-17 20:08:59 -07:00
agessaman
d5a0be9465 fix packets topic 2025-10-17 20:03:15 -07:00
agessaman
6bb5f73650 fix to raw publishing logic, update to installers to fix timeout issue 2025-10-17 19:56:42 -07:00
agessaman
44fd45db04 add advert settings interval in install.sh and normalize public keys and origin_id in packet_capture.py 2025-10-17 17:57:31 -07:00
agessaman
2ec8483779 re-added raw topic feed option for mqtt servers, only uplinks when configured 2025-10-16 22:03:14 -07:00
agessaman
067ebfcb29 fixed mqtt publish count logic and logging 2025-10-15 19:22:34 -07:00
agessaman
8955f7c0d2 more reliable JWT token renewal 2025-10-15 09:56:44 -07:00
agessaman
f68aa827ee improve logging to include mqtt success counts, fix docker compose use in installer. 2025-10-15 09:44:31 -07:00
agessaman
f2cd760c42 fixed log output 2025-10-14 22:19:54 -07:00
agessaman
dbc0753237 Add JWT token management and renewal process to PacketCapture
- Implement JWT token storage and renewal logic in packet_capture.py.
- Introduce a background task for periodic JWT renewal.
- Update install.sh to check existing MQTT broker configurations before setup.
- Enhance MQTT broker reconnection logic with renewed tokens.
- Add new environment variables for JWT renewal interval and threshold.
2025-10-14 21:26:55 -07:00
agessaman
620e7bbc8a Add TCP connection support and improve documentation 2025-10-14 19:34:43 -07:00
agessaman
f6112aa6a2 be more flexible about ble names 2025-10-13 20:42:40 -07:00
agessaman
3cc36aac3d updated to use meshcore_py 2.1.10 or later 2025-10-13 15:50:08 -07:00
agessaman
a52ede025a Add Docker support, meshcore_py integration, and multi-MQTT functionality
- Add Dockerfile and docker-compose.yml for containerized deployment
- Integrate modified meshcore_py with private key export functionality
- Add multi-MQTT broker support with configuration management
- Update packet capture with enhanced authentication and token handling
- Add installation script and migration utilities
- Update documentation and configuration files
2025-10-12 20:41:39 -07:00
agessaman
7d1496a355 remove raw topic, add auto-advert interval 2025-10-11 20:33:45 -07:00
agessaman
ee6cc80eae added connection monitoring and automatic reconnection configuration 2025-10-10 18:37:26 -07:00
agessaman
f8aa8319e8 cleanup of unused variables 2025-10-09 22:18:26 -07:00
agessaman
e815a44691 Update comments/documentation. 2025-10-09 22:16:05 -07:00