• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1USB TRANSPORT
2=============
3
4The USB transport interfaces with a local Bluetooth USB dongle.
5
6## Moniker
7The moniker for a USB transport is either `usb:<index>` or `usb:<vendor>:<product>`
8with `<index>` as the 0-based index to select amongst all the devices that appear to be supporting Bluetooth HCI (0 being the first one), or where `<vendor>` and `<product>` are a vendor ID and product ID in hexadecimal.
9
10!!! example
11    `usb:04b4:f901`
12    Use the USB dongle with `vendor` equal to `04b4` and `product` equal to `f901`
13
14    `usb:0`
15    Use the first Bluetooth dongle
16
17## Alternative
18The library includes two different implementations of the USB transport, implemented using different python bindings for `libusb`.
19Using the transport prefix `pyusb:` instead of `usb:` selects the implementation based on  [PyUSB](https://pypi.org/project/pyusb/), using the synchronous API of `libusb`, whereas the default implementation is based on [libusb1](https://pypi.org/project/libusb1/), using the asynchronous API of `libusb`. In order to use the alternative PyUSB-based implementation, you need to ensure that you have installed that python module, as it isn't installed by default as a dependency of Bumble.
20