61 Commits

Author SHA1 Message Date
Lloyd
07a47523ab feat: enhance event loop handling for thread-safe scheduling in MeshCLI 2026-03-24 14:18:12 +00:00
Lloyd
400e707c3f feat: add help command and detailed command descriptions to MeshCLI 2026-03-24 14:12:32 +00:00
Lloyd
91918e7cfc feat: add CLI command endpoint and standalone CLI client for pyMC Repeater 2026-03-24 14:02:51 +00:00
agessaman
3cb27d3310 feat: enhance trace processing and path handling in RepeaterDaemon and TraceHelper
- Added local_identity parameter to RepeaterDaemon for improved trace path matching.
- Refactored trace path handling in TraceHelper to support multi-byte hashes and structured hops.
- Updated methods to ensure compatibility with new trace data formats and improved logging.
- Enhanced tests to validate new trace processing logic and path handling.
2026-03-22 14:34:04 -07:00
agessaman
7558c5604c feat: enhance repeater TX mode functionality so companion tenants can TX while in monitor mode
- Modify TX modes: forward, monitor, and add no_tx, allowing for flexible packet handling.
- Updated configuration and API endpoints to support the new modes.
- Adjusted logic in RepeaterHandler to manage packet processing based on the selected mode.
- Enhanced CLI commands to reflect the new mode settings.
- Added tests for each TX mode to ensure correct behavior.
2026-03-15 13:03:18 -07:00
Lloyd
289fdb1a16 Add warning for trace responses with RSSI=0 in TraceHelper 2026-03-12 13:50:36 +00:00
Lloyd
632f1d2d1a Merge pull request #132 from agessaman/dev-companion-v2-cleanup
Update OTA repeater stats to return correct uptime, airtime, packet counts, etc.
2026-03-10 09:32:43 +00:00
agessaman
25c2a14a81 Update OTA repeater stats to return correct uptime, airtime, packet counts, etc.
- Introduced `total_rx_airtime_ms` in `AirtimeManager` to track received packet airtime.
- Added `record_rx` method to log received airtime in `AirtimeManager`.
- Updated `RepeaterHandler` to count received packets and log RX airtime using the new method.
- Enhanced statistics reporting in `get_stats` to include total received airtime.
- Updated `ProtocolRequestHelper` to include total RX airtime in the RepeaterStats structure for better monitoring.
2026-03-09 17:27:51 -07:00
Lloyd
e19ec79b49 Implement advertisement packet deduplication with configurable TTL and max hashes 2026-03-06 16:47:38 +00:00
agessaman
c150b9a9bf Merge upstream/feat/newRadios into dev-companion-v2-cleanup
- Keep our Vite-built assets and index.html script (index-DyUIpN7m.js)
- Remove upstream-only asset chunks and RoomServers-BxQ-0q-x.js
- README: keep two-backend intro, add upstream CAUTION/compatibility table
- manage.sh: keep dialog/gauge UX and .[hardware]; add CH341 udev, sudoers, libusb, polkit, silent upgrade
- sqlite_handler: add crc_errors table, index, and cleanup from upstream
- engine: add validate_packet and mark_seen in direct_forward; keep our path hash_size/hop_count logic
- advert: keep comment, use current_time = now
- api_endpoints: use restart_service() from service_utils
- config merge: strip user config comments before yq merge (upstream)

