| UBT(4) | Device Drivers Manual | UBT(4) | 
ubt —
ubt* at uhub? port ? configuration ? interface ?
ubt driver provides support for USB Bluetooth
  dongles to the Bluetooth protocol stack.
USB Bluetooth dongles provide two interfaces, both of which the
    ubt driver claims. The second interface is used for
    Isochronous data and will have several alternate configurations regarding
    bandwidth consumption, which can be set using the hw.ubtN.config
    sysctl(8) variable. The number
    of alternate configurations is indicated by the value in the
    hw.ubtN.alt_config variable, and the isoc frame size for the current
    configuration is shown in the hw.ubtN.sco_rxsize and hw.ubtN.sco_txsize
    variables.
By default, configuration 0 is selected, which means that no bandwidth is used on the Isochronous interface and no SCO data can be sent. Consult the Bluetooth USB specification at https://www.bluetooth.org/ for complete instructions on setting bandwidth consumption. The following extract may be useful as a general guidance though details may differ between manufacturers.
ubt device driver was originally a character device
  written by David Sainty and Lennart
  Augustsson. It was rewritten to support socket based Bluetooth access
  for NetBSD 4.0 by Iain
  Hibbert.
For example: I want one voice channel (which is all that is supported, for now) so am using configuration #2, with a frame length of 17 bytes. This gives possible values of:
(17 * 1) - 3 = 14(17 * 2) - 3 = 31(17 * 3) - 3 = 48(17 * 4) - 3 = 65(17 * 5) - 3 = 82etc.btconfig(8) shows the maximum SCO payload as 64 bytes, so I am using the next smaller size of 48, to minimize the overhead of the 3 header bytes.
The SCO packet size can be changed using the ‘scomtu’ option to btconfig(8).
The failure mode is that the USB Bluetooth dongle locks up though generally removal/reinsertion will clear the problem.
| August 27, 2006 | NetBSD 10.0 |