xref: /netbsd-src/usr.sbin/btdevctl/btdevctl.8 (revision b1c86f5f087524e68db12794ee9c3e3da1ab17a0)
1.\" $NetBSD: btdevctl.8,v 1.5 2007/12/02 20:59:29 wiz Exp $
2.\"
3.\" Copyright (c) 2006 Itronix Inc.
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.\" 3. The name of Itronix Inc. may not be used to endorse
15.\"    or promote products derived from this software without specific
16.\"    prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
22.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25.\" ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.\" Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com>
31.\" All rights reserved.
32.\"
33.\" Redistribution and use in source and binary forms, with or without
34.\" modification, are permitted provided that the following conditions
35.\" are met:
36.\" 1. Redistributions of source code must retain the above copyright
37.\"    notice, this list of conditions and the following disclaimer.
38.\" 2. Redistributions in binary form must reproduce the above copyright
39.\"    notice, this list of conditions and the following disclaimer in the
40.\"    documentation and/or other materials provided with the distribution.
41.\"
42.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
43.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
45.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
46.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
47.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
48.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
49.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
50.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
51.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
52.\" SUCH DAMAGE.
53.\"
54.\" $Id: btdevctl.8,v 1.5 2007/12/02 20:59:29 wiz Exp $
55.\" $FreeBSD: src/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8,v 1.3 2005/01/18 20:02:30 ru Exp $
56.\"
57.Dd April 10, 2007
58.Dt BTDEVCTL 8
59.Os
60.Sh NAME
61.Nm btdevctl
62.Nd Bluetooth remote device control utility
63.Sh SYNOPSIS
64.Nm
65.Op Fl A | Fl D
66.Op Fl qv
67.Op Fl m Ar mode
68.Fl a Ar address
69.Fl d Ar device
70.Fl s Ar service
71.Sh DESCRIPTION
72The
73.Nm
74utility is used to configure bluetooth devices in the system.
75Normally,
76.Nm
77will perform  an SDP query to the remote device as needed, and
78cache the results in the
79.Pa /var/db/btdevctl.plist
80file for later use.
81If neither Attach nor Detach is specified,
82.Nm
83will display the configuration.
84.Pp
85The options are:
86.Bl -tag
87.It Fl A
88Attach device
89.It Fl a Ar address
90Remote device address.
91The
92.Ar address
93may be given as BDADDR or a name.
94If a name was specified,
95.Nm
96attempts to resolve the name via
97.Xr bt_gethostbyname 3 .
98.It Fl D
99Detach device
100.It Fl d Ar device
101Local device address.
102May be given as BDADDR or device name.
103.It Fl m Ar mode
104Connection link mode.
105The following modes are supported:
106.Pp
107.Bl -tag -compact
108.It none
109clear previously set mode.
110.It auth
111require devices be paired, see
112.Xr btpin 1 .
113.It encrypt
114auth, plus enable encryption.
115.It secure
116encryption, plus change of link key.
117.El
118.Pp
119When configuring the HID service,
120.Nm
121will set
122.Sq auth
123by default, or
124.Sq encrypt
125for keyboard devices.
126.It Fl q
127Ignore any cached data and perform a SDP query for the given
128.Ar service .
129.It Fl s Ar service
130Service to configure.
131Known services are:
132.Pp
133.Bl -tag -width HSETXX -compact
134.It Dv HID
135Human Interface Device.
136.It Dv HF
137Handsfree.
138.It Dv HSET
139Headset.
140.El
141.It Fl v
142Be verbose.
143.El
144.Pp
145For device configurations to persist across boots, add entries to the
146.Pa /etc/bluetooth/btdevctl.conf
147file and
148set the
149.Xr rc.conf 5
150variable
151.Sy btdevctl
152to YES.
153.Sh EXIT STATUS
154.Ex -std
155.Sh FILES
156.Bl -tag -compact
157.It Pa /etc/bluetooth/btdevctl.conf
158.It Pa /dev/bthub
159.It Pa /var/db/btdevctl.plist
160.El
161.Sh SEE ALSO
162.Xr btpin 1 ,
163.Xr bthidev 4 ,
164.Xr bthub 4 ,
165.Xr btsco 4 ,
166.Xr rc.conf 5
167.Sh HISTORY
168Parts of the
169.Nm
170program originated in the
171.Fx
172.Nm bthidcontrol
173program.
174.Sh AUTHORS
175.An Iain Hibbert
176for Itronix, Inc.
177.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
178