Conversation
…and initialization sequence
…systems that don't support GPIO CDEV2
…update related documentation - Updated radio type choices in various example scripts to include 'kiss-modem'. - Enhanced the create_radio function to support 'kiss-modem' with specific configuration and identity handling. - Added conditional imports for KissSerialWrapper and KissModemWrapper in the hardware module. - Updated documentation to reflect changes in radio type options and identity creation logic.
…packet metrics - Updated the RX callback to accept both (data) and (data, rssi, snr) signatures for improved flexibility. - Implemented a helper function to invoke the callback with the appropriate number of arguments. - Modified the dispatcher to handle per-packet RSSI and SNR values, ensuring accurate metrics without race conditions. - Added a test to verify that the RX callback correctly receives per-packet RSSI and SNR values.
…allbacks - Introduced a method to set an asyncio event loop for safe callback invocation from background threads. - Updated the RX callback dispatcher to utilize the event loop when set, ensuring proper async integration. - Modified the constructor and documentation to reflect changes in callback handling and configuration options. - Added tests to verify event loop functionality and compatibility with radio configuration keys.
This commit introduces a new driver for the CH341 USB-to-SPI/GPIO interface, utilizing ctypes to directly call libusb for asynchronous operations. The implementation includes support for SPI transfers, GPIO control, and proper handling of USB transfers with error management. Key features include: - Singleton pattern for driver instance management. - Asynchronous transfer handling with callbacks. - GPIO pin manipulation methods for setting direction and state. - SPI transfer methods with support for both output and input operations. - Comprehensive error handling and logging throughout the driver. This driver aims to provide a reliable interface for interacting with CH341 devices in Python.
…systems that don't support GPIO CDEV2
…rmance; remove unused code and streamline CAD logic
…e; remove unnecessary debug code and enhance edge detection handling
…ulation - Changed method signature of calc_shared_secret to accept a 32-byte Ed25519 public key instead of X25519. - Updated documentation to clarify the internal conversion from Ed25519 to X25519 by the modem. - Added validation to ensure the provided public key is the correct length. - Enhanced comments for better understanding of the key exchange process.
…ions - Adjusted command constants for KISS Modem to reflect the correct values as per firmware documentation. - Renumbered CMD and RESP constants to ensure consistency and avoid conflicts with firmware commands. - Enhanced comments for clarity regarding the changes made to the command structure.
- Implemented LBT mechanism to check channel availability before transmission, aligning with MeshCore firmware specifications. - Introduced LBT retry delays and maximum wait time to manage channel busy states. - Updated send method to return detailed transmission metadata, including LBT metrics. - Refactored timestamp retrieval in Dispatcher to use asyncio.get_running_loop for better compatibility.
- Added a cleanup method to release modem resources by disconnecting the serial and stopping threads. - Added a check_radio_health method to verify modem connectivity and respond to pings, enhancing reliability. - Added a get_status method to retrieve comprehensive radio status, including configuration and statistics.
- Updated command and response constants to align with the new SetHardware protocol. - Introduced new sub-commands and responses for hardware interactions. - Enhanced error handling and validation for frame sizes. - Improved test cases to cover new command structures and ensure correct frame decoding.
- Enhanced the _cmd_set_flood_scope method to correctly process the flood scope data by adjusting the expected data length and updating the slicing logic to align with firmware requirements. - Added detailed docstring to clarify the wire format for flood scope data. - Introduced integration tests to verify the correct behavior of channel messages with flood scope, ensuring compatibility with firmware expectations.
… stale deliveries" This reverts commit b095595.
Refine path length handling and validation in ACK processing and packets
…d async wrapper - Changed push_trace_data from async to sync for immediate enqueueing, aligning with usage patterns. - Introduced push_trace_data_async as an optional async wrapper for compatibility with existing async call sites. - Updated documentation and tests to reflect changes in trace data handling and ensure correct functionality.
fix(companion): refactor push_trace_data to synchronous method and add async wrapper
- Updated the _cmd_add_update_contact method to maintain command/response parity by returning only a single OK response frame, preventing desynchronization issues with companion clients. - Removed unnecessary frame writing logic for contact updates to streamline the response process. - Added a new test to verify that the correct response frame is emitted when adding or updating a contact.
Replay the cached raw ADVERT blob for the selected contact instead of generating a new advert signed by the companion identity. This preserves the contact pubkey on zero-hop share, matches MeshCore firmware behavior, and avoids malformed share semantics when no cached advert exists. Add contact blob persistence/capture paths, update share logic to enforce direct zero-hop normalization, and include tests/docs for blob-required sharing and pubkey preservation.
Fix CMD_ADD_UPDATE_CONTACT and CMD_SHARE_CONTACT behaviors
…duplication and raw hash blacklisting - Updated the Dispatcher class to use a raw-frame hash for blacklisting known malformed packets before parsing, enhancing error handling. - Changed deduplication logic to utilize a payload-based hash, ensuring compatibility with firmware and improving packet processing accuracy. - Added tests to verify that packets with the same payload but different paths are deduplicated correctly, while different payloads are processed independently. - Ensured malformed packets are blacklisted by their raw hash to prevent repeated parsing attempts.
refactor(dispatcher): improve packet processing with payload-based deduplication and raw hash blacklisting
- Updated the client_idle_timeout_sec parameter from 120 seconds to 8 hours (28800 seconds) to accommodate longer idle periods without disconnecting clients. - This change aims to improve user experience by allowing more flexibility in client connections.
fix(companion): extend client idle timeout for CompanionFrameServer
Feat/companion
Guard frame-server cleanup by connection ownership so an evicted client handler cannot cancel or clear the newly connected client’s writer queue/task. Add regression and disconnect-path tests to verify eviction churn, idle timeout, and connection reset remain stable.
- Added a confirmation response before sending a channel message to ensure the client is aware of the operation's status. - Implemented a warning log for failed message sends after an OK response
fix(companion): improve error handling for channel message sending
…dvert flags - Updated the CompanionBase class to reset contact flags to 0 for new contacts, preventing wire protocol advert flags from being stored as local contact flags. - Added a regression test to verify that auto-added chat contacts do not appear as favourites due to inherited flags.
fix(companion): ensure auto-added chat contacts do not inherit wire advert flags
- Introduced TXT_TYPE_CLI_DATA to modify how delivery ACK is processed for CLI_DATA messages, ensuring that ACK tracking is bypassed for MeshCore repeaters. - Adjusted the flags byte in the packet creation to accommodate the text type, affecting both message sending and CRC calculation. - Added a test to verify the correct behavior of the flags byte for CLI_DATA messages.
fix(gpio): support Rockchip global GPIO numbering
… pin number check
Fix/repeater admin txt cli data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pyMC_core Updates