1.\" Copyright (c) 2001-2002 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.\" $Id: hcsecd.8,v 1.3 2003/04/27 19:45:32 max Exp $ 26.\" $FreeBSD$ 27.\" 28.Dd November 16, 2002 29.Dt HCSECD 8 30.Os 31.Sh NAME 32.Nm hcsecd 33.Nd control link keys and PIN codes for Bluetooth devices 34.Sh SYNOPSIS 35.Nm 36.Op Fl dh 37.Fl f Ar configfile 38.Sh DESCRIPTION 39The 40.Nm 41daemon controls link keys and PIN code for Bluetooth devices. 42It opens raw HCI socket and listens for the 43.Dv Link_Key_Request 44and 45.Dv PIN_Code_Request 46HCI events. 47Once appropriate HCI event has been received, the daemon will 48scan configuration file for matching entry. 49The remove device BD_ADDR is used as a key. 50If no matching entry was found, the default entry will be used. 51If no default entry was found then it is assumed that no link key and no PIN code 52exist. 53For any given entry, link key takes precedence over PIN code. 54If link key was not specified, it means device must generate link key from 55PIN code. 56If entry was found and has the link key (or PIN code) then the 57.Dv Link_Key_Request_Reply 58(or 59.Dv PIN_Code_Request_Reply ) 60command will be sent back to the device. 61Otherwise, the 62.Dv Link_Key_Request_Negative_Reply 63(or 64.Dv PIN_Code_Request_Negative_Reply ) 65command will be sent back to the device. 66.Pp 67The 68.Nm 69daemon currently does not handle HCI 70.Dv Link_Key_Notification 71event and does not cache link keys created from the PIN codes. 72It means that the link key only exists while connection is opened. 73After the connection has been terminated, the user will have to enter PIN code 74again. 75.Pp 76The command line options are as follows: 77.Bl -tag -width indent 78.It Fl d 79Do not detach from the controlling terminal. 80.It Fl f Ar configfile 81Specify name of the configuration file. 82The default is 83.Pa /usr/local/etc/hcsecd.conf . 84.It Fl h 85Display usage message and exit. 86.El 87.Sh BUGS 88Currently there is no way to select link key or PIN code based on which local 89device received the request. 90Everything is based on remote device BD_ADDR. 91Also might implement interface for external helpers to obtain link keys and 92PIN codes. 93.Sh FILES 94.Bl -tag -width ".Pa /usr/local/etc/hcsecd.conf" -compact 95.It Pa /usr/local/etc/hcsecd.conf 96.It Pa /var/run/hcsecd.pid 97.El 98.Sh SEE ALSO 99.Xr netgraph 3 , 100.Xr netgraph 4 , 101.Xr ng_btsocket 4 , 102.Xr ng_hci 4 , 103.Xr hccontrol 8 , 104.Xr hcseriald 8 105.Sh AUTHORS 106.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com 107