2003-05-10 21:50:37 +00:00
|
|
|
.\" 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$
|
2003-05-20 21:01:21 +00:00
|
|
|
.\"
|
2003-05-10 21:50:37 +00:00
|
|
|
.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
|
2003-05-20 21:01:21 +00:00
|
|
|
.Op Fl dh
|
|
|
|
.Fl f Ar configfile
|
2003-05-10 21:50:37 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2003-05-20 21:01:21 +00:00
|
|
|
daemon controls link keys and PIN code for Bluetooth devices.
|
|
|
|
It opens raw HCI socket and listens for the
|
2003-05-10 21:50:37 +00:00
|
|
|
.Dv Link_Key_Request
|
|
|
|
and
|
|
|
|
.Dv PIN_Code_Request
|
2003-05-20 21:01:21 +00:00
|
|
|
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
|
2003-05-10 21:50:37 +00:00
|
|
|
.Dv Link_Key_Request_Reply
|
|
|
|
(or
|
2003-05-20 21:01:21 +00:00
|
|
|
.Dv PIN_Code_Request_Reply )
|
|
|
|
command will be sent back to the device.
|
|
|
|
Otherwise, the
|
2003-05-10 21:50:37 +00:00
|
|
|
.Dv Link_Key_Request_Negative_Reply
|
|
|
|
(or
|
2003-05-20 21:01:21 +00:00
|
|
|
.Dv PIN_Code_Request_Negative_Reply )
|
|
|
|
command will be sent back to the device.
|
2003-05-10 21:50:37 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
daemon currently does not handle HCI
|
2003-05-20 21:01:21 +00:00
|
|
|
.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.
|
2003-05-10 21:50:37 +00:00
|
|
|
.Pp
|
|
|
|
The command line options are as follows:
|
2003-05-20 21:01:21 +00:00
|
|
|
.Bl -tag -width indent
|
2003-05-10 21:50:37 +00:00
|
|
|
.It Fl d
|
|
|
|
Do not detach from the controlling terminal.
|
2003-05-20 21:01:21 +00:00
|
|
|
.It Fl f Ar configfile
|
|
|
|
Specify name of the configuration file.
|
|
|
|
The default is
|
|
|
|
.Pa /usr/local/etc/hcsecd.conf .
|
2003-05-10 21:50:37 +00:00
|
|
|
.It Fl h
|
|
|
|
Display usage message and exit.
|
|
|
|
.El
|
|
|
|
.Sh BUGS
|
2003-05-20 21:01:21 +00:00
|
|
|
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
|
2003-05-10 21:50:37 +00:00
|
|
|
PIN codes.
|
|
|
|
.Sh FILES
|
2003-05-20 21:01:21 +00:00
|
|
|
.Bl -tag -width ".Pa /usr/local/etc/hcsecd.conf" -compact
|
2003-05-10 21:50:37 +00:00
|
|
|
.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 ,
|
2003-05-20 21:01:21 +00:00
|
|
|
.Xr ng_hci 4 ,
|
2003-05-10 21:50:37 +00:00
|
|
|
.Xr hccontrol 8 ,
|
2003-05-20 21:01:21 +00:00
|
|
|
.Xr hcseriald 8
|
2003-05-10 21:50:37 +00:00
|
|
|
.Sh AUTHORS
|
|
|
|
.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
|