Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support drivers that can't use reset directly. #368

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

barbibulle
Copy link
Collaborator

This should allow a driver to interact with a controller, via the host, before any command, including RESET is issued.
See the example with the Realtek driver.
Note that if a driver needs to send a command and receive a response before RESET is performed, it must set host.ready = True to allow the inbound packet processing to accept the packet even if no RESET has been done (by default, the host ignores packets from the controller that are received before a RESET).

Also included is a generic way to add HCI metadata to an HCI transport source. Previously, only certain transport sources would set metdata (USB would set vendor_id and product_id, which the Realtek driver uses to determine if it should try
to load a FW image). Now, a driver can be "forced" for a specific HCI source, when no relevant metadata is available (for
example, when the controller is only visible via a transport that does not set metadata, like a serial port or TCP socket).
Any number of metadata key=value pairs can be added to a transport name, in square brackets, after the transport type.
Example: usb:[driver=rtk]0 would "inject" a "driver" metadata entry for the usb transport, which the Realtek driver will see as a request that this driver be activated, even if the vendor_id and product_id are not present, or don't match the internal allow-list.

bumble/drivers/__init__.py Outdated Show resolved Hide resolved
@barbibulle barbibulle merged commit a286700 into main Dec 12, 2023
51 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.

3 participants