2006-09-11 00:09:11 +04:00
|
|
|
.\" $NetBSD: ubt.4,v 1.6 2006/09/10 20:09:11 plunky Exp $
|
2006-06-19 19:44:33 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2006 Itronix Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Written by Iain Hibbert for Itronix Inc.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. The name of Itronix Inc. may not be used to endorse
|
|
|
|
.\" or promote products derived from this software without specific
|
|
|
|
.\" prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
|
|
|
|
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
.\" ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2006-08-27 15:41:58 +04:00
|
|
|
.Dd August 27, 2006
|
2006-06-19 19:44:33 +04:00
|
|
|
.Dt UBT 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm ubt
|
|
|
|
.Nd USB Bluetooth driver
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Cd "ubt* at uhub? port ? configuration ? interface ?"
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver provides support for USB Bluetooth dongles
|
|
|
|
to the Bluetooth protocol stack.
|
|
|
|
.Pp
|
|
|
|
USB Bluetooth dongles provide two interfaces, both of which the
|
|
|
|
.Nm
|
2006-08-20 04:30:02 +04:00
|
|
|
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
|
|
|
|
.Xr sysctl 8
|
|
|
|
variable.
|
|
|
|
The number of alternate configurations is indicated by the value
|
2006-06-19 19:44:33 +04:00
|
|
|
in the hw.ubtN.alt_config variable, and the isoc frame size for the current
|
2006-08-20 04:30:02 +04:00
|
|
|
configuration is shown in the hw.ubtN.sco_rxsize and hw.ubtN.sco_txsize
|
2006-06-19 19:44:33 +04:00
|
|
|
variables.
|
|
|
|
.Pp
|
|
|
|
By default, configuration 0 is selected, which means that no bandwidth
|
2006-08-20 04:30:02 +04:00
|
|
|
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
|
2006-06-19 19:44:33 +04:00
|
|
|
useful as a general guidance though details may differ between manufacturers.
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -compact -width XXX
|
|
|
|
.It 0
|
|
|
|
No active voice channels
|
|
|
|
.It 1
|
|
|
|
One voice channel with 8-bit encoding
|
|
|
|
.It 2
|
2006-08-20 04:30:02 +04:00
|
|
|
Two voice channels with 8-bit encoding, or one voice channel with
|
|
|
|
16-bit encoding.
|
2006-06-19 19:44:33 +04:00
|
|
|
.It 3
|
|
|
|
Three voice channels with 8-bit encoding
|
|
|
|
.It 4
|
|
|
|
Two voice channels with 16-bit encoding
|
|
|
|
.It 5
|
|
|
|
Three voice channels with 16-bit encoding
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr bluetooth 4 ,
|
|
|
|
.Xr uhub 4 ,
|
|
|
|
.Xr sysctl 8
|
|
|
|
.Sh HISTORY
|
|
|
|
This
|
|
|
|
.Nm
|
|
|
|
device driver was originally a character device written by
|
2006-08-20 04:30:02 +04:00
|
|
|
.An David Sainty
|
2006-06-19 19:44:33 +04:00
|
|
|
and
|
2006-08-20 04:30:02 +04:00
|
|
|
.An Lennart Augustsson .
|
2006-06-19 19:44:33 +04:00
|
|
|
It was rewritten to support socket based Bluetooth access for
|
|
|
|
.Nx 4.0
|
|
|
|
by
|
2006-08-20 04:30:02 +04:00
|
|
|
.An Iain Hibbert .
|
2006-08-27 15:41:58 +04:00
|
|
|
.Sh CAVEATS
|
|
|
|
Isochronous data is seemingly not well supported over USB in the current
|
|
|
|
system and to get SCO working, you may have to calculate the SCO packet
|
|
|
|
size that the stack will use.
|
|
|
|
This is the sco_mtu value reported by the
|
|
|
|
.Xr btconfig 8
|
|
|
|
command, and when combined with the SCO header (3 bytes) should
|
|
|
|
fit exactly into an integer number of Isochronous data frames where
|
|
|
|
the frame size is indicated by the
|
|
|
|
.Sq hw.ubtN.sco_txsize
|
|
|
|
sysctl variable.
|
|
|
|
.Pp
|
|
|
|
For example: I want one voice channel (which is all that is supported,
|
2006-09-11 00:09:11 +04:00
|
|
|
for now) so am using configuration #2, with a frame length of 17
|
2006-08-27 15:41:58 +04:00
|
|
|
bytes.
|
2006-09-11 00:09:11 +04:00
|
|
|
This gives possible values of:
|
|
|
|
.Pp
|
|
|
|
.Dl "(17 * 1) - 3 = 14"
|
|
|
|
.Dl "(17 * 2) - 3 = 31"
|
|
|
|
.Dl "(17 * 3) - 3 = 48"
|
|
|
|
.Dl "(17 * 4) - 3 = 65"
|
|
|
|
.Dl "(17 * 5) - 3 = 82"
|
|
|
|
.Dl "etc."
|
|
|
|
.Pp
|
|
|
|
.Xr 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.
|
2006-08-27 15:41:58 +04:00
|
|
|
.Pp
|
|
|
|
The SCO packet size can be changed using the
|
|
|
|
.Sq scomtu
|
|
|
|
option to
|
|
|
|
.Xr btconfig 8 .
|
|
|
|
.Pp
|
|
|
|
The failure mode is that the USB Bluetooth dongle locks up though
|
|
|
|
generally removal/reinsertion will clear the problem.
|
2006-09-03 03:54:23 +04:00
|
|
|
.Sh BUGS
|
|
|
|
The Isochronous configuration can only be changed when the device is not
|
|
|
|
marked up.
|