Made-with: Cursor
2026-03-05 16:43:14 -08:00
Lloyd
c54efa3412 add side bar display of advert blocks etc 2026-03-05 12:56:01 +00:00
Lloyd
2b7d394938 add logging for tracking advert blocking 2026-03-05 11:26:40 +00:00
Lloyd
4285023670 Implement adaptive advert rate limiting and configuration updates 2026-03-05 10:35:15 +00:00
agessaman
d5fe1e637c Restore deleted AdvertHelper. 2026-02-27 22:18:56 -08:00
agessaman
6fa85a832f Update packet type labels in rrdtool_handler and sqlite_handler for consistency
- Enhanced readability by adding descriptive suffixes to packet type labels in both rrdtool_handler.py and sqlite_handler.py.
- Aligned packet type definitions with the new naming conventions from pyMC_core, ensuring consistency across the codebase.
2026-02-27 21:18:29 -08:00
agessaman
789a2f27ea Enhance PacketRouter and CompanionFrameServer for improved packet delivery and contact persistence
- Updated PacketRouter to deliver packets to all companion bridges when the destination is not recognized, ensuring better handling of ephemeral destinations.
- Refactored CompanionFrameServer to separate contact serialization and persistence logic, allowing for non-blocking database operations.
- Introduced a unique index for companion contacts in SQLite to support upsert functionality, enhancing data integrity and performance.
- Improved AdvertHelper to run database operations in a separate thread, preventing event loop blocking and maintaining responsiveness.
2026-02-24 21:51:56 -08:00
agessaman
f1a944222f Update login, path and req response types.
- Simplified KISS modem setup instructions in README.md by removing unnecessary details.
- Refactored ConfigManager in config_manager.py to improve code clarity and efficiency, including changes to the save_to_file method and live_update_daemon method.
- Updated logging and error handling for better debugging and maintenance.
- Adjusted method signatures for consistency and clarity across the ConfigManager class.
- Modified device_version in frame_server.py to use FIRMWARE_VER_CODE from pyMC_core for better version management.
- Enhanced login.py and protocol_request.py with additional payload type handling and logging improvements.
- Cleaned up auth_endpoints.py for better readability and consistency in response formatting.
2026-02-21 21:19:22 -08:00
agessaman
c2f8a2e3cd refactor: companion FrameServer and related (substantive only, no Black)
Reapply refactor from ce8381a (replace monolithic FrameServer with thin
pymc_core subclass, re-export constants, SQLite persistence hooks) while
preserving pre-refactor whitespace where patch applied cleanly. Remaining
files match refactor commit exactly. Diff vs ce8381a is whitespace-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 15:35:47 -08:00
agessaman
49f412acb0 Enhance control data delivery and discovery handling
- Added a new method `deliver_control_data` in `RepeaterDaemon` to push CONTROL payloads to companion clients.
- Updated `PacketRouter` to invoke the new delivery method for control data packets.
- Introduced `push_control_data` in `CompanionFrameServer` to handle the sending of control data to clients.
- Enhanced `DiscoveryHelper` to support optional debug logging for control handling.

These changes improve the communication and control flow between the repeater and companion clients, facilitating better discovery response handling.
2026-02-14 20:24:00 -08:00
agessaman
c0dec9e80a Implement companion client communication and statistics retrieval
- Added raw RX and trace completion handlers to push data to connected companion clients.
- Enhanced PacketRouter to deliver ACK packets to all companion bridges.
- Introduced methods for retrieving companion statistics based on different types.
- Updated constants for handling new commands and responses in the companion protocol.

This update improves the interaction between the repeater and companion clients, enabling better data flow and monitoring capabilities.
2026-02-13 22:26:05 -08:00
agessaman
15299bf374 Add companion module and API integration
- Add repeater/companion with frame server and constants
- Extend config, sqlite_handler, mesh_cli, packet_router for companion
- Update api_endpoints and auth_endpoints; adjust main entry

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 16:07:43 -08:00
Paul Picazo
942d4dfe28 Enhance advert storage logic: prioritize direct routes and handle zero-hop measurements
Refactor packet processing: use processed_packet for forwarding and drop reason checks

Fix: Update zero-hop determination logic in AdvertHelper

Fix: Clone packet in process_packet to prevent modification of the original

