Skip to content

Feat/pre 1160 compatibility sendfix#278

Merged
rightup merged 6 commits into
pyMC-dev:devfrom
agessaman:feat/pre-1160-compatibility-sendfix
Jun 2, 2026
Merged

Feat/pre 1160 compatibility sendfix#278
rightup merged 6 commits into
pyMC-dev:devfrom
agessaman:feat/pre-1160-compatibility-sendfix

Conversation

@agessaman
Copy link
Copy Markdown
Contributor

pyMC_repeater side fixes and improvements

Improved companion message send logic

Added jitter to discovery request responses to avoid additional collisions

Supports pyMC repeater returning its own regions via regions requests—alpha status.

Support for pushing raw bytes to non-transmitting companion clients in inject_packet #277

agessaman and others added 6 commits May 16, 2026 17:32
- Updated the __call__ method to return a boolean indicating transmission success.
- Adjusted handling of transmission failures to increment dropped_count appropriately.
- Enhanced logging for transmission failures in PacketRouter to ensure visibility of issues.
- Added tests to verify correct behavior during transmission exceptions and failures.
… name formatting

- Updated the `LoginHelper` class to wrap the login handler in an `AnonRequestHandler`, allowing for proper handling of anonymous requests.
- Introduced methods for formatting region names based on flood policies and added support for retrieving transport keys from SQLite storage.
- Enhanced the constructor to accept additional parameters for SQLite handler and configuration, improving flexibility for owner-info and feature-flag replies.
- Added tests to validate the new functionality and ensure correct behavior of region name formatting and owner/features callbacks.
…ent packet collisions

- Added a default upper bound for randomized pre-send jitter in discovery responses to avoid collisions when multiple repeaters respond simultaneously.
- Introduced a new parameter `response_jitter_ms` in the `DiscoveryHelper` constructor to configure the jitter.
- Updated the `_send_packet_async` method to apply the jitter before sending responses.
- Added tests to verify the correct application of jitter and ensure functionality when jitter is disabled.
…ility-sendfix

Bring in companion transmission handling improvements from RepeaterHandler.

Co-authored-by: Cursor <cursoragent@cursor.com>
The merged RepeaterHandler treats a falsy tx_success as failure; update
the duty-cycle deferral test to return True instead of None.

Co-authored-by: Cursor <cursoragent@cursor.com>
Push locally-injected TX packets to connected companion frame server
clients as PUSH_CODE_LOG_RX_DATA (0x88) with snr=0/rssi=0, so apps that
decrypt locally from raw RX (e.g. RemoteTerm) see companion-originated
channel traffic. The originating companion is excluded so a node never
hears its own transmission, matching physical firmware behavior.
inject_packet now takes an origin_hash (threaded per-companion via the
packet_injector partial); _on_raw_rx_for_companions gains exclude_hash
to skip that companion's frame server. OTA RX is unaffected.
@rightup rightup merged commit d7e74e0 into pyMC-dev:dev Jun 2, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants