HCSECD(8) BSD System Manager's Manual HCSECD(8)
hcsecd -- control link keys and PIN codes for Bluetooth devices
hcsecd [-dh] -f configfile
The hcsecd daemon controls link keys and PIN codes for Bluetooth devices.
It opens raw HCI socket and listens for the Link_Key_Request,
PIN_Code_Request and Link_Key_Notification HCI events.
Once Link_Key_Request or PIN_Code_Request HCI event is received, the dae-
mon will scan configuration file for matching entry. The remote device
BD_ADDR is used as a key. If no matching entry was found, the default
entry will be used. If no default entry was found then it is assumed
that no link key and no PIN code exists. For any given entry, link key
takes precedence over PIN code. If link key was not specified, it means
device must generate link key from PIN code. If entry was found and the
link key (or PIN code) exists then the Link_Key_Request_Reply (or
PIN_Code_Request_Reply) command will be sent back to the device. Other-
wise, the Link_Key_Request_Negative_Reply (or
PIN_Code_Request_Negative_Reply) command will be sent back to the device.
The hcsecd daemon also handles HCI Link_Key_Notification event and caches
link keys created from the PIN codes in the memory. To preserve link
keys between restarts the hcsecd daemon dumps link keys for all entries
in the /var/db/hcsecd.keys link keys file. If exists, the link keys file
gets processed by hcsecd daemon after it processes its main configuration
file. The link keys file gets written every time hcsecd daemon is grace-
fully shutdown. It is possible to force hcsecd daemon to re-read its
main configuration file and dump link keys file by sending HUP signal to
the hcsecd process. User is not expected to modify link keys file by
The command line options are as follows:
-d Do not detach from the controlling terminal.
Specify name of the configuration file. The default is
-h Display usage message and exit.
Currently there is no way to select link key or PIN code based on which
local device received the request. Everything is based on remote device
BD_ADDR. Also might implement interface for external helpers to obtain
link keys and PIN codes.
ng_btsocket(4), ng_hci(4), hcsecd.conf(5), hccontrol(8), hcseriald(8)
Maksim Yevmenkin <m_evmenkinATyahoo.com>
BSD November 16, 2002 BSD