1878ed226SJulian Elischer.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com> 2878ed226SJulian Elischer.\" All rights reserved. 3878ed226SJulian Elischer.\" 4878ed226SJulian Elischer.\" Redistribution and use in source and binary forms, with or without 5878ed226SJulian Elischer.\" modification, are permitted provided that the following conditions 6878ed226SJulian Elischer.\" are met: 7878ed226SJulian Elischer.\" 1. Redistributions of source code must retain the above copyright 8878ed226SJulian Elischer.\" notice, this list of conditions and the following disclaimer. 9878ed226SJulian Elischer.\" 2. Redistributions in binary form must reproduce the above copyright 10878ed226SJulian Elischer.\" notice, this list of conditions and the following disclaimer in the 11878ed226SJulian Elischer.\" documentation and/or other materials provided with the distribution. 12878ed226SJulian Elischer.\" 13878ed226SJulian Elischer.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14878ed226SJulian Elischer.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15878ed226SJulian Elischer.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16878ed226SJulian Elischer.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17878ed226SJulian Elischer.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18878ed226SJulian Elischer.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19878ed226SJulian Elischer.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20878ed226SJulian Elischer.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21878ed226SJulian Elischer.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22878ed226SJulian Elischer.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23878ed226SJulian Elischer.\" SUCH DAMAGE. 24878ed226SJulian Elischer.\" 250986ab12SMaksim Yevmenkin.\" $Id: ng_ubt.4,v 1.3 2003/05/21 19:37:35 max Exp $ 26878ed226SJulian Elischer.\" $FreeBSD$ 2772f00208SRuslan Ermilov.\" 28*70a0e340SGleb Smirnoff.Dd December 26, 2012 29878ed226SJulian Elischer.Dt NG_UBT 4 30878ed226SJulian Elischer.Os 31878ed226SJulian Elischer.Sh NAME 3272f00208SRuslan Ermilov.Nm ng_ubt 33878ed226SJulian Elischer.Nd Netgraph node type that is also a driver for Bluetooth USB devices 34878ed226SJulian Elischer.Sh SYNOPSIS 35878ed226SJulian Elischer.In sys/types.h 363a08bb88SMaksim Yevmenkin.In netgraph/bluetooth/include/ng_ubt.h 37878ed226SJulian Elischer.Sh DESCRIPTION 38878ed226SJulian ElischerThe 3972f00208SRuslan Ermilov.Nm ubt 40878ed226SJulian Elischernode type is both a persistent Netgraph node type and a driver for 4172f00208SRuslan ErmilovBluetooth USB devices. 4272f00208SRuslan ErmilovIt implements a Bluetooth USB transport layer 4372f00208SRuslan Ermilovas per chapter H2 of the Bluetooth Specification Book v1.1. 4438885006SChristian BruefferA new node is created when a supported USB device is plugged in. 45878ed226SJulian Elischer.Pp 46878ed226SJulian ElischerThe node has a single hook called 47878ed226SJulian Elischer.Dv hook . 48878ed226SJulian ElischerIncoming bytes received on the device are re-assembled into HCI frames 4972f00208SRuslan Ermilov(according to the length). 5072f00208SRuslan ErmilovFull HCI frames are sent out on the hook. 5138885006SChristian BruefferThe node will add a HCI frame indicator if the device did not send it. 5272f00208SRuslan ErmilovHCI frames received on 53878ed226SJulian Elischer.Dv hook 5472f00208SRuslan Ermilovare transmitted out. 5538885006SChristian BruefferThe node will drop the HCI frame indicator unless the device 56878ed226SJulian Elischerrequires it to be present. 5738885006SChristian Brueffer.Sh HARDWARE 5838885006SChristian BruefferThe 5938885006SChristian Brueffer.Nm 6029394b9bSChristian Bruefferdriver supports all Bluetooth USB devices that conform with 617daf8ae6SChristian Bruefferthe Bluetooth specification v1.1, including: 6238885006SChristian Brueffer.Pp 6338885006SChristian Brueffer.Bl -bullet -compact 6438885006SChristian Brueffer.It 6538885006SChristian Brueffer3Com 3CREB96 6638885006SChristian Brueffer.It 6738885006SChristian BruefferAIPTEK BR0R02 6838885006SChristian Brueffer.It 6938885006SChristian BruefferEPoX BT-DG02 7038885006SChristian Brueffer.It 7138885006SChristian BruefferMitsumi Bluetooth USB adapter 7238885006SChristian Brueffer.It 7338885006SChristian BruefferMSI MS-6967 7438885006SChristian Brueffer.It 7538885006SChristian BruefferTDK Bluetooth USB adapter 76*70a0e340SGleb Smirnoff.It 77*70a0e340SGleb SmirnoffBroadcom Bluetooth USB adapter 7838885006SChristian Brueffer.El 79878ed226SJulian Elischer.Sh HOOKS 80878ed226SJulian ElischerThis node type supports the following hooks: 81c60bda17SJoel Dahl.Bl -tag -width ".Va hook" 82c60bda17SJoel Dahl.It Va hook 8338885006SChristian Brueffersingle HCI frame contained in a single 8472f00208SRuslan Ermilov.Vt mbuf 85878ed226SJulian Elischerstructure. 86878ed226SJulian Elischer.El 87878ed226SJulian Elischer.Sh CONTROL MESSAGES 88878ed226SJulian ElischerThis node type supports the generic control messages, plus the following: 8972f00208SRuslan Ermilov.Bl -tag -width indent 90c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_GET_DEBUG Pq Ic get_debug 91878ed226SJulian ElischerReturns an integer containing the current debug level for the node. 92c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_SET_DEBUG Pq Ic set_debug 9338885006SChristian BruefferThis command takes an integer argument and sets the current debug level 94878ed226SJulian Elischerfor the node. 95c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_GET_QLEN Pq Ic get_qlen 9638885006SChristian BruefferThis command takes a parameter that specifies the queue number and returns 9738885006SChristian Bruefferthe current maximal length of the queue for the node. 98c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_SET_QLEN Pq Ic set_qlen 9938885006SChristian BruefferThis command takes two parameters that specify the queue number and the maximum 10038885006SChristian Bruefferlength of the queue and sets the maximal length of the queue for the node. 101c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_GET_STAT Pq Ic get_stat 102878ed226SJulian ElischerReturns various statistic information for the node, such as: number of 103878ed226SJulian Elischerbytes (frames) sent, number of bytes (frames) received and number of 104878ed226SJulian Elischerinput (output) errors. 105c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_RESET_STAT Pq Ic reset_stat 106878ed226SJulian ElischerReset all statistic counters to zero. 107878ed226SJulian Elischer.El 108878ed226SJulian Elischer.Sh SHUTDOWN 109878ed226SJulian ElischerThis node shuts down when the corresponding USB device is un-plugged. 110878ed226SJulian Elischer.Sh SEE ALSO 111f2bb1caeSJulian Elischer.Xr netgraph 4 , 11272f00208SRuslan Ermilov.Xr ugen 4 , 11372f00208SRuslan Ermilov.Xr usb 4 , 114878ed226SJulian Elischer.Xr ngctl 8 115878ed226SJulian Elischer.Sh HISTORY 116878ed226SJulian ElischerThe 11772f00208SRuslan Ermilov.Nm ubt 118878ed226SJulian Elischernode type was implemented in 119878ed226SJulian Elischer.Fx 5.0 . 120878ed226SJulian Elischer.Sh AUTHORS 121878ed226SJulian Elischer.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com 1229cbda590SRuslan Ermilov.Sh BUGS 1239cbda590SRuslan ErmilovIsochronous USB transfers are broken. 1249cbda590SRuslan ErmilovThis means that the USB device will not be able to transfer SCO data (voice). 1259cbda590SRuslan ErmilovUSB interrupt transfers are implemented as bulk-in transfers (not really a bug). 126