xref: /freebsd/usr.sbin/bluetooth/hcsecd/hcsecd.8 (revision 1a63eb31c7fc715c9148a9e1f39a3c9c5fe99288)
11a63eb31SJulian Elischer.\" hcsecd.8
21a63eb31SJulian Elischer.\"
31a63eb31SJulian Elischer.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
41a63eb31SJulian Elischer.\" All rights reserved.
51a63eb31SJulian Elischer.\"
61a63eb31SJulian Elischer.\" Redistribution and use in source and binary forms, with or without
71a63eb31SJulian Elischer.\" modification, are permitted provided that the following conditions
81a63eb31SJulian Elischer.\" are met:
91a63eb31SJulian Elischer.\" 1. Redistributions of source code must retain the above copyright
101a63eb31SJulian Elischer.\"    notice, this list of conditions and the following disclaimer.
111a63eb31SJulian Elischer.\" 2. Redistributions in binary form must reproduce the above copyright
121a63eb31SJulian Elischer.\"    notice, this list of conditions and the following disclaimer in the
131a63eb31SJulian Elischer.\"    documentation and/or other materials provided with the distribution.
141a63eb31SJulian Elischer.\"
151a63eb31SJulian Elischer.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
161a63eb31SJulian Elischer.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
171a63eb31SJulian Elischer.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
181a63eb31SJulian Elischer.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
191a63eb31SJulian Elischer.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
201a63eb31SJulian Elischer.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
211a63eb31SJulian Elischer.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
221a63eb31SJulian Elischer.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
231a63eb31SJulian Elischer.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
241a63eb31SJulian Elischer.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
251a63eb31SJulian Elischer.\" SUCH DAMAGE.
261a63eb31SJulian Elischer.\"
271a63eb31SJulian Elischer.\" $Id: hcsecd.8,v 1.3 2003/04/27 19:45:32 max Exp $
281a63eb31SJulian Elischer.\" $FreeBSD$
291a63eb31SJulian Elischer.Dd November 16, 2002
301a63eb31SJulian Elischer.Dt HCSECD 8
311a63eb31SJulian Elischer.Os
321a63eb31SJulian Elischer.Sh NAME
331a63eb31SJulian Elischer.Nm hcsecd
341a63eb31SJulian Elischer.Nd control link keys and PIN codes for Bluetooth devices
351a63eb31SJulian Elischer.Sh SYNOPSIS
361a63eb31SJulian Elischer.Nm
371a63eb31SJulian Elischer.Op Fl f Ar configfile
381a63eb31SJulian Elischer.Op Fl d
391a63eb31SJulian Elischer.Op Fl h
401a63eb31SJulian Elischer.Sh DESCRIPTION
411a63eb31SJulian ElischerThe
421a63eb31SJulian Elischer.Nm
431a63eb31SJulian Elischerdaemon controls link keys and PIN code for Bluetooth devices. It opens raw
441a63eb31SJulian ElischerHCI socket and listens for the
451a63eb31SJulian Elischer.Dv Link_Key_Request
461a63eb31SJulian Elischerand
471a63eb31SJulian Elischer.Dv PIN_Code_Request
481a63eb31SJulian ElischerHCI events. Once appropriate HCI event has been received, the daemon will
491a63eb31SJulian Elischerscan configuration file for matching entry. The remove device BD_ADDR is used
501a63eb31SJulian Elischeras a key. If no matching entry was found then the default entry will be used.
511a63eb31SJulian ElischerIf no default entry was found than it is assumed no link key and no PIN code
521a63eb31SJulian Elischerexist. For any given entry link key takes precedence over PIN code. If link key
531a63eb31SJulian Elischerwas not specified then it means device must generate link key from PIN code. If
541a63eb31SJulian Elischerentry was found and has the link key (or PIN code) then
551a63eb31SJulian Elischerthe
561a63eb31SJulian Elischer.Dv Link_Key_Request_Reply
571a63eb31SJulian Elischer(or
581a63eb31SJulian Elischer.Dv PIN_Code_Request_Reply
591a63eb31SJulian Elischer) command will be sent back to the device. Otherwise the
601a63eb31SJulian Elischer.Dv Link_Key_Request_Negative_Reply
611a63eb31SJulian Elischer(or
621a63eb31SJulian Elischer.Dv PIN_Code_Request_Negative_Reply
631a63eb31SJulian Elischer) command will be sent back to the device.
641a63eb31SJulian Elischer.Pp
651a63eb31SJulian ElischerThe
661a63eb31SJulian Elischer.Nm
671a63eb31SJulian Elischerdaemon currently does not handle HCI
681a63eb31SJulian Elischer.Dv Link_Key_Notification
691a63eb31SJulian Elischerevent and does not cache link keys created from the PIN codes. It means
701a63eb31SJulian Elischerthat the link key only exists while connection is opened. After the connection
711a63eb31SJulian Elischerhas been terminated the user will have to enter PIN code again.
721a63eb31SJulian Elischer.Pp
731a63eb31SJulian ElischerThe command line options are as follows:
741a63eb31SJulian Elischer.Bl -tag -width Ds
751a63eb31SJulian Elischer.It Fl f Ar filename
761a63eb31SJulian ElischerName of configuration file. Default is
771a63eb31SJulian Elischer.Pa /usr/local/etc/hcsecd.conf .
781a63eb31SJulian Elischer.It Fl d
791a63eb31SJulian ElischerDo not detach from the controlling terminal.
801a63eb31SJulian Elischer.It Fl h
811a63eb31SJulian ElischerDisplay usage message and exit.
821a63eb31SJulian Elischer.El
831a63eb31SJulian Elischer.Sh BUGS
841a63eb31SJulian ElischerCurrently there is no way to select link key or PIN code based on which local
851a63eb31SJulian Elischerdevice received the request. Everything is based on remote device BD_ADDR.
861a63eb31SJulian ElischerAlso might implement interface for external helpers to obtain link keys and
871a63eb31SJulian ElischerPIN codes.
881a63eb31SJulian Elischer.Sh FILES
891a63eb31SJulian Elischer.Bl -tag -width /etc/usbd.conf -compact
901a63eb31SJulian Elischer.It Pa /usr/local/etc/hcsecd.conf
911a63eb31SJulian Elischer.It Pa /var/run/hcsecd.pid
921a63eb31SJulian Elischer.El
931a63eb31SJulian Elischer.Sh SEE ALSO
941a63eb31SJulian Elischer.Xr netgraph 3 ,
951a63eb31SJulian Elischer.Xr netgraph 4 ,
961a63eb31SJulian Elischer.Xr ng_hci 4 ,
971a63eb31SJulian Elischer.Xr ng_btsocket 4 ,
981a63eb31SJulian Elischer.Xr hccontrol 8 ,
991a63eb31SJulian Elischer.Xr hcseriald 8
1001a63eb31SJulian Elischer.Sh AUTHORS
1011a63eb31SJulian Elischer.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
102