1*68a3deedSplunky.\" $NetBSD: btdevctl.8,v 1.12 2015/06/12 09:43:05 plunky Exp $ 2885b13c5Splunky.\" 3885b13c5Splunky.\" Copyright (c) 2006 Itronix Inc. 4885b13c5Splunky.\" All rights reserved. 5885b13c5Splunky.\" 6885b13c5Splunky.\" Redistribution and use in source and binary forms, with or without 7885b13c5Splunky.\" modification, are permitted provided that the following conditions 8885b13c5Splunky.\" are met: 9885b13c5Splunky.\" 1. Redistributions of source code must retain the above copyright 10885b13c5Splunky.\" notice, this list of conditions and the following disclaimer. 11885b13c5Splunky.\" 2. Redistributions in binary form must reproduce the above copyright 12885b13c5Splunky.\" notice, this list of conditions and the following disclaimer in the 13885b13c5Splunky.\" documentation and/or other materials provided with the distribution. 14885b13c5Splunky.\" 3. The name of Itronix Inc. may not be used to endorse 15885b13c5Splunky.\" or promote products derived from this software without specific 16885b13c5Splunky.\" prior written permission. 17885b13c5Splunky.\" 18885b13c5Splunky.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND 19885b13c5Splunky.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20885b13c5Splunky.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21885b13c5Splunky.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY 22885b13c5Splunky.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23885b13c5Splunky.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24885b13c5Splunky.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25885b13c5Splunky.\" ON ANY THEORY OF LIABILITY, WHETHER IN 26885b13c5Splunky.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27885b13c5Splunky.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28885b13c5Splunky.\" POSSIBILITY OF SUCH DAMAGE. 29885b13c5Splunky.\" 30885b13c5Splunky.\" Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> 31885b13c5Splunky.\" All rights reserved. 32885b13c5Splunky.\" 33885b13c5Splunky.\" Redistribution and use in source and binary forms, with or without 34885b13c5Splunky.\" modification, are permitted provided that the following conditions 35885b13c5Splunky.\" are met: 36885b13c5Splunky.\" 1. Redistributions of source code must retain the above copyright 37885b13c5Splunky.\" notice, this list of conditions and the following disclaimer. 38885b13c5Splunky.\" 2. Redistributions in binary form must reproduce the above copyright 39885b13c5Splunky.\" notice, this list of conditions and the following disclaimer in the 40885b13c5Splunky.\" documentation and/or other materials provided with the distribution. 41885b13c5Splunky.\" 42885b13c5Splunky.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 43885b13c5Splunky.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 44885b13c5Splunky.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 45885b13c5Splunky.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 46885b13c5Splunky.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 47885b13c5Splunky.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 48885b13c5Splunky.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 49885b13c5Splunky.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 50885b13c5Splunky.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 51885b13c5Splunky.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 52885b13c5Splunky.\" SUCH DAMAGE. 53885b13c5Splunky.\" 54b504b003Splunky.Dd December 26, 2012 55885b13c5Splunky.Dt BTDEVCTL 8 56885b13c5Splunky.Os 57885b13c5Splunky.Sh NAME 58885b13c5Splunky.Nm btdevctl 59885b13c5Splunky.Nd Bluetooth remote device control utility 60885b13c5Splunky.Sh SYNOPSIS 61885b13c5Splunky.Nm 624f1cbddcSplunky.Op Fl A | Fl D 634f1cbddcSplunky.Op Fl qv 64f5db72e7Splunky.Op Fl m Ar mode 654f1cbddcSplunky.Fl a Ar address 664f1cbddcSplunky.Fl d Ar device 674f1cbddcSplunky.Fl s Ar service 68885b13c5Splunky.Sh DESCRIPTION 69885b13c5SplunkyThe 70885b13c5Splunky.Nm 714f1cbddcSplunkyutility is used to configure bluetooth devices in the system. 724f1cbddcSplunkyNormally, 73885b13c5Splunky.Nm 744f1cbddcSplunkywill perform an SDP query to the remote device as needed, and 754f1cbddcSplunkycache the results in the 764f1cbddcSplunky.Pa /var/db/btdevctl.plist 774f1cbddcSplunkyfile for later use. 784f1cbddcSplunkyIf neither Attach nor Detach is specified, 794f1cbddcSplunky.Nm 804f1cbddcSplunkywill display the configuration. 81885b13c5Splunky.Pp 824f1cbddcSplunkyThe options are: 834f1cbddcSplunky.Bl -tag 844f1cbddcSplunky.It Fl A 854f1cbddcSplunkyAttach device 864f1cbddcSplunky.It Fl a Ar address 874f1cbddcSplunkyRemote device address. 884f1cbddcSplunkyThe 89885b13c5Splunky.Ar address 90885b13c5Splunkymay be given as BDADDR or a name. 91885b13c5SplunkyIf a name was specified, 92885b13c5Splunky.Nm 93885b13c5Splunkyattempts to resolve the name via 94885b13c5Splunky.Xr bt_gethostbyname 3 . 954f1cbddcSplunky.It Fl D 964f1cbddcSplunkyDetach device 974f1cbddcSplunky.It Fl d Ar device 984f1cbddcSplunkyLocal device address. 994f1cbddcSplunkyMay be given as BDADDR or device name. 100f5db72e7Splunky.It Fl m Ar mode 101f5db72e7SplunkyConnection link mode. 102f5db72e7SplunkyThe following modes are supported: 103f5db72e7Splunky.Pp 104b504b003Splunky.Bl -tag -width encrypt -compact 105f5db72e7Splunky.It none 106f5db72e7Splunkyclear previously set mode. 107f5db72e7Splunky.It auth 108f5db72e7Splunkyrequire devices be paired, see 109f5db72e7Splunky.Xr btpin 1 . 110f5db72e7Splunky.It encrypt 111f5db72e7Splunkyauth, plus enable encryption. 112f5db72e7Splunky.It secure 113f5db72e7Splunkyencryption, plus change of link key. 114f5db72e7Splunky.El 115f5db72e7Splunky.Pp 116f5db72e7SplunkyWhen configuring the HID service, 117f5db72e7Splunky.Nm 118f5db72e7Splunkywill set 119f5db72e7Splunky.Sq auth 120f5db72e7Splunkyby default, or 121f5db72e7Splunky.Sq encrypt 122f5db72e7Splunkyfor keyboard devices. 123b504b003SplunkyIf the device cannot handle authentication, then the mode will need 124b504b003Splunkyto be cleared manually. 1254f1cbddcSplunky.It Fl q 1264f1cbddcSplunkyIgnore any cached data and perform a SDP query for the given 1274f1cbddcSplunky.Ar service . 1284f1cbddcSplunky.It Fl s Ar service 1294f1cbddcSplunkyService to configure. 130885b13c5SplunkyKnown services are: 131885b13c5Splunky.Pp 1324f1cbddcSplunky.Bl -tag -width HSETXX -compact 133885b13c5Splunky.It Dv HID 1344f1cbddcSplunkyHuman Interface Device. 1354f1cbddcSplunky.It Dv HF 1364f1cbddcSplunkyHandsfree. 137885b13c5Splunky.It Dv HSET 1384f1cbddcSplunkyHeadset. 1394f1cbddcSplunky.El 1404f1cbddcSplunky.It Fl v 1414f1cbddcSplunkyBe verbose. 142885b13c5Splunky.El 143885b13c5Splunky.Pp 1444f1cbddcSplunkyFor device configurations to persist across boots, add entries to the 1454f1cbddcSplunky.Pa /etc/bluetooth/btdevctl.conf 146*68a3deedSplunkyfile and ensure the 1474f1cbddcSplunky.Xr rc.conf 5 1484f1cbddcSplunkyvariable 149*68a3deedSplunky.Sy bluetooth 150*68a3deedSplunkyis set to YES. 151885b13c5Splunky.Sh FILES 152885b13c5Splunky.Bl -tag -compact 1534f1cbddcSplunky.It Pa /etc/bluetooth/btdevctl.conf 1544f1cbddcSplunky.It Pa /dev/bthub 1554f1cbddcSplunky.It Pa /var/db/btdevctl.plist 156885b13c5Splunky.El 1578a0067feSwiz.Sh EXIT STATUS 1588a0067feSwiz.Ex -std 159885b13c5Splunky.Sh SEE ALSO 160f5db72e7Splunky.Xr btpin 1 , 161885b13c5Splunky.Xr bthidev 4 , 1624f1cbddcSplunky.Xr bthub 4 , 1634f1cbddcSplunky.Xr btsco 4 , 1644f1cbddcSplunky.Xr rc.conf 5 1652cf0f09dSplunky.Pp 1662cf0f09dSplunkySee the Bluetooth chapter of 1672cf0f09dSplunky.Qq The NetBSD Guide 1688a0067feSwizfor detailed examples of configuring keyboards, mice, and audio headsets. 169885b13c5Splunky.Sh HISTORY 170885b13c5SplunkyParts of the 171885b13c5Splunky.Nm 172885b13c5Splunkyprogram originated in the 173885b13c5Splunky.Fx 174885b13c5Splunky.Nm bthidcontrol 175885b13c5Splunkyprogram. 176885b13c5Splunky.Sh AUTHORS 177885b13c5Splunky.An Iain Hibbert 178885b13c5Splunkyfor Itronix, Inc. 179a5684d07Swiz.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com 180