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 $ 2672f00208SRuslan Ermilov.\" 2770a0e340SGleb Smirnoff.Dd December 26, 2012 28878ed226SJulian Elischer.Dt NG_UBT 4 29878ed226SJulian Elischer.Os 30878ed226SJulian Elischer.Sh NAME 3172f00208SRuslan Ermilov.Nm ng_ubt 32878ed226SJulian Elischer.Nd Netgraph node type that is also a driver for Bluetooth USB devices 33878ed226SJulian Elischer.Sh SYNOPSIS 34878ed226SJulian Elischer.In sys/types.h 353a08bb88SMaksim Yevmenkin.In netgraph/bluetooth/include/ng_ubt.h 36878ed226SJulian Elischer.Sh DESCRIPTION 37878ed226SJulian ElischerThe 3872f00208SRuslan Ermilov.Nm ubt 39878ed226SJulian Elischernode type is both a persistent Netgraph node type and a driver for 4072f00208SRuslan ErmilovBluetooth USB devices. 4172f00208SRuslan ErmilovIt implements a Bluetooth USB transport layer 4272f00208SRuslan Ermilovas per chapter H2 of the Bluetooth Specification Book v1.1. 4338885006SChristian BruefferA new node is created when a supported USB device is plugged in. 44878ed226SJulian Elischer.Pp 45878ed226SJulian ElischerThe node has a single hook called 46878ed226SJulian Elischer.Dv hook . 47878ed226SJulian ElischerIncoming bytes received on the device are re-assembled into HCI frames 4872f00208SRuslan Ermilov(according to the length). 4972f00208SRuslan ErmilovFull HCI frames are sent out on the hook. 5038885006SChristian BruefferThe node will add a HCI frame indicator if the device did not send it. 5172f00208SRuslan ErmilovHCI frames received on 52878ed226SJulian Elischer.Dv hook 5372f00208SRuslan Ermilovare transmitted out. 5438885006SChristian BruefferThe node will drop the HCI frame indicator unless the device 55878ed226SJulian Elischerrequires it to be present. 5638885006SChristian Brueffer.Sh HARDWARE 5738885006SChristian BruefferThe 5838885006SChristian Brueffer.Nm 5929394b9bSChristian Bruefferdriver supports all Bluetooth USB devices that conform with 607daf8ae6SChristian Bruefferthe Bluetooth specification v1.1, including: 6138885006SChristian Brueffer.Pp 6238885006SChristian Brueffer.Bl -bullet -compact 6338885006SChristian Brueffer.It 6438885006SChristian Brueffer3Com 3CREB96 6538885006SChristian Brueffer.It 6638885006SChristian BruefferAIPTEK BR0R02 6738885006SChristian Brueffer.It 6838885006SChristian BruefferEPoX BT-DG02 6938885006SChristian Brueffer.It 7038885006SChristian BruefferMitsumi Bluetooth USB adapter 7138885006SChristian Brueffer.It 7238885006SChristian BruefferMSI MS-6967 7338885006SChristian Brueffer.It 7438885006SChristian BruefferTDK Bluetooth USB adapter 7570a0e340SGleb Smirnoff.It 7670a0e340SGleb SmirnoffBroadcom Bluetooth USB adapter 7738885006SChristian Brueffer.El 78878ed226SJulian Elischer.Sh HOOKS 79878ed226SJulian ElischerThis node type supports the following hooks: 80c60bda17SJoel Dahl.Bl -tag -width ".Va hook" 81c60bda17SJoel Dahl.It Va hook 8238885006SChristian Brueffersingle HCI frame contained in a single 8372f00208SRuslan Ermilov.Vt mbuf 84878ed226SJulian Elischerstructure. 85878ed226SJulian Elischer.El 86878ed226SJulian Elischer.Sh CONTROL MESSAGES 87878ed226SJulian ElischerThis node type supports the generic control messages, plus the following: 8872f00208SRuslan Ermilov.Bl -tag -width indent 89c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_GET_DEBUG Pq Ic get_debug 90878ed226SJulian ElischerReturns an integer containing the current debug level for the node. 91c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_SET_DEBUG Pq Ic set_debug 9238885006SChristian BruefferThis command takes an integer argument and sets the current debug level 93878ed226SJulian Elischerfor the node. 94c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_GET_QLEN Pq Ic get_qlen 9538885006SChristian BruefferThis command takes a parameter that specifies the queue number and returns 9638885006SChristian Bruefferthe current maximal length of the queue for the node. 97c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_SET_QLEN Pq Ic set_qlen 9838885006SChristian BruefferThis command takes two parameters that specify the queue number and the maximum 9938885006SChristian Bruefferlength of the queue and sets the maximal length of the queue for the node. 100c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_GET_STAT Pq Ic get_stat 101878ed226SJulian ElischerReturns various statistic information for the node, such as: number of 102878ed226SJulian Elischerbytes (frames) sent, number of bytes (frames) received and number of 103878ed226SJulian Elischerinput (output) errors. 104c60bda17SJoel Dahl.It Dv NGM_UBT_NODE_RESET_STAT Pq Ic reset_stat 105878ed226SJulian ElischerReset all statistic counters to zero. 106878ed226SJulian Elischer.El 107878ed226SJulian Elischer.Sh SHUTDOWN 108878ed226SJulian ElischerThis node shuts down when the corresponding USB device is un-plugged. 109878ed226SJulian Elischer.Sh SEE ALSO 110f2bb1caeSJulian Elischer.Xr netgraph 4 , 11172f00208SRuslan Ermilov.Xr ugen 4 , 11272f00208SRuslan Ermilov.Xr usb 4 , 113878ed226SJulian Elischer.Xr ngctl 8 114878ed226SJulian Elischer.Sh HISTORY 115878ed226SJulian ElischerThe 11672f00208SRuslan Ermilov.Nm ubt 117878ed226SJulian Elischernode type was implemented in 118878ed226SJulian Elischer.Fx 5.0 . 119878ed226SJulian Elischer.Sh AUTHORS 120*6c899950SBaptiste Daroussin.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com 1219cbda590SRuslan Ermilov.Sh BUGS 1229cbda590SRuslan ErmilovIsochronous USB transfers are broken. 1239cbda590SRuslan ErmilovThis means that the USB device will not be able to transfer SCO data (voice). 1249cbda590SRuslan ErmilovUSB interrupt transfers are implemented as bulk-in transfers (not really a bug). 125