924 Commits

Author SHA1 Message Date
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
Lloyd 0df94a0a91 updated convert_firmware_key.sh to support output format options and improve usage instructions; update _load_or_create_identity_key to prioritize system-wide identity key location. 2026-02-24 20:41:15 +00:00
Lloyd 25f9152a8d Update README to include compatibility details for supported radio interfaces and installation instructions for Proxmox 2026-02-24 14:15:57 +00:00
Lloyd 168d913ab9 Update pymc_core dependency to point to feat/newRadios branch 2026-02-24 12:58:19 +00:00
Lloyd 89ddd14cf8 Merge pull request #103 from rightup/feat/E22p
Feat/e22p
2026-02-24 12:51:45 +00:00
Lloyd 878218346a Add Proxmox installation instructions and CH341 GPIO pin mapping details to README 2026-02-24 12:45:47 +00:00
Lloyd 91d916798b upgrade functions to include conditional polkit installation and improve error handling for missing packages 2026-02-24 12:03:45 +00:00
Lloyd 83a6ae69ae Add sudo and create sudoers directory for service management in install and upgrade functions 2026-02-24 11:36:46 +00:00
Lloyd 74914541f2 Enhance installation and uninstallation scripts with user-friendly messages, add polkit and sudoers configuration for service management, and improve service restart handling in API endpoints. 2026-02-24 11:33:21 +00:00
Lloyd aa75fac7f2 Update Proxmox installer scripts to include CH341 GPIO pin configuration and modify radio type 2026-02-24 11:14:29 +00:00
Lloyd 169ea4b1e4 Refactor config merging process to strip comments and update radio_type in Proxmox installer 2026-02-24 10:59:30 +00:00
Lloyd b292a2a710 Add login banner and CH341 configuration to Proxmox installer script 2026-02-24 10:26:57 +00:00
Lloyd b4f0a42eb2 Fix locale warnings and pre-seed config for CH341 in Proxmox installer 2026-02-24 09:59:43 +00:00
Lloyd 0f54a05596 Proxmox installer PW 2026-02-24 09:47:36 +00:00
Lloyd 496c5a960a Add Proxmox LXC installer script for pyMC Repeater with USB passthrough 2026-02-24 09:29:43 +00:00
Lloyd 4d2943087f Refactor user group management and add container detection warnings for udev rules 2026-02-24 09:15:21 +00:00
Lloyd 540e5f11fe Add supplementary groups to systemd service 2026-02-24 08:53:12 +00:00
Lloyd edebea6bda Add user to plugdev group and install udev rules for CH341 during installation and upgrade 2026-02-24 08:49:51 +00:00
agessaman 27bbaf80ac Implement deduplication for companion delivery in PacketRouter
- Added logic to ensure that PATH and protocol-response packets are delivered to companions at most once per logical packet, preventing duplicate telemetry delivery.
- Introduced a deduplication key generation function and a mechanism to track delivery timestamps.
- Updated the enqueue method to utilize the new deduplication logic for companion bridges.
- Adjusted timeout for telemetry requests in CompanionAPIEndpoints to improve response handling.
2026-02-23 20:04:54 -08:00
Lloyd fe45d4e993 Merge pull request #101 from MSmithDev/pimesh-v2
Updated PiMesh V1/2 config / removed USA/UK options
2026-02-23 23:11:11 +00:00
Matt 481b3e9718 Update uconsole configuration and add new modules 2026-02-23 18:08:46 -05:00
Matt 5528ec44e1 Changed PiMesh settings 2026-02-23 18:05:05 -05:00
Lloyd 8f90cf71b0 Reference for E22p branch 2026-02-23 21:58:15 +00:00
Lloyd ffcb8eacc1 Merge pull request #69 from theshaun/dev
Add support for  Femtofox
2026-02-23 11:14:15 +00:00
Shaun Walker 311fba40d5 Delete .github/instructions/snyk_rules.instructions.md 2026-02-23 20:26:46 +10:00
Shaun Walker e3762fcb9b Update config.py 2026-02-23 20:20:50 +10:00
Shaun Walker 96caad502b Correct merge issue with_parse_int
Updated SPI configuration to parse bus, cs, and cs_pin as integers.
2026-02-23 09:47:56 +10:00
Shaun Walker 96a5634309 Merge branch 'feat/newRadios' into dev 2026-02-22 21:45:22 +10: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 e9841adeff Merge upstream feat/newRadios (radios, MQTT, SPI)
- Take upstream radio-presets.json and radio-settings.json (Femtofox, AIO v2, CH341).
- config.py: upstream get_radio_for_board (_parse_int, sx1262_ch341, GPIO) + re-add KISS branch.
- config.yaml.example: upstream radio/ch341 + our identities.companions.
- manage.sh: upstream SPI warning prompt.
- main.py: single try/finally with companion shutdown and _shutdown().
- letsmesh_handler: upstream UTC fallback and MQTT v5 reason code handling.
- storage_collector, api_endpoints: upstream storage_dir_cfg; apply_setup_wizard supports KISS and sx1262_ch341/ch341.
- airtime.py: upstream bw_hz fix for symbol time.
- pyproject.toml: keep pymc_core dependency (no git pin).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 15:59:01 -08:00
agessaman e14fd3feea Refactor noise floor retrieval in RepeaterHandler to use asyncio executor
- Updated the noise floor retrieval method to run in an executor, preventing blocking of the event loop during the KISS modem's command execution.
- This change enhances responsiveness by allowing the process to handle other tasks while waiting for the noise floor measurement.
2026-02-21 15:38:04 -08:00
agessaman 65164fffb7 Improve retransmission logic and duty cycle handling in RepeaterHandler
- Improved local transmission handling by deferring local TX when duty cycle limits are exceeded, instead of dropping packets.
- Added LBT metadata extraction and logging for better monitoring of transmission attempts and delays.
- Refactored `schedule_retransmit` to support retrying local transmissions on failure, enhancing reliability.
- Introduced a lock in PacketRouter to serialize local TX operations, preventing race conditions during packet processing.
2026-02-21 15:38:01 -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
Lloyd 05b839890c Merge pull request #99 from interlock/patch-1
Added radio setting for the AIO v2 for uConsole
2026-02-21 21:29:22 +00:00
June S 88221340cc Added radio setting for the AIO v2 for uConsole
AIO v2 for the uconsole requires two settings to work correctly
2026-02-20 21:50:24 -08:00
agessaman 22e337a707 Add CompanionAPIEndpoints integration in APIEndpoints class
- Introduced CompanionAPIEndpoints to handle routes under /api/companion/*.
- Enhanced the APIEndpoints class to create a nested companion object for improved modularity and organization of companion-related API functionality.
2026-02-15 22:10:23 -08:00
agessaman a3f96962ff Refactor advert frame handling in CompanionFrameServer
- Improved the `_build_advert_push_frames` function to handle optional fields and ensure thread safety.
- Enhanced the `on_advert_received` method to robustly process incoming contact data, including better handling of public keys and optional fields for advert details.
- Added error handling to log exceptions during advert processing, improving reliability.
2026-02-15 19:33:04 -08:00
agessaman c07d24d387 Fix frame building functionality for advert push in CompanionFrameServer
- Introduced a new method `_build_advert_push_frames` to construct short and full advert frames from provided data.
- Refactored the handling of contact data to build and send advert frames asynchronously, improving performance and thread safety.
- Enhanced data structure for advert frame construction, including optional fields for full advert details.
2026-02-14 21:07:18 -08:00
agessaman 2360660a6b fix message persistence in CompanionFrameServer to use async I/O
- Changed `_persist_companion_message` to an asynchronous method to prevent blocking the event loop during SQLite operations.
- Updated calls to `_persist_companion_message` in message handling functions to use `await`.
- Enhanced error handling to include `BrokenPipeError` alongside `ConnectionResetError` for improved robustness.
2026-02-14 20:58:01 -08:00
agessaman d5cabe831c Fix message persistence and deduplication in CompanionFrameServer
- Updated `_persist_companion_message` to clarify deduplication of messages in SQLite.
- Modified `on_message_received` and `on_channel_message_received` to include `packet_hash` for message identification.
- Enhanced `SQLiteHandler` to support deduplication by `packet_hash` when pushing messages, preventing duplicates in the database.
- Added `packet_hash` column to the `companion_messages` table and created an index for efficient lookups.
2026-02-14 20:53:25 -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
Lloyd f1a81e1732 Add optional GPIO parameters to get_radio_for_board function 2026-02-12 16:39:39 +00:00
Shaun Walker c2199c8a71 Merge branch 'dev' into dev 2026-02-12 20:58:14 +10:00
theshaun 9acba65242 Update Femtofox configs 2026-02-12 20:57:27 +10:00
Lloyd 0465450dbf Fix integer conversion by stripping trailing commas in get_radio_for_board function 2026-02-11 11:57:27 +00:00
Lloyd f50b571b86 Refactor SPI configuration parsing to ensure integer values are correctly processed 2026-02-11 11:54:01 +00:00
Lloyd b799a286c2 Enhance SPI check during installation with user prompts for continuation without SPI 2026-02-11 10:53:05 +00:00
Lloyd bc23001cd6 Enhance MQTT error handling with extended v5 error codes and improved logging 2026-02-11 09:34:56 +00:00