1.\" $NetBSD: bthub.4,v 1.1 2006/06/19 15:44:36 gdamore Exp $ 2.\" 3.\" Copyright (c) 2006 Itronix Inc. 4.\" All rights reserved. 5.\" 6.\" Written by Iain Hibbert for Itronix Inc. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. The name of Itronix Inc. may not be used to endorse 17.\" or promote products derived from this software without specific 18.\" prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY 24.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27.\" ON ANY THEORY OF LIABILITY, WHETHER IN 28.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30.\" POSSIBILITY OF SUCH DAMAGE. 31.\" 32.Dd April 3, 2006 33.Dt BTHUB 4 34.Os 35.Sh NAME 36.Nm bthub 37.Nd Bluetooth Remote Device hub 38.Sh SYNOPSIS 39.Cd "pseudo-device bthub" 40.Pp 41.Cd "bthidev* at bthub?" 42.Sh DESCRIPTION 43The 44.Nm 45pseudo-device is used to attach remote Bluetooth devices to the system 46and lays atop the Bluetooth protocol stack, see 47.Xr bluetooth 4 . 48.Sh CONFIGURATION 49Normally, Bluetooth Remote Devices will be configured using the 50.Xr btcontrol 8 51program, which uses the following 52.Xr ioctl 2 53calls made on the 54.Nm 55control file 56.Pa /dev/bthubctl . 57.Pp 58.Bl -tag -width XX -compact 59.It Cm BTDEV_ATTACH 60Attach Bluetooth Device. This takes as argument the following 61structure: 62.Bd -literal -offset 63#include <dev/bluetooth/btdev.h> 64 65struct btdev_attach_args { 66 bdaddr_t bd_laddr; /* local address */ 67 bdaddr_t bd_raddr; /* remote address */ 68 uint16_t bd_type; /* device type */ 69 70 union { 71 struct { /* HID arguments */ 72 uint16_t bthid_flags;/* hid flags */ 73 uint16_t bthid_ctl; /* control PSM */ 74 uint16_t bthid_int; /* interrupt PSM */ 75 void *bthid_desc; /* HID descriptor */ 76 uint16_t bthid_dlen; /* descriptor length */ 77 } bdd_hid; 78 struct { 79 } bdd_hset; 80 } bdd; 81}; 82 83#define bd_hid bdd.bdd_hid 84 85/* btdev type */ 86#define BTDEV_HID 0x0001 87#define BTDEV_HSET 0x0002 88 89/* bthid flags */ 90#define BTHID_INITIATE (1 << 0) /* normally initiate */ 91#define BTHID_CONNECT (1 << 1) /* initiate connect */ 92.Ed 93.Pp 94.It Cm BTHID_DETACH 95Detach Bluetooth Device. This takes as argument the Bluetooth device address 96.Ar bdaddr_t 97matching the device to be detached. 98.Pp 99.El 100.Sh FILES 101.Bl -tag -compact 102.It Pa /dev/bthubctl 103.El 104.Sh SEE ALSO 105.Xr bluetooth 4 , 106.Xr btcontrol 8 , 107.Xr bthidev 4 , 108.Xr bthset 4 109.Sh HISTORY 110The 111.Nm 112driver was written by 113.An Iain Hibbert 114under the sponsorship of Itronix, Inc. and first appeared in 115.Nx 4.0 . 116