mirror of
https://github.com/google/bumble.git
synced 2026-04-16 00:25:31 +00:00
usb: Add usb path moniker
Add a new moniker for usb and pyusb driver allowing to select the usb device using its bus id and port path like `usb:3-3.4.1`.
This commit is contained in:
committed by
David Duarte
parent
a2caf1deb2
commit
16d5cf6770
@@ -10,6 +10,7 @@ The moniker for a USB transport is either:
|
||||
* `usb:<vendor>:<product>`
|
||||
* `usb:<vendor>:<product>/<serial-number>`
|
||||
* `usb:<vendor>:<product>#<index>`
|
||||
* `usb:<bus>-<port_numbers>`
|
||||
|
||||
with `<index>` as a 0-based index (0 being the first one) to select amongst all the matching devices when there are more than one.
|
||||
In the `usb:<index>` form, matching devices are the ones supporting Bluetooth HCI, as declared by their Class, Subclass and Protocol.
|
||||
@@ -17,6 +18,8 @@ In the `usb:<vendor>:<product>#<index>` form, matching devices are the ones with
|
||||
|
||||
`<vendor>` and `<product>` are a vendor ID and product ID in hexadecimal.
|
||||
|
||||
with `<port_numbers>` as a list of all port numbers from root separated with dots `.`
|
||||
|
||||
In addition, if the moniker ends with the symbol "!", the device will be used in "forced" mode:
|
||||
the first USB interface of the device will be used, regardless of the interface class/subclass.
|
||||
This may be useful for some devices that use a custom class/subclass but may nonetheless work as-is.
|
||||
@@ -37,6 +40,9 @@ This may be useful for some devices that use a custom class/subclass but may non
|
||||
`usb:0B05:17CB!`
|
||||
The BT USB dongle vendor=0B05 and product=17CB, in "forced" mode.
|
||||
|
||||
`usb:3-3.4.1`
|
||||
The BT USB dongle on bus 3 on port path 3, 4, 1.
|
||||
|
||||
|
||||
## Alternative
|
||||
The library includes two different implementations of the USB transport, implemented using different python bindings for `libusb`.
|
||||
|
||||
Reference in New Issue
Block a user