Fix: Import copy module for deep copying of packets in process_packet
2026-01-03 14:35:30 -08:00
Lloyd
7112da98c2 feat: Add authentication endpoints and JWT support
- Implemented JWT authentication with auto-generated secret if not provided.
- Added API token management functionality.
- Created authentication endpoints for login, token refresh, verification, and password change.
- Introduced API documentation endpoints for Swagger UI and OpenAPI spec.
- Enhanced CORS support for API and documentation endpoints.
- Updated OpenAPI specification to include new authentication and system endpoints.
2025-12-30 00:10:48 +00:00
Lloyd
98b425f444 added CLI 2025-12-29 14:37:54 +00:00
Lloyd
fbe4e4e2bc bug:Skip already-evicted clients during eviction checks in RoomServer 2025-12-22 13:23:34 +00:00
Lloyd
d9119d3b92 Refactor text message handling to prioritize CLI command processing before storing room server messages 2025-12-20 22:34:42 +00:00
Lloyd
dbec76917a Fix neighbor listing format to ensure seconds ago and SNR are integers, stupid 2025-12-20 22:18:33 +00:00
Lloyd
61eaec6cf4 Implement advert scheduling delay and update neighbor listing format to match C++ specifications 2025-12-20 22:12:37 +00:00
Lloyd
f5daf41825 MeshCLI and RoomServer initialization with identity and storage handler support; update neighbor listing to filter repeaters and zero hop nodes. 2025-12-20 22:03:02 +00:00
Lloyd
6c2c2a13aa Refactor advert scheduling in MeshCLI: update to match C++ behavior by scheduling advert sends without waiting for completion. 2025-12-20 21:54:17 +00:00
Lloyd
1a56b64dad Refactor Mesh CLI handler: rename RepeaterCLI to MeshCLI, initialization with identity type and region support, and update command handling for room servers. 2025-12-20 21:46:16 +00:00
Lloyd
4e1eb888e5 Refactor database connection handling in StorageCollector and reduce log verbosity in RoomServer to minimize spam during idle periods 2025-12-18 22:12:25 +00:00
Lloyd
d321612670 Add node name lookup by public key and enhance CORS handling in API endpoints 2025-12-18 21:26:31 +00:00
Lloyd
3f57e78d6a Add debug logging for repeater security configuration in LoginHelper 2025-12-18 15:44:22 +00:00
Lloyd
c98a33eda5 Refactor security configuration handling: update LoginHelper to retrieve security settings from the correct config path and adjust max_clients default value; modify APIEndpoints to ensure distinct admin and guest passwords, and enhance identity key validation logic in API responses. 2025-12-18 15:02:23 +00:00
Lloyd
ccc908ce32 Update server message handling: use room server's public key for system messages and improve identification for clients 2025-12-18 13:35:22 +00:00
Lloyd
d51f9cae0f Enhance client activity tracking: update timestamps during posting to prevent eviction and improve synchronization logic for active clients 2025-12-18 13:05:01 +00:00
Lloyd
e8c1ba27e9 Fix push timing for evicted clients in RoomServer to ensure proper synchronization intervals 2025-12-18 12:57:51 +00:00
Lloyd
9cd98cd7ad Add room server messaging endpoints and database functions
- Implemented functions to retrieve, post, delete, and clear messages in room servers.
- Added API endpoints for room message retrieval, posting, and management.
- added OpenAPI documentation to include new room server functionalities.
2025-12-18 11:21:38 +00:00
Lloyd
710ee5b666 Implement room server functionality: add database schema, message handling, and client synchronization 2025-12-18 10:44:00 +00:00
Lloyd
02d3cbc396 Enhance ACL: add sync_since handling for room server clients and log timestamps 2025-12-17 23:01:29 +00:00
Lloyd
174c1309fc identity management: update security handling in room servers to use settings section and improve identity key update logic 2025-12-17 22:30:36 +00:00
Lloyd
2dce072124 Add ProtocolRequestHelper for handling protocol requests and update related components 2025-12-17 16:20:16 +00:00
Lloyd
82f1a20f44 Add PathHelper for processing PATH packets and update routing logic 2025-12-17 14:06:16 +00:00
Lloyd
a8cc36abf3 Implement CLI reply handling in TextHelper with TXT_MSG datagram support 2025-12-17 11:17:44 +00:00
Lloyd
1bb2d39940 Refactor LoginHelper and TextHelper to implement per-identity ACLs add CLI command handling 2025-12-17 11:08:14 +00:00
Lloyd
4b97c7b439 Implement text message handling and identity registration for room servers 2025-12-17 10:38:23 +00:00
Lloyd
5df266c83e Implement access control and login management for identities
- Added security settings in config.yaml.example for managing authenticated clients.
- Introduced ACL class for handling access control and client authentication in acl.py.
- Created LoginHelper class for processing login requests and managing authentication in login.py.
- Added IdentityManager class for managing multiple identities in identity_manager.py.
- Updated main.py to initialize IdentityManager and LoginHelper, and register identities.
- Added packet_router to process ANON_REQ login packets through the LoginHelper.
2025-12-16 22:39:26 +00:00
Paul Picazo
5656a48b31 Refactor SNR calculation in TraceHelper to use snr_register_to_db utility 2025-12-13 22:04:18 -08:00
Lloyd
f901493ffc Update repeater/handler_helpers/trace.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 21:40:45 +00:00