Commit Graph

320 Commits

Author SHA1 Message Date
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
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
agessaman
9eb2b8a50f Add data directory to .gitignore and include rrdtool dependency in pyproject.toml 2026-02-03 16:54:41 -08:00
agessaman
f2badfa0cb Remove repeater database file from the project. 2026-02-03 16:23:01 -08:00
agessaman
878ff8dc51 Enhance configuration and setup for KISS modem support
- Added support for Meshcore KISS modem firmware in configuration, allowing users to set `radio_type: kiss` and configure serial port and baud rate.
- Updated `config.yaml.example` to include KISS modem settings.
- Modified `manage.sh` to install with hardware extras for KISS support.
- Enhanced `setup-radio-config.sh` to prompt for radio type and KISS modem settings.
- Updated API endpoints to handle KISS modem configurations and hardware options.
- Improved error handling for missing configuration sections.

This update improves flexibility for users utilizing KISS modems alongside SX1262 hardware.
2026-02-03 16:20:51 -08:00
Lloyd
076d87dcde Merge pull request #80 from dmduran12/feature/bulk-packets-gzip 2026-02-03 19:37:44 +00:00
dmduran12
d28a966e2e Enable gzip compression for bulk_packets endpoint
Reduces payload size for large packet downloads, improving performance
on slow network connections.

Co-Authored-By: Warp <agent@warp.dev>
2026-02-03 11:35:02 -08:00
Lloyd
22c6521fd6 Merge pull request #79 from dmduran12/feature/bulk-packets-timestamp-filter 2026-02-03 19:13:03 +00:00
dmduran12
047b983497 Add timestamp filtering to bulk_packets endpoint
Add start_timestamp and end_timestamp parameters to the bulk_packets API
endpoint to allow time-range filtering for bulk packet retrieval.

Co-Authored-By: Warp <agent@warp.dev>
2026-02-03 11:03:05 -08:00
Lloyd
b0e19b13af Add bulk packet retrieval API with gzip compression and pagination support. 2026-02-03 10:21:59 +00:00
Lloyd
3adfee5160 Disable Gzip compression for HTTPStatsServer configuration 2026-02-03 08:34:23 +00:00
Lloyd
04ae4c9bf0 Update dependencies in control file and enhance postinst script for PyPI package installations 2026-02-02 10:49:54 +00:00
Lloyd
9256ba9c35 Remove force-reinstall option from pip install command in install_repeater function 2026-02-02 10:44:39 +00:00
Lloyd
adbdc5e3a4 Disable Gzip compression for WebSocket endpoint 2026-02-01 22:53:03 +00:00
Lloyd
7103103cf7 Enable Gzip compression for HTTP responses 2026-02-01 22:36:37 +00:00
Lloyd
612fc82b34 SPI check for universal compatibility. 2026-01-30 15:14:24 +00:00
Lloyd
f33c75fb16 Merge pull request #74 from pinztrek/reset
Reset function for manage.sh
2026-01-30 13:16:48 +00:00
Lloyd
9bf8966a32 Merge pull request #73 from pinztrek/nebrahat
adding Nebrahat
2026-01-30 13:11:52 +00:00
Alan Barrow
3f403a2081 Adding reset function 2026-01-29 18:56:15 -05:00
Alan Barrow
ebcb68b788 Added reset function to manage.sh 2026-01-29 18:48:32 -05:00
Alan Barrow
616317356a adding Nebrahat 2026-01-29 17:36:48 -05:00
Lloyd
0d14884adb broker connection management with JWT reconnection scheduling and error handling 2026-01-23 14:47:29 +00:00
Lloyd
aeba6c4413 update installation process and add live logs feature 2026-01-22 14:56:27 +00:00
Lloyd
d28ddcc34c reorganize hardware configuration for sx1262 settings 2026-01-22 13:29:05 +00:00
Lloyd
267b8e2a1c fix setup fields 2026-01-22 13:10:07 +00:00
Lloyd
5e4adf62b3 add ed auth to WS 2026-01-20 21:53:24 +00:00
Lloyd
8b95bfb8ba feat: enhance MQTT error handling and add packet stats broadcasting 2026-01-20 20:31:45 +00:00
Lloyd
33e353d215 fix: update reconnection logic to refresh JWT token before connecting 2026-01-19 12:41:54 +00:00
Lloyd
371b9fdbb8 fix: update airtime calculations to use config values in AirtimeManager 2026-01-19 11:52:23 +00:00
Lloyd
bad6e00fd8 Merge PR #63: fix: use correct Semtech LoRa airtime formula 2026-01-19 10:23:25 +00:00
dmduran12
64100d6311 fix: use correct Semtech LoRa airtime formula
Replace simplified airtime calculation with the proper Semtech reference
formula that accounts for:
- Coding rate (CR)
- CRC overhead
- Explicit/implicit header mode
- Low data rate optimization (SF11/SF12 at 125kHz)

The previous formula significantly underestimated airtime, especially
at higher spreading factors, leading to inaccurate duty cycle tracking.

Reference: https://www.semtech.com/design-support/lora-calculator

Co-Authored-By: Warp <agent@warp.dev>
2026-01-18 17:16:21 -08:00
Lloyd
f6a4e0f861 simplify PacketTable rendering and system stats update logic 2026-01-18 22:39:13 +00:00
Lloyd
86ab778aeb fix datarange in NF 2026-01-18 21:27:35 +00:00
Lloyd
a7fe30b2c3 up date to stats card 2026-01-18 20:56:43 +00:00
Lloyd
599e4628d9 Changes include:
Features

Neighbour details modal with full info and map view

WebSocket support with heartbeat and automatic reconnection

Improved signal quality calculations (SNR-based RSSI)

Route-based pagination for faster initial loads

UI

Mobile sidebar tweaks (logout, version info, lazy-loaded charts)

Sorting added to the neighbour table

Packet view now shows multi-hop paths

CAD calibration charts respect light/dark themes

Statistics charts now show the full requested time range

Performance

Reduced polling when WebSocket is active

Lazy loading for heavier components

Noise floor data capped to keep charts responsive

Technical

Improved type safety across API responses

Contrast improvements for accessibility

Cleaner WebSocket and MQTT reconnection handling

Additional metrics added to heartbeat stats

Bug fixes

Corrected noise floor history query

Fixed authentication for CAD calibration streams

Nothing major required from users — just update and carry on.
As always, shout if something looks off.
2026-01-18 20:15:50 +00:00
Lloyd
5bdea1132c Suppress pip warnings during package upgrade/install 2026-01-12 22:17:24 +00:00
Lloyd
81aaeb269c Improve package update logic and ensure pymc_core is up to date 2026-01-12 22:09:54 +00:00
Lloyd
d671c58184 suppress duplicate packets in processing logic 2026-01-12 16:23:11 +00:00
Lloyd
1999af8bdd add Packet Hash Cache to UI 2026-01-10 22:59:43 +00:00
Lloyd
effad3378f Increase default cache TTL from 60 seconds to 1 hour 2026-01-10 22:27:15 +00:00
Lloyd
4f22cb1308 Convert public key to uppercase when retrieving from local identity 2026-01-09 17:24:10 +00:00
Lloyd
7bd5b6f13d Add UTF-8 validation for node name length and improve hardware file loading logic 2026-01-09 16:44:05 +00:00
Lloyd
d7a886d0e5 Update file paths for radio settings and presets to use config-based directory 2026-01-09 12:14:38 +00:00