bthub.4 revision 1.1
$NetBSD: bthub.4,v 1.1 2006/06/19 15:44:36 gdamore Exp $

Copyright (c) 2006 Itronix Inc.
All rights reserved.

Written by Iain Hibbert for Itronix Inc.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of Itronix Inc. may not be used to endorse
or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

.Dd April 3, 2006 .Dt BTHUB 4 .Os .Sh NAME .Nm bthub .Nd Bluetooth Remote Device hub .Sh SYNOPSIS .Cd "pseudo-device bthub"

p .Cd "bthidev* at bthub?" .Sh DESCRIPTION The .Nm pseudo-device is used to attach remote Bluetooth devices to the system and lays atop the Bluetooth protocol stack, see .Xr bluetooth 4 . .Sh CONFIGURATION Normally, Bluetooth Remote Devices will be configured using the .Xr btcontrol 8 program, which uses the following .Xr ioctl 2 calls made on the .Nm control file

a /dev/bthubctl .

p l -tag -width XX -compact t Cm BTDEV_ATTACH Attach Bluetooth Device. This takes as argument the following structure: d -literal -offset #include <dev/bluetooth/btdev.h> struct btdev_attach_args { bdaddr_t bd_laddr; /* local address */ bdaddr_t bd_raddr; /* remote address */ uint16_t bd_type; /* device type */ union { struct { /* HID arguments */ uint16_t bthid_flags;/* hid flags */ uint16_t bthid_ctl; /* control PSM */ uint16_t bthid_int; /* interrupt PSM */ void *bthid_desc; /* HID descriptor */ uint16_t bthid_dlen; /* descriptor length */ } bdd_hid; struct { } bdd_hset; } bdd; }; #define bd_hid bdd.bdd_hid /* btdev type */ #define BTDEV_HID 0x0001 #define BTDEV_HSET 0x0002 /* bthid flags */ #define BTHID_INITIATE (1 << 0) /* normally initiate */ #define BTHID_CONNECT (1 << 1) /* initiate connect */ .Ed

p t Cm BTHID_DETACH Detach Bluetooth Device. This takes as argument the Bluetooth device address .Ar bdaddr_t matching the device to be detached.

p .El .Sh FILES l -tag -compact t Pa /dev/bthubctl .El .Sh SEE ALSO .Xr bluetooth 4 , .Xr btcontrol 8 , .Xr bthidev 4 , .Xr bthset 4 .Sh HISTORY The .Nm driver was written by .An Iain Hibbert under the sponsorship of Itronix, Inc. and first appeared in .Nx 4.0 .