xref: /freebsd/share/man/man4/ng_ubt.4 (revision 2008043f386721d58158e37e0d7e50df8095942d)
1.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $Id: ng_ubt.4,v 1.3 2003/05/21 19:37:35 max Exp $
26.\"
27.Dd December 26, 2012
28.Dt NG_UBT 4
29.Os
30.Sh NAME
31.Nm ng_ubt
32.Nd Netgraph node type that is also a driver for Bluetooth USB devices
33.Sh SYNOPSIS
34.In sys/types.h
35.In netgraph/bluetooth/include/ng_ubt.h
36.Sh DESCRIPTION
37The
38.Nm ubt
39node type is both a persistent Netgraph node type and a driver for
40Bluetooth USB devices.
41It implements a Bluetooth USB transport layer
42as per chapter H2 of the Bluetooth Specification Book v1.1.
43A new node is created when a supported USB device is plugged in.
44.Pp
45The node has a single hook called
46.Dv hook .
47Incoming bytes received on the device are re-assembled into HCI frames
48(according to the length).
49Full HCI frames are sent out on the hook.
50The node will add a HCI frame indicator if the device did not send it.
51HCI frames received on
52.Dv hook
53are transmitted out.
54The node will drop the HCI frame indicator unless the device
55requires it to be present.
56.Sh HARDWARE
57The
58.Nm
59driver supports all Bluetooth USB devices that conform with
60the Bluetooth specification v1.1, including:
61.Pp
62.Bl -bullet -compact
63.It
643Com 3CREB96
65.It
66AIPTEK BR0R02
67.It
68EPoX BT-DG02
69.It
70Mitsumi Bluetooth USB adapter
71.It
72MSI MS-6967
73.It
74TDK Bluetooth USB adapter
75.It
76Broadcom Bluetooth USB adapter
77.El
78.Sh HOOKS
79This node type supports the following hooks:
80.Bl -tag -width ".Va hook"
81.It Va hook
82single HCI frame contained in a single
83.Vt mbuf
84structure.
85.El
86.Sh CONTROL MESSAGES
87This node type supports the generic control messages, plus the following:
88.Bl -tag -width indent
89.It Dv NGM_UBT_NODE_GET_DEBUG Pq Ic get_debug
90Returns an integer containing the current debug level for the node.
91.It Dv NGM_UBT_NODE_SET_DEBUG Pq Ic set_debug
92This command takes an integer argument and sets the current debug level
93for the node.
94.It Dv NGM_UBT_NODE_GET_QLEN Pq Ic get_qlen
95This command takes a parameter that specifies the queue number and returns
96the current maximal length of the queue for the node.
97.It Dv NGM_UBT_NODE_SET_QLEN Pq Ic set_qlen
98This command takes two parameters that specify the queue number and the maximum
99length of the queue and sets the maximal length of the queue for the node.
100.It Dv NGM_UBT_NODE_GET_STAT Pq Ic get_stat
101Returns various statistic information for the node, such as: number of
102bytes (frames) sent, number of bytes (frames) received and number of
103input (output) errors.
104.It Dv NGM_UBT_NODE_RESET_STAT Pq Ic reset_stat
105Reset all statistic counters to zero.
106.El
107.Sh SHUTDOWN
108This node shuts down when the corresponding USB device is un-plugged.
109.Sh SEE ALSO
110.Xr netgraph 4 ,
111.Xr ugen 4 ,
112.Xr usb 4 ,
113.Xr ngctl 8
114.Sh HISTORY
115The
116.Nm ubt
117node type was implemented in
118.Fx 5.0 .
119.Sh AUTHORS
120.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com
121.Sh BUGS
122Isochronous USB transfers are broken.
123This means that the USB device will not be able to transfer SCO data (voice).
124USB interrupt transfers are implemented as bulk-in transfers (not really a bug).
125