1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
|
.TH "HCID.CONF" "5" "March 2004" "hcid.conf - HCI daemon" "System management commands"
.SH "NAME"
/etc/bluetooth/hcid.conf \- Configuration file for the hcid Bluetooth HCI daemon
.SH "DESCRIPTION"
/etc/bluetooth/hcid.conf contains all the options needed by the Bluetooth Host Controller Interface daemon.
It consists of sections and parameters. A section begins with
the name of the section followed by optional specifiers and the
parameters inside curly brackets. Sections contain parameters of
the form:
.TP
\fIname\fP \fIvalue1\fP, \fIvalue2\fP ... ;
.PP
Any character after a hash ('#') character is ignored until newline.
Whitespace is also ignored.
The valid section names for
.B hcid.conf
are, at the moment:
.TP
.B options
contains generic options for hcid and the pairing policy.
.TP
.B device
contains lower\-level options for the hci devices connected to the computer.
.SH "OPTIONS SECTION"
The following parameters may be present in an option section:
.TP
\fBautoinit\fP yes|no
Automatically initialize newly connected devices. The default is \fIno\fP.
.TP
\fBpairing\fP none|multi|once
\fInone\fP means that pairing is disabled. \fImulti\fP allows pairing
with already paired devices. \fIonce\fP allows pairing once and denies
successive attempts. The default hcid configuration is shipped with \fBmulti\fP
enabled
.TP
\fBpasskey\fP "\fIpin\fP"
The default PIN for incoming connections if \fBsecurity\fP has been
set to \fIauto\fP.
.TP
\fBsecurity\fP none|auto|user
\fInone\fP means the security manager is disabled. \fIauto\fP uses
local PIN, by default from pin_code, for incoming
connections. \fIuser\fP always asks the user for a PIN.
.SH "DEVICE SECTION"
Parameters within a device section with no specifier, the default
device section, will be applied to all devices and device sections
where these are unspecified. The following optional device specifiers
are supported:
.TP
\fInn\fP\fB:\fP\fInn\fP\fB:\fP\fInn\fP\fB:\fP\fInn\fP\fB:\fP\fInn\fP\fB:\fP\fInn\fP
Parameters specified within this section will be applied to the device
with this \fIdevice bluetooth address\fP. All other parameters are applied from
the default section.
.TP
\fBhci\fIn\fP
Parameters specified within this section will be applied to the device
with this \fIdevice interface\fP, unless that device is matched by a
\fIdevice address\fP section. All other parameters are applied from
the default section.
.PP
\fBNote\fP: Most of the options supported in the \fBdevice\fP section are described to some extent in the bluetooth specification version 1.2 Vol2, Part E section 6. Please refer to it for technical details.
.PP
The following parameters may be present in a device section:
.TP
\fBname\fP "\fIname\fP"
The device name. \fI%d\fP inserts the device id. \fI%h\fP inserts
the host name.
.TP
\fBauth\fP enable|disable
Enables or disables authentication between local and remote devices when they connect.
Authentication is done following a challenge\-response mechanism described in the Bluetooth Specification 1.2 volume 2 part C section 4.2, and uses the link key generated during pairing as the shared secret.
Activating this option sets the local device into Bluetooth security mode 3.
.TP
\fBencrypt\fP enable|disable
Enable or disable link encryption. Should be set to enable in most cases, unless one of the devices does not support encryption for some reason.
Encryption can only occur on authenticated connections, as a shared secret key is necessary for encryption to work. The detailed encryption mechanism is described in the bluetooth specification as mentioned above.
.TP
\fBclass\fP 0x\fISSDDdd\fP (three bytes)
The Bluetooth Device Class is described in the Bluetooth Specification section 1.2 ("Assigned Numbers \- Bluetooth Baseband").
The default shipped with hcid is 0x000100 which simply stands for "Computer".
The Bluetooth device class is a high\-level description of the bluetooth device, composed of three bytes: the "Major Service Class" (byte "SS" above), the "Major Device Class" (byte "DD" above) and the "Minor Device Class" (byte "dd" above). These classes describe the high\-level capabilities of the device, such as "Networking Device", "Computer", etc. This information is often used by clients who are looking for a certain type of service around them.
Where it becomes tricky is that another type of mechanism for service discovery exists: "SDP", as in "Service Discovery Protocol".
In practice, most Bluetooth clients scan their surroundings in two successive steps: they first look for all bluetooth devices around them and find out their "class". You can do this on Linux with the \fBhcitool scan\fP command. Then, they use SDP in order to check if a device in a given class offers the type of service that they want.
This means that the hcid.conf "class" parameter needs to be set up properly if particular services are running on the host, such as "PAN", or "OBEX Obect Push", etc: in general a device looking for a service such as "Network Access Point" will only scan for this service on devices containing "Networking" in their major service class.
.IP
Major service class byte allocation (from LSB to MSB):
Bit 1: Positioning (Location identification)
Bit 2: Networking (LAN, Ad hoc, ...)
Bit 3: Rendering (Printing, Speaker, ...)
Bit 4: Capturing (Scanner, Microphone, ...)
Bit 5: Object Transfer (v\-Inbox, v\-Folder, ...)
Bit 6: Audio (Speaker, Microphone, Headset service, ...)
Bit 7: Telephony (Cordless telephony, Modem, Headset service, ...)
Bit 8: Information (WEB\-server, WAP\-server, ...)
.IP
Example: class 0x02hhhh : the device offers networking service
.IP
Major device class allocation:
0x00: Miscellaneous
0x01: Computer (desktop,notebook, PDA, organizers, .... )
0x02: Phone (cellular, cordless, payphone, modem, ...)
0x03: LAN /Network Access point
0x04: Audio/Video (headset,speaker,stereo, video display, vcr.....
0x05: Peripheral (mouse, joystick, keyboards, ..... )
0x06: Imaging (printing, scanner, camera, display, ...)
Other values are not defined (refer to the Bluetooth specification for more details
.IP
Minor device class allocation: the meaning of this byte depends on the major class allocation, please refer to the Bluetooth specifications for more details).
.IP
.B Example:
if PAND runs on your server, you need to set up at least \fBclass 0x020100\fP, which stands for "Service Class: Networking" and "Device Class: Computer, Uncategorized".
.TP
\fBiscan\fP enable|disable
.TP
\fBpscan\fP enable|disable
Bluetooth devices discover and connect to each other through the use of two special Bluetooth channels, the Inquiry and Page channels (described in the Bluetooth Spec Volume 1, Part A, Section 3.3.3, page 35). These two options enable the channels on the bluetooth device.
\fBiscan enable\fP: makes the bluetooth device "discoverable" by enabling it to answer "inquiries" from other nearby bluetooth devices.
\fBpscan enable\fP: makes the bluetooth device "connectable to" by enabling the use of the "page scan" channel.
.TP
\fBlm\fP none|accept,master
\fInone\fP means no specific policy. \fIaccept\fP means always accept
incoming connections. \fImaster\fP means become master on incoming
connections and deny role switch on outgoing connections.
.TP
\fBlp\fP none|rswitch,hold,sniff,park
\fInone\fP means no specific policy. \fIrswitch\fP means allow role
switch. \fIhold\fP means allow hold mode. \fIsniff\fP means allow
sniff mode. \fIpark\fP means allow park mode. Several options can be
combined.
This option determines the various operational modes that are allowed for this device when it participates to a piconet. Normally hold and sniff should be enabled for standard operations.
hold: this mode is related to synchronous communications (SCO voice channel for example).
sniff: when in this mode, a device is only present on the piconet during determined slots of time, allowing it to do other things when it is "absent", for example to scan for other bluetooth devices.
park: this is a mode where the device is put on standby on the piconet, for power\-saving purposes for example.
rswitch: this is a mode that enables role\-switch (master <\-> slave) between two devices in a piconet. It is not clear whether this needs to be enabled in order to make the "lm master" setting work properly or not.
.TP
\fBpkt_type\fP DH1,DM1,HV1, etc.
This fairly obscure option determines the packet types that the bluetooth device will send or accept. This is a very low\-level option that should probably not be changed for normal use. You do not need to specify defaults.
You can check the Bluetooth specification version 1.2 Volume 2, Part B section 6 for more details about this.
.SH "FILES"
.TP
.I /etc/bluetooth/hcid.conf
Default location of the global configuration file.
.SH "AUTHOR"
This manual page was written by Edouard Lafargue, Fredrik Noring and Maxim Krasnyansky.
|