xref: /netbsd-src/usr.sbin/btconfig/btconfig.8 (revision 95c774699bdc773f0c5f8931a07537ebee45cc75)
1.\" $NetBSD: btconfig.8,v 1.19 2021/12/02 21:55:22 andvar 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 October 11, 2010
33.Dt BTCONFIG 8
34.Os
35.Sh NAME
36.Nm btconfig
37.Nd configure bluetooth devices
38.Sh SYNOPSIS
39.Nm
40.Op Fl svz
41.Oo
42.Ar device
43.Op Ar parameters
44.Oc
45.Nm
46.Op Fl l
47.Sh DESCRIPTION
48.Nm
49is used to configure Bluetooth devices.
50If the
51.Ar device
52is given, but no parameters, then
53.Nm
54will print information about the device.
55If no
56.Ar device
57is given, a basic list of devices will be printed.
58.Pp
59When the
60.Fl l
61flag is used, just the device names will be printed.
62.Sh COMMANDS
63The following parameters may be specified with
64.Nm :
65.Bl -tag -width xxxxxxxxxxx
66.It Cm up
67Enable Bluetooth Device.
68.It Cm down
69Disable Bluetooth Device.
70.It Cm pscan
71Enable Page Scan.
72This enables incoming connections to the device.
73.It Cm -pscan
74Disable Page Scan.
75.It Cm iscan
76Enable Inquiry Scan.
77This puts the device in Discoverable mode.
78.It Cm -iscan
79Disable Inquiry Scan.
80.It Cm encrypt
81Enable encryption.
82This will cause the device to request encryption on all baseband
83connections, and will only work if authentication is also enabled.
84.It Cm -encrypt
85Disable encryption.
86.It Cm auth
87Enable authentication.
88This will cause the device to request authentication
89for all baseband connections.
90.It Cm -auth
91Disable authentication.
92.It Cm switch
93Enable Role Switching.
94In a Bluetooth piconet there is one Master and up to seven Slaves, and
95normally the device that initiates a connection will take the Master role.
96Enabling this option allows remote devices to switch connection roles.
97.It Cm -switch
98Disable Role Switching.
99.It Cm master
100Request the Master role when accepting connections.
101.It Cm -master
102Do not request Master role.
103.It Cm hold
104Enable Hold Mode.
105.It Cm -hold
106Disable Hold Mode.
107.It Cm sniff
108Enable Sniff Mode.
109.It Cm -sniff
110Disable Sniff Mode.
111.It Cm park
112Enable Park Mode.
113.It Cm -park
114Disable Park Mode.
115.It Cm name Ar name
116Set human readable name of device.
117.It Cm ptype Ar type
118Set packet types.
119.Ar type
120is a 16 bit hex value specifying packet types that will be requested
121by outgoing ACL connections.
122By default, all packet types that the device supports are enabled,
123see bluetooth specifications for more information if you want to change this.
124.It Cm class Ar class
125Set class of device.
126.Ar class
127is a 6 digit hex value the value of which declares the device capabilities.
128See the
129.Qq Assigned Numbers - Baseband
130document at
131.Lk http://www.bluetooth.com/
132for details of constructing a Class of Device value.
133As a starter, 0x020104 means Desktop Computer, with Networking
134available.
135.It Cm fixed
136Set fixed pin type.
137.It Cm variable
138Set variable pin type.
139.It Cm inquiry
140Perform device Discovery from the specified device and print details.
141.It Cm imode Ar type
142Set inquiry mode type to control which event formats are generated during
143a device inquiry.
144The
145.Ar type
146can be:
147.Bl -tag -width xxxxxx
148.It std
149Standard Inquiry Result Event format.
150.It rssi
151Enable Remote Signal Strength Indicator (RSSI) in inquiry results.
152This will only work if the device features indicate
153.Aq RSSI with inquiry result .
154.It ext
155Inquiry Result with RSSI format or Extended Inquiry Result format.
156This will only work where the device features indicate
157.Aq extended inquiry ,
158and the Extended Inquiry Result will only occur when the remote device
159provides the extended information.
160.El
161.It Cm reset
162Perform a hard reset on the device and re-initialise system state.
163.It Cm voice
164Set Voice Setting.
165[This should be 0x0060 for now]
166.It Cm pto
167Set Page Timeout value.
168This is a decimal value in milliseconds, indicating how long the device
169will attempt to page another device when opening baseband connections.
170.It Cm scomtu
171Change SCO mtu value.
172This is a decimal value, see
173.Xr ubt 4
174for reasons why you may need to do this.
175.El
176.Pp
177All parameters are parsed before any device operations take place.
178Each time the
179.Fl v
180flag is given, verbosity levels will be increased.
181.Pp
182Super-user privileges are required to change device configurations.
183.Sh DIAGNOSTICS
184Messages indicating the specified device does not exist, the
185requested address is unknown, or the user is not privileged and
186tried to alter a device's configuration.
187.Sh SEE ALSO
188.Xr bcsp 4 ,
189.Xr bluetooth 4 ,
190.Xr bt3c 4 ,
191.Xr btbc 4 ,
192.Xr btuart 4 ,
193.Xr sbt 4 ,
194.Xr ubt 4
195.Sh HISTORY
196The
197.Nm
198command was written for
199.Nx 4.0
200by
201.An Iain Hibbert
202under the sponsorship of Itronix, Inc.
203.Sh BUGS
204The output is very messy.
205