xref: /freebsd/share/man/man5/bluetooth.device.conf.5 (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1.\" Copyright (c) 2005 Maksim Yevmenkin <m_evmenkin@yahoo.com>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd September 29, 2021
26.Dt BLUETOOTH.DEVICE.CONF 5
27.Os
28.Sh NAME
29.Nm bluetooth.device.conf
30.Nd Bluetooth device configuration file
31.Sh DESCRIPTION
32Bluetooth device configuration framework provides ability to adjust certain
33Bluetooth device parameters on per-device basis.
34.Pp
35Bluetooth device configuration files are plain text files that should conform
36to basic
37.Xr sh 1
38syntax.
39Even though Bluetooth device are not exactly shell scripts,
40they are parsed and passed through shell
41.Ic eval
42command.
43This makes it possible to use various shell tricks in the Bluetooth device
44configuration files.
45.Pp
46The
47.Pa /etc/rc.d/bluetooth
48script is used to start and stop Bluetooth devices.
49This script is not executed by default when system boots.
50It is called by
51.Xr devd 8
52in response to Bluetooth device arrival and departure events.
53It is possible to execute this script by hand if required.
54The script accepts Bluetooth device driver name as an extra parameter.
55.Pp
56The system wide Bluetooth device configuration file is called
57.Pa /etc/defaults/\:bluetooth.device.conf .
58Configuration parameters set in the system wide Bluetooth device configuration
59file apply to every Bluetooth device connected to the system.
60.Pp
61Configuration parameters overrides for the specific Bluetooth device
62should be placed in the
63.Pa /etc/bluetooth/ Ns Ar DEVICE_DRIVER_NAME Ns Pa .conf
64file.
65Where
66.Ar DEVICE_DRIVER_NAME
67is the device driver name of the Bluetooth device.
68.Pp
69The following list provides a name and short description for each
70variable that can be set in a Bluetooth device configuration file.
71.Bl -tag -width indent-two
72.It Va authentication_enable
73.Pq Vt bool
74The
75.Va authentication_enable
76parameter controls if the device requires to authenticate the remote device
77at connection setup.
78If set to
79.Dq Li YES ,
80the device will try to authenticate the other device at connection setup.
81Bluetooth authentication requests are handled by
82.Xr hcsecd 8
83daemon.
84.It Va class
85.Pq Vt str
86The
87.Va class
88parameter is used to indicate the capabilities of the device to
89other devices.
90For more details see
91.Dq Assigned Numbers - Bluetooth Baseband
92document.
93.It Va connectable
94.Pq Vt bool
95The
96.Va connectable
97parameter controls whether or not the device should periodically scan for
98page attempts from other devices.
99If set to
100.Dq Li YES ,
101the device will periodically scan for page attempts from other devices.
102.It Va discoverable
103.Pq Vt bool
104The
105.Va discoverable
106parameter controls whether or not the device should periodically scan for
107inquiry requests from other devices.
108If set to
109.Dq Li YES ,
110the device will periodically scan for inquiry requests from other devices.
111.It Va encryption_mode
112.Pq Vt str
113The
114.Va encryption_mode
115parameter controls if the device requires encryption to the remote device
116at connection setup.
117At connection setup, only the devices with the
118.Va authentication_enable
119parameter enabled and
120.Va encryption_mode
121parameter enabled will try to encrypt the connection to the other device.
122Possible values are
123.Dq Li NONE
124encryption disabled,
125.Dq Li P2P
126encryption for only point-to-point packets,
127or
128.Dq Li ALL
129encryption for both point-to-point and broadcast packets.
130.It Va hci_debug_level
131.Pq Vt int
132HCI node debug level.
133Higher values mean more verbose output.
134.It Va l2cap_debug_level
135.Pq Vt int
136L2CAP node debug level.
137Higher values mean more verbose output.
138.It Va local_name
139.Pq Vt str
140The
141.Va local_name
142parameter provides the ability to modify the user friendly name for the device.
143.It Va role_switch
144.Pq Vt bool
145The
146.Va role_switch
147parameter controls whether the local device should perform role switch.
148By default, if role switch is supported, the local device will try to perform
149role switch and become Master on incoming connection.
150Some devices do not support role switch and thus incoming connections from
151such devices will fail.
152If
153.Va role switch
154is disabled then accepting device will remain Slave.
155.El
156.Sh FILES
157.Bl -tag -width ".Pa /etc/defaults/bluetooth.device.conf" -compact
158.It Pa /etc/defaults/bluetooth.device.conf
159.It Pa /etc/rc.d/bluetooth
160.El
161.Sh EXAMPLES
162The
163.Pa /etc/bluetooth/ubt0.conf
164file should be used to specify configuration parameters overrides for the
165first USB Bluetooth device
166(device driver name is
167.Li ubt0 ) .
168.Pp
169The
170.Pa /etc/bluetooth/ubt1.conf
171file should be used to specify configuration parameters overrides for the
172second USB Bluetooth device.
173.Sh SEE ALSO
174.Xr ng_hci 4 ,
175.Xr ng_l2cap 4 ,
176.Xr ng_ubt 4 ,
177.Xr devd 8 ,
178.Xr hccontrol 8 ,
179.Xr hcsecd 8 ,
180.Xr l2control 8
181.Sh AUTHORS
182.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com
183