freebsd_amp_hwpstate/usr.sbin/bluetooth/hcsecd/hcsecd.8

107 lines
3.6 KiB
Groff
Raw Normal View History

.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: hcsecd.8,v 1.3 2003/04/27 19:45:32 max Exp $
.\" $FreeBSD$
.\"
.Dd November 16, 2002
.Dt HCSECD 8
.Os
.Sh NAME
.Nm hcsecd
.Nd control link keys and PIN codes for Bluetooth devices
.Sh SYNOPSIS
.Nm
.Op Fl dh
.Fl f Ar configfile
.Sh DESCRIPTION
The
.Nm
daemon controls link keys and PIN code for Bluetooth devices.
It opens raw HCI socket and listens for the
.Dv Link_Key_Request
and
.Dv PIN_Code_Request
HCI events.
Once appropriate HCI event has been received, the daemon will
scan configuration file for matching entry.
The remove 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
exist.
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 has the link key (or PIN code) then the
.Dv Link_Key_Request_Reply
(or
.Dv PIN_Code_Request_Reply )
command will be sent back to the device.
Otherwise, the
.Dv Link_Key_Request_Negative_Reply
(or
.Dv PIN_Code_Request_Negative_Reply )
command will be sent back to the device.
.Pp
The
.Nm
daemon currently does not handle HCI
.Dv Link_Key_Notification
event and does not cache link keys created from the PIN codes.
It means that the link key only exists while connection is opened.
After the connection has been terminated, the user will have to enter PIN code
again.
.Pp
The command line options are as follows:
.Bl -tag -width indent
.It Fl d
Do not detach from the controlling terminal.
.It Fl f Ar configfile
Specify name of the configuration file.
The default is
.Pa /usr/local/etc/hcsecd.conf .
.It Fl h
Display usage message and exit.
.El
.Sh BUGS
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.
.Sh FILES
.Bl -tag -width ".Pa /usr/local/etc/hcsecd.conf" -compact
.It Pa /usr/local/etc/hcsecd.conf
.It Pa /var/run/hcsecd.pid
.El
.Sh SEE ALSO
.Xr netgraph 3 ,
.Xr netgraph 4 ,
.Xr ng_btsocket 4 ,
.Xr ng_hci 4 ,
.Xr hccontrol 8 ,
.Xr hcseriald 8
.Sh AUTHORS
.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com