1.\" $NetBSD: btattach.8,v 1.10 2017/08/13 18:34:03 wiz Exp $ 2.\" 3.\" Copyright (c) 2007 KIYOHARA Takashi 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 ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 19.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 23.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 24.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25.\" POSSIBILITY OF SUCH DAMAGE. 26.\" 27.Dd August 11, 2017 28.Dt BTATTACH 8 29.Os 30.Sh NAME 31.Nm btattach 32.Nd attach serial lines as Bluetooth HCI interfaces 33.Sh SYNOPSIS 34.Nm 35.Op Fl dFfoPp 36.Op Fl i Ar speed 37.Op Ar type 38.Ar tty 39.Ar speed 40.Nm 41.Fl t 42.Op Fl dFfoPp 43.Ar tty 44.Sh DESCRIPTION 45.Nm 46is used to assign a 47.Ar tty 48line to a Bluetooth Host Controller Interface using the 49.Xr btuart 4 50or 51.Xr bcsp 4 52line disciplines, and can optionally initialize the line for a 53given device 54.Ar type 55before activating the line discipline. 56.Pp 57Supported types are: 58.Bl -tag -compact -width 15n -offset indent 59.It Cm bcm2035 60Broadcom BCM2035 61.It Cm bcm43xx 62Broadcom BCM43xx 63.It Cm bcm43xx-3wire 64Broadcom BCM43xx (3-wire) 65.It Cm bcsp 66Generic BCSP (BlueCore Serial Protocol) 67.It Cm bgb2xx 68Philips BGB2xx module 69.It Cm btuart 70Generic UART (this is the default) 71.It Cm csr 72Cambridge Silicon Radio Casira serial adapter, or 73Brainboxes serial dongle (BL642) 74.It Cm ericsson 75Ericsson based modules 76.It Cm digi 77Digianswer based cards 78.It Cm st 79ST Microelectronics minikits based on STLC2410/STLC2415 80.It Cm stlc2500 81ST Microelectronics minikits based on STLC2500 82.It Cm swave 83Silicon Wave kits 84.It Cm texas 85Texas Instruments modules 86.It Cm unistone 87Infineon UniStone (PBA31308) modules 88.El 89.Pp 90When the line discipline is activated, 91.Nm 92detaches and sleeps until it receives a 93.Dv SIGHUP . 94.Pp 95The command line options are as follows: 96.Bl -tag -width ".Fl i Ar speed" 97.It Fl d 98debug mode. 99print initialization IO and do not detach. 100.It Fl F 101Disable flow control. 102.It Fl f 103Enable flow control. 104.It Fl i Ar speed 105Specify an alternate 106.Ar speed 107for the Bluetooth module to use during the initialization phase. 108.It Fl o 109Enable odd parity. 110.It Fl P 111Disable parity. 112.It Fl p 113Enable parity (even parity). 114.It Fl t 115Test mode. 116.El 117.Pp 118Only the super-user may attach a Bluetooth HCI interface. 119.Pp 120Test mode tries to guess the speed using the received link-establish 121packet from HCI, or 122.Xr btuart 4 , 123if there is no response. 124.Sh FILES 125.Bl -tag -compact -width 20n 126.It Pa /var/run/btattach- Ns Bro tty Brc Ns .pid 127.El 128.Sh SEE ALSO 129.Xr bcsp 4 , 130.Xr bluetooth 4 , 131.Xr btuart 4 , 132.Xr btconfig 8 133.Sh HISTORY 134The 135.Nm 136program was written with reference to 137.Nm hciattach 138as provided with the BlueZ tools for Linux and first appeared in 139.Nx 5.0 . 140.Sh AUTHORS 141.An KIYOHARA Takashi Aq Mt kiyohara@kk.iij4u.or.jp 142.An Iain Hibbert 143.Sh BUGS 144Not all 145.Ar type 146initializations have been tested. 147