xref: /netbsd-src/usr.sbin/btdevctl/btdevctl.8 (revision 5bbd2a12505d72a8177929a37b5cee489d0a1cfd)
1.\" $NetBSD: btdevctl.8,v 1.7 2010/10/12 21:49:08 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.Dd October 11, 2010
55.Dt BTDEVCTL 8
56.Os
57.Sh NAME
58.Nm btdevctl
59.Nd Bluetooth remote device control utility
60.Sh SYNOPSIS
61.Nm
62.Op Fl A | Fl D
63.Op Fl qv
64.Op Fl m Ar mode
65.Fl a Ar address
66.Fl d Ar device
67.Fl s Ar service
68.Sh DESCRIPTION
69The
70.Nm
71utility is used to configure bluetooth devices in the system.
72Normally,
73.Nm
74will perform  an SDP query to the remote device as needed, and
75cache the results in the
76.Pa /var/db/btdevctl.plist
77file for later use.
78If neither Attach nor Detach is specified,
79.Nm
80will display the configuration.
81.Pp
82The options are:
83.Bl -tag
84.It Fl A
85Attach device
86.It Fl a Ar address
87Remote device address.
88The
89.Ar address
90may be given as BDADDR or a name.
91If a name was specified,
92.Nm
93attempts to resolve the name via
94.Xr bt_gethostbyname 3 .
95.It Fl D
96Detach device
97.It Fl d Ar device
98Local device address.
99May be given as BDADDR or device name.
100.It Fl m Ar mode
101Connection link mode.
102The following modes are supported:
103.Pp
104.Bl -tag -compact
105.It none
106clear previously set mode.
107.It auth
108require devices be paired, see
109.Xr btpin 1 .
110.It encrypt
111auth, plus enable encryption.
112.It secure
113encryption, plus change of link key.
114.El
115.Pp
116When configuring the HID service,
117.Nm
118will set
119.Sq auth
120by default, or
121.Sq encrypt
122for keyboard devices.
123.It Fl q
124Ignore any cached data and perform a SDP query for the given
125.Ar service .
126.It Fl s Ar service
127Service to configure.
128Known services are:
129.Pp
130.Bl -tag -width HSETXX -compact
131.It Dv HID
132Human Interface Device.
133.It Dv HF
134Handsfree.
135.It Dv HSET
136Headset.
137.El
138.It Fl v
139Be verbose.
140.El
141.Pp
142For device configurations to persist across boots, add entries to the
143.Pa /etc/bluetooth/btdevctl.conf
144file and
145set the
146.Xr rc.conf 5
147variable
148.Sy btdevctl
149to YES.
150.Sh FILES
151.Bl -tag -compact
152.It Pa /etc/bluetooth/btdevctl.conf
153.It Pa /dev/bthub
154.It Pa /var/db/btdevctl.plist
155.El
156.Sh EXIT STATUS
157.Ex -std
158.Sh SEE ALSO
159.Xr btpin 1 ,
160.Xr bthidev 4 ,
161.Xr bthub 4 ,
162.Xr btsco 4 ,
163.Xr rc.conf 5
164.Pp
165See the Bluetooth chapter of
166.Qq The NetBSD Guide
167for detailed examples of configuring keyboards, mice, and audio headsets.
168.Sh HISTORY
169Parts of the
170.Nm
171program originated in the
172.Fx
173.Nm bthidcontrol
174program.
175.Sh AUTHORS
176.An Iain Hibbert
177for Itronix, Inc.
178.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
179