xref: /freebsd/usr.sbin/bluetooth/hcsecd/hcsecd.8 (revision 72f00208e54ddee7e52769953a28734e0d4ec7dd)
11a63eb31SJulian Elischer.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
21a63eb31SJulian Elischer.\" All rights reserved.
31a63eb31SJulian Elischer.\"
41a63eb31SJulian Elischer.\" Redistribution and use in source and binary forms, with or without
51a63eb31SJulian Elischer.\" modification, are permitted provided that the following conditions
61a63eb31SJulian Elischer.\" are met:
71a63eb31SJulian Elischer.\" 1. Redistributions of source code must retain the above copyright
81a63eb31SJulian Elischer.\"    notice, this list of conditions and the following disclaimer.
91a63eb31SJulian Elischer.\" 2. Redistributions in binary form must reproduce the above copyright
101a63eb31SJulian Elischer.\"    notice, this list of conditions and the following disclaimer in the
111a63eb31SJulian Elischer.\"    documentation and/or other materials provided with the distribution.
121a63eb31SJulian Elischer.\"
131a63eb31SJulian Elischer.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
141a63eb31SJulian Elischer.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
151a63eb31SJulian Elischer.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
161a63eb31SJulian Elischer.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
171a63eb31SJulian Elischer.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
181a63eb31SJulian Elischer.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
191a63eb31SJulian Elischer.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
201a63eb31SJulian Elischer.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
211a63eb31SJulian Elischer.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
221a63eb31SJulian Elischer.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
231a63eb31SJulian Elischer.\" SUCH DAMAGE.
241a63eb31SJulian Elischer.\"
251a63eb31SJulian Elischer.\" $Id: hcsecd.8,v 1.3 2003/04/27 19:45:32 max Exp $
261a63eb31SJulian Elischer.\" $FreeBSD$
2772f00208SRuslan Ermilov.\"
281a63eb31SJulian Elischer.Dd November 16, 2002
291a63eb31SJulian Elischer.Dt HCSECD 8
301a63eb31SJulian Elischer.Os
311a63eb31SJulian Elischer.Sh NAME
321a63eb31SJulian Elischer.Nm hcsecd
331a63eb31SJulian Elischer.Nd control link keys and PIN codes for Bluetooth devices
341a63eb31SJulian Elischer.Sh SYNOPSIS
351a63eb31SJulian Elischer.Nm
3672f00208SRuslan Ermilov.Op Fl dh
3772f00208SRuslan Ermilov.Fl f Ar configfile
381a63eb31SJulian Elischer.Sh DESCRIPTION
391a63eb31SJulian ElischerThe
401a63eb31SJulian Elischer.Nm
4172f00208SRuslan Ermilovdaemon controls link keys and PIN code for Bluetooth devices.
4272f00208SRuslan ErmilovIt opens raw HCI socket and listens for the
431a63eb31SJulian Elischer.Dv Link_Key_Request
441a63eb31SJulian Elischerand
451a63eb31SJulian Elischer.Dv PIN_Code_Request
4672f00208SRuslan ErmilovHCI events.
4772f00208SRuslan ErmilovOnce appropriate HCI event has been received, the daemon will
4872f00208SRuslan Ermilovscan configuration file for matching entry.
4972f00208SRuslan ErmilovThe remove device BD_ADDR is used as a key.
5072f00208SRuslan ErmilovIf no matching entry was found, the default entry will be used.
5172f00208SRuslan ErmilovIf no default entry was found then it is assumed that no link key and no PIN code
5272f00208SRuslan Ermilovexist.
5372f00208SRuslan ErmilovFor any given entry, link key takes precedence over PIN code.
5472f00208SRuslan ErmilovIf link key was not specified, it means device must generate link key from
5572f00208SRuslan ErmilovPIN code.
5672f00208SRuslan ErmilovIf entry was found and has the link key (or PIN code) then the
571a63eb31SJulian Elischer.Dv Link_Key_Request_Reply
581a63eb31SJulian Elischer(or
5972f00208SRuslan Ermilov.Dv PIN_Code_Request_Reply )
6072f00208SRuslan Ermilovcommand will be sent back to the device.
6172f00208SRuslan ErmilovOtherwise, the
621a63eb31SJulian Elischer.Dv Link_Key_Request_Negative_Reply
631a63eb31SJulian Elischer(or
6472f00208SRuslan Ermilov.Dv PIN_Code_Request_Negative_Reply )
6572f00208SRuslan Ermilovcommand will be sent back to the device.
661a63eb31SJulian Elischer.Pp
671a63eb31SJulian ElischerThe
681a63eb31SJulian Elischer.Nm
691a63eb31SJulian Elischerdaemon currently does not handle HCI
701a63eb31SJulian Elischer.Dv Link_Key_Notification
7172f00208SRuslan Ermilovevent and does not cache link keys created from the PIN codes.
7272f00208SRuslan ErmilovIt means that the link key only exists while connection is opened.
7372f00208SRuslan ErmilovAfter the connection has been terminated, the user will have to enter PIN code
7472f00208SRuslan Ermilovagain.
751a63eb31SJulian Elischer.Pp
761a63eb31SJulian ElischerThe command line options are as follows:
7772f00208SRuslan Ermilov.Bl -tag -width indent
781a63eb31SJulian Elischer.It Fl d
791a63eb31SJulian ElischerDo not detach from the controlling terminal.
8072f00208SRuslan Ermilov.It Fl f Ar configfile
8172f00208SRuslan ErmilovSpecify name of the configuration file.
8272f00208SRuslan ErmilovThe default is
8372f00208SRuslan Ermilov.Pa /usr/local/etc/hcsecd.conf .
841a63eb31SJulian Elischer.It Fl h
851a63eb31SJulian ElischerDisplay usage message and exit.
861a63eb31SJulian Elischer.El
871a63eb31SJulian Elischer.Sh BUGS
881a63eb31SJulian ElischerCurrently there is no way to select link key or PIN code based on which local
8972f00208SRuslan Ermilovdevice received the request.
9072f00208SRuslan ErmilovEverything is based on remote device BD_ADDR.
911a63eb31SJulian ElischerAlso might implement interface for external helpers to obtain link keys and
921a63eb31SJulian ElischerPIN codes.
931a63eb31SJulian Elischer.Sh FILES
9472f00208SRuslan Ermilov.Bl -tag -width ".Pa /usr/local/etc/hcsecd.conf" -compact
951a63eb31SJulian Elischer.It Pa /usr/local/etc/hcsecd.conf
961a63eb31SJulian Elischer.It Pa /var/run/hcsecd.pid
971a63eb31SJulian Elischer.El
981a63eb31SJulian Elischer.Sh SEE ALSO
991a63eb31SJulian Elischer.Xr netgraph 3 ,
1001a63eb31SJulian Elischer.Xr netgraph 4 ,
1011a63eb31SJulian Elischer.Xr ng_btsocket 4 ,
10272f00208SRuslan Ermilov.Xr ng_hci 4 ,
1031a63eb31SJulian Elischer.Xr hccontrol 8 ,
1041a63eb31SJulian Elischer.Xr hcseriald 8
1051a63eb31SJulian Elischer.Sh AUTHORS
1061a63eb31SJulian Elischer.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
107