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