1 .\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
25 .\" $Id: hcsecd.8,v 1.8 2003/09/08 18:54:20 max Exp $
33 .Nd control link keys and PIN codes for Bluetooth devices
41 daemon controls link keys and PIN codes for Bluetooth devices.
42 It opens a raw HCI socket and listens for
43 .Dv Link_Key_Request ,
46 .Dv Link_Key_Notification
53 HCI event is received, the daemon scans the configuration file for a
55 The remote device BD_ADDR is used as a key.
56 If no matching entry was found, the default entry will be used.
57 If no default entry was found then it is assumed that no link key and no
59 For any given entry, the link key takes precedence over the PIN code.
60 If a link key was not specified, the device must generate the link key from
62 If an entry was found and the link key (or PIN code) exists, the
63 .Dv Link_Key_Request_Reply
65 .Dv PIN_Code_Request_Reply )
66 command will be sent back to the device.
68 .Dv Link_Key_Request_Negative_Reply
70 .Dv PIN_Code_Request_Negative_Reply )
71 command will be sent back to the device.
75 daemon also handles HCI
76 .Dv Link_Key_Notification
77 events and caches link keys created from the PIN codes in memory.
78 To preserve link keys between restarts the
80 daemon dumps link keys for all entries in the
81 .Pa /var/db/hcsecd.keys
83 If it exists, the link keys file gets processed by the
85 daemon after it processes its main configuration file.
86 The link keys file gets written every time the
88 daemon shuts down gracefully.
89 It is possible to force the
91 daemon to re-read its main configuration file and dump the link keys file by
97 The user is expected to not modify the link keys file by hand.
99 The command line options are as follows:
100 .Bl -tag -width indent
102 Do not detach from the controlling terminal.
103 .It Fl f Ar configfile
104 Specify the name of the configuration file.
106 .Pa /etc/bluetooth/hcsecd.conf .
108 Display usage message and exit.
111 .Bl -tag -width ".Pa /etc/bluetooth/hcsecd.conf" -compact
112 .It Pa /etc/bluetooth/hcsecd.conf
113 .It Pa /var/db/hcsecd.keys
114 .It Pa /var/run/hcsecd.pid
123 .An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
125 Currently there is no way to select the link key or the PIN code based on
126 which local device received the request.
127 Everything is based on the remote device BD_ADDR.
128 An interface for external helpers to obtain link keys and PIN codes is missing.