xref: /dflybsd-src/share/man/man4/ubt.4 (revision b0a405db534ead54c6e9811b89d9b262c3280011)
1a1fe33c8SHasso Tepper.\" $NetBSD: ubt.4,v 1.5 2006/09/02 23:54:23 wiz Exp $
2a1fe33c8SHasso Tepper.\"
3a1fe33c8SHasso Tepper.\" Copyright (c) 2006 Itronix Inc.
4a1fe33c8SHasso Tepper.\" All rights reserved.
5a1fe33c8SHasso Tepper.\"
6a1fe33c8SHasso Tepper.\" Written by Iain Hibbert for Itronix Inc.
7a1fe33c8SHasso Tepper.\"
8a1fe33c8SHasso Tepper.\" Redistribution and use in source and binary forms, with or without
9a1fe33c8SHasso Tepper.\" modification, are permitted provided that the following conditions
10a1fe33c8SHasso Tepper.\" are met:
11a1fe33c8SHasso Tepper.\" 1. Redistributions of source code must retain the above copyright
12a1fe33c8SHasso Tepper.\"    notice, this list of conditions and the following disclaimer.
13a1fe33c8SHasso Tepper.\" 2. Redistributions in binary form must reproduce the above copyright
14a1fe33c8SHasso Tepper.\"    notice, this list of conditions and the following disclaimer in the
15a1fe33c8SHasso Tepper.\"    documentation and/or other materials provided with the distribution.
16a1fe33c8SHasso Tepper.\" 3. The name of Itronix Inc. may not be used to endorse
17a1fe33c8SHasso Tepper.\"    or promote products derived from this software without specific
18a1fe33c8SHasso Tepper.\"    prior written permission.
19a1fe33c8SHasso Tepper.\"
20a1fe33c8SHasso Tepper.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
21a1fe33c8SHasso Tepper.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22a1fe33c8SHasso Tepper.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23a1fe33c8SHasso Tepper.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
24a1fe33c8SHasso Tepper.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25a1fe33c8SHasso Tepper.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26a1fe33c8SHasso Tepper.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27a1fe33c8SHasso Tepper.\" ON ANY THEORY OF LIABILITY, WHETHER IN
28a1fe33c8SHasso Tepper.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29a1fe33c8SHasso Tepper.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30a1fe33c8SHasso Tepper.\" POSSIBILITY OF SUCH DAMAGE.
31a1fe33c8SHasso Tepper.\"
32a1fe33c8SHasso Tepper.Dd August 27, 2006
33a1fe33c8SHasso Tepper.Dt UBT 4
34a1fe33c8SHasso Tepper.Os
35a1fe33c8SHasso Tepper.Sh NAME
36a1fe33c8SHasso Tepper.Nm ubt
37a1fe33c8SHasso Tepper.Nd USB Bluetooth driver
38a1fe33c8SHasso Tepper.Sh SYNOPSIS
39a1fe33c8SHasso TepperTo compile this driver into the kernel,
40a1fe33c8SHasso Tepperplace the following lines in your
41a1fe33c8SHasso Tepperkernel configuration file:
42a1fe33c8SHasso Tepper.Bd -ragged -offset indent
43a1fe33c8SHasso Tepper.Cd "device ubt"
44a1fe33c8SHasso Tepper.Ed
45a1fe33c8SHasso Tepper.Pp
46a1fe33c8SHasso TepperAlternatively, to load the driver as a
47a1fe33c8SHasso Teppermodule at boot time, place the following line in
48a1fe33c8SHasso Tepper.Xr loader.conf 5 :
49a1fe33c8SHasso Tepper.Bd -literal -offset indent
50a1fe33c8SHasso Tepperubt_load="YES"
51a1fe33c8SHasso Tepper.Ed
52a1fe33c8SHasso Tepper.Sh DESCRIPTION
53a1fe33c8SHasso TepperThe
54a1fe33c8SHasso Tepper.Nm
55a1fe33c8SHasso Tepperdriver provides support for USB Bluetooth dongles
56a1fe33c8SHasso Tepperto the Bluetooth protocol stack.
579e2c426cSHasso Tepper.Pp
589e2c426cSHasso TepperUSB Bluetooth dongles provide two interfaces, both of which the
599e2c426cSHasso Tepper.Nm
609e2c426cSHasso Tepperdriver claims.
619e2c426cSHasso TepperThe second interface is used for Isochronous data and will have
629e2c426cSHasso Tepperseveral alternate configurations regarding bandwidth consumption,
639e2c426cSHasso Tepperwhich can be set using the hw.ubtN.config
649e2c426cSHasso Tepper.Xr sysctl 8
659e2c426cSHasso Teppervariable.
669e2c426cSHasso TepperThe number of alternate configurations is indicated by the value
679e2c426cSHasso Tepperin the hw.ubtN.alt_config variable, and the isoc frame size for the current
689e2c426cSHasso Tepperconfiguration is shown in the hw.ubtN.sco_rxsize and hw.ubtN.sco_txsize
699e2c426cSHasso Teppervariables.
709e2c426cSHasso Tepper.Pp
719e2c426cSHasso TepperBy default, configuration 0 is selected, which means that no bandwidth
729e2c426cSHasso Tepperis used on the Isochronous interface and no SCO data can be sent.
739e2c426cSHasso TepperConsult the Bluetooth USB specification at https://www.bluetooth.org/
749e2c426cSHasso Tepperfor complete instructions on setting bandwidth consumption.
759e2c426cSHasso TepperThe following extract may be
769e2c426cSHasso Tepperuseful as a general guidance though details may differ between manufacturers.
779e2c426cSHasso Tepper.Pp
789e2c426cSHasso Tepper.Bl -tag -compact -width XXX
799e2c426cSHasso Tepper.It 0
809e2c426cSHasso TepperNo active voice channels
819e2c426cSHasso Tepper.It 1
829e2c426cSHasso TepperOne voice channel with 8-bit encoding
839e2c426cSHasso Tepper.It 2
849e2c426cSHasso TepperTwo voice channels with 8-bit encoding, or one voice channel with
859e2c426cSHasso Tepper16-bit encoding.
869e2c426cSHasso Tepper.It 3
879e2c426cSHasso TepperThree voice channels with 8-bit encoding
889e2c426cSHasso Tepper.It 4
899e2c426cSHasso TepperTwo voice channels with 16-bit encoding
909e2c426cSHasso Tepper.It 5
919e2c426cSHasso TepperThree voice channels with 16-bit encoding
929e2c426cSHasso Tepper.El
93a1fe33c8SHasso Tepper.Sh SEE ALSO
94*b0a405dbSSascha Wildner.Xr bluetooth 4 ,
95a1fe33c8SHasso Tepper.\".Xr uhub 4 ,
969e2c426cSHasso Tepper.Xr sysctl 8
97a1fe33c8SHasso Tepper.Sh HISTORY
98a1fe33c8SHasso TepperThis
99a1fe33c8SHasso Tepper.Nm
100a1fe33c8SHasso Tepperdevice driver was originally a character device written by
101a1fe33c8SHasso Tepper.An David Sainty
102a1fe33c8SHasso Tepperand
103a1fe33c8SHasso Tepper.An Lennart Augustsson .
104a1fe33c8SHasso TepperIt was rewritten to support socket based Bluetooth access for
105a1fe33c8SHasso Tepper.Nx 4.0
106a1fe33c8SHasso Tepperby
107a1fe33c8SHasso Tepper.An Iain Hibbert .
108a1fe33c8SHasso TepperThe
109a1fe33c8SHasso Tepper.Nm
110a1fe33c8SHasso Tepperdriver was imported into
111a1fe33c8SHasso Tepper.Dx 1.11 .
1129e2c426cSHasso Tepper.Sh CAVEATS
1139e2c426cSHasso TepperIsochronous data is seemingly not well supported over USB in the current
1149e2c426cSHasso Teppersystem and to get SCO working, you may have to calculate the SCO packet
1159e2c426cSHasso Teppersize that the stack will use.
1169e2c426cSHasso TepperThis is the sco_mtu value reported by the
1179e2c426cSHasso Tepper.Xr btconfig 8
1189e2c426cSHasso Teppercommand, and when combined with the SCO header (3 bytes) should
1199e2c426cSHasso Tepperfit exactly into an integer number of Isochronous data frames where
1209e2c426cSHasso Tepperthe frame size is indicated by the
1219e2c426cSHasso Tepper.Sq hw.ubtN.sco_txsize
1229e2c426cSHasso Teppersysctl variable.
1239e2c426cSHasso Tepper.Pp
1249e2c426cSHasso TepperFor example: I want one voice channel (which is all that is supported,
1259e2c426cSHasso Tepperfor now) so am using configuration #2, with a frame length of 17
1269e2c426cSHasso Tepperbytes.
1279e2c426cSHasso TepperThis gives possible values of:
1289e2c426cSHasso Tepper.Pp
1299e2c426cSHasso Tepper.Dl "(17 * 1) - 3 = 14"
1309e2c426cSHasso Tepper.Dl "(17 * 2) - 3 = 31"
1319e2c426cSHasso Tepper.Dl "(17 * 3) - 3 = 48"
1329e2c426cSHasso Tepper.Dl "(17 * 4) - 3 = 65"
1339e2c426cSHasso Tepper.Dl "(17 * 5) - 3 = 82"
1349e2c426cSHasso Tepper.Dl "etc."
1359e2c426cSHasso Tepper.Pp
1369e2c426cSHasso Tepper.Xr btconfig 8
1379e2c426cSHasso Teppershows the maximum SCO payload as 64 bytes, so I am using the next smaller
1389e2c426cSHasso Teppersize of 48, to minimize the overhead of the 3 header bytes.
1399e2c426cSHasso Tepper.Pp
1409e2c426cSHasso TepperThe SCO packet size can be changed using the
1419e2c426cSHasso Tepper.Sq scomtu
1429e2c426cSHasso Tepperoption to
1439e2c426cSHasso Tepper.Xr btconfig 8 .
1449e2c426cSHasso Tepper.Pp
1459e2c426cSHasso TepperThe failure mode is that the USB Bluetooth dongle locks up though
1469e2c426cSHasso Teppergenerally removal/reinsertion will clear the problem.
1479e2c426cSHasso Tepper.Sh BUGS
1489e2c426cSHasso TepperThe Isochronous configuration can only be changed when the device is not
1499e2c426cSHasso Teppermarked up.
150