summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2008-12-01 20:22:57 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2008-12-01 20:22:57 +0000
commit8b47e7505edc209fd0339237fbaefd66fddb39d8 (patch)
tree7d6a65eb0418c2d06ca72d639f38a854d2df76a6 /usr.sbin
parente9a0632db4c5c099d14de47ee78e069a157a620b (diff)
introduce btd(8) and btctl(8), tweak bt.conf(5)
feedback from uwe@ and jmc@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/btctl/Makefile4
-rw-r--r--usr.sbin/btctl/bt.conf.554
-rw-r--r--usr.sbin/btctl/btctl.855
-rw-r--r--usr.sbin/btd/Makefile4
-rw-r--r--usr.sbin/btd/btd.860
5 files changed, 162 insertions, 15 deletions
diff --git a/usr.sbin/btctl/Makefile b/usr.sbin/btctl/Makefile
index f154d9b73ab..79143d800fe 100644
--- a/usr.sbin/btctl/Makefile
+++ b/usr.sbin/btctl/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.3 2008/12/01 19:02:25 todd Exp $
+# $OpenBSD: Makefile,v 1.4 2008/12/01 20:22:56 todd Exp $
.PATH: ${.CURDIR}/../btd
PROG= btctl
SRCS= bt_subr.c btctl.c conf.c log.c parse.y
-MAN= bt.conf.5
+MAN= btctl.8 bt.conf.5
LDADD+= -lusbhid
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/../btd
diff --git a/usr.sbin/btctl/bt.conf.5 b/usr.sbin/btctl/bt.conf.5
index 52c087d1295..2e2efa69d1e 100644
--- a/usr.sbin/btctl/bt.conf.5
+++ b/usr.sbin/btctl/bt.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: bt.conf.5,v 1.1 2008/12/01 19:02:25 todd Exp $
+.\" $OpenBSD: bt.conf.5,v 1.2 2008/12/01 20:22:56 todd Exp $
.\"
.\" Copyright (c) 2008 Todd T. Fries <todd@OpenBSD.org>
.\"
@@ -30,7 +30,7 @@ The bluetooth daemon,
can be enabled to run at boot time via the
.Va bt
variable in
-.Xr rc.conf.local 8 .
+.Xr rc 8 .
The
.Nm
configuration itself is loaded at boot time
@@ -41,7 +41,6 @@ A utility called
is also available to load
.Nm
configurations.
-.Pp
.Sh BT.CONF FILE FORMAT
Lines beginning with
.Sq #
@@ -51,14 +50,47 @@ and ignored.
.\" .Sq \e
.\" character.
.Pp
+.Ar interface
+describes the
+.Xr bluetooth 3
+interface to attach to.
+Possible arguments include
+.Ar interfacemac
+and
+.Ar name .
+.Ar interfacemac
+may be
+.Sq *
+to match any further interfaces.
+.Ar name
+may be
+.Dq disable
+to disable an interface from being used.
+.Pp
+.Ar attach
+describes the
+.Xr bluetooth 3
+devices to attach.
+Possible arguments include
+.Ar devicemac ,
+.Ar type ,
+and
+.Ar pin .
+.Ar devicemac
+may be
+.Sq *
+to match any device.
.Ar type
describes the type of device to attach.
Possible types are
-.Ar none ,
-.Ar hf ,
-.Ar hid ,
-and
-.Ar hset .
+.Pp
+.Bl -column "noneXX" "Keyboard/Mouse" -offset indent -compact
+.It Em Type Description
+.It Li none Ta "catchall"
+.It Li hf Ta "Hands Free"
+.It Li hid Ta "Keyboard/Mouse"
+.It Li hset Ta "Handset"
+.El
.Pp
.Ar pin
describes the pin number used to pair with the device.
@@ -73,10 +105,10 @@ interface * "OpenBSD BT"
attach 00:02:76:08:1c:37 type hid pin "0000"
.Ed
.Sh SEE ALSO
-.Xr btctl 8 ,
-.Xr btd 8 ,
-.Xr ubt 4 ,
.Xr sbt 4 ,
+.Xr ubt 4 ,
+.Xr btctl 8 ,
+.Xr btd 8
.Sh HISTORY
The
.Nm
diff --git a/usr.sbin/btctl/btctl.8 b/usr.sbin/btctl/btctl.8
new file mode 100644
index 00000000000..d2e247a9320
--- /dev/null
+++ b/usr.sbin/btctl/btctl.8
@@ -0,0 +1,55 @@
+.\" $OpenBSD: btctl.8,v 1.1 2008/12/01 20:22:56 todd Exp $
+.\"
+.\" Copyright (c) 2008 Todd T. Fries <todd@OpenBSD.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: December 1 2008 $
+.Dt BTCTL 8
+.Os
+.Sh NAME
+.Nm btctl
+.Nd Bluetooth configuration utility
+.Sh SYNOPSIS
+.Nm btctl
+.Op Fl f Ar file
+.Sh DESCRIPTION
+The
+.Nm
+utility loads rules into
+.Xr btd 8 .
+.Nm only does parsing, no interpretation.
+The rulset grammer is described in
+.Xr bt.conf 5 .
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl f Ar file
+Load the rules contained in
+.Ar file .
+.Sh EXAMPLES
+The following command, executed from the command line, would configure
+the
+.Xr btd 8
+daemon with the contents of /etc/bt.conf:
+.Bd -literal -offset 3n
+# btctl -f /etc/bt.conf
+.Ed
+.Sh SEE ALSO
+.Xr bt.conf 5 ,
+.Xr btd 8
+.Sh HISTORY
+The
+.Nm
+program first appeared in
+.Ox 4.5 .
diff --git a/usr.sbin/btd/Makefile b/usr.sbin/btd/Makefile
index 0a9cf592838..8a65f8e50c0 100644
--- a/usr.sbin/btd/Makefile
+++ b/usr.sbin/btd/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.5 2008/11/26 21:48:30 uwe Exp $
+# $OpenBSD: Makefile,v 1.6 2008/12/01 20:22:56 todd Exp $
PROG= btd
SRCS= atomicio.c bt.c bt_subr.c btd.c conf.c control.c db.c \
devinfo.c fdpass.c hci.c log.c sdp.c sdp_query.c \
sdp_search.c util.c
-NOMAN=
+MAN= btd.8
LDADD+= -levent -lusbhid
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/../btctl
diff --git a/usr.sbin/btd/btd.8 b/usr.sbin/btd/btd.8
new file mode 100644
index 00000000000..7fc65109883
--- /dev/null
+++ b/usr.sbin/btd/btd.8
@@ -0,0 +1,60 @@
+.\" $OpenBSD: btd.8,v 1.1 2008/12/01 20:22:56 todd Exp $
+.\"
+.\" Copyright (c) 2008 Todd T. Fries <todd@OpenBSD.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: December 1 2008 $
+.Dt BTD 8
+.Os
+.Sh NAME
+.Nm btd
+.Nd Bluetooth daemon
+.Sh SYNOPSIS
+.Nm btd
+.Op Fl d
+.Sh DESCRIPTION
+.Nm
+is a bluetooth daemon which keeps track of SDP responses
+and link keys for bluetooth devices.
+.Pp
+.Nm
+is usually started at boot time, and can be enabled by
+setting the following in
+.Pa /etc/rc.conf.local :
+.Pp
+.Dl bt=YES
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl d
+foreground mode.
+.Sh FILES
+.Bl -tag -width "/var/run/btd.sockXXX" -compact
+.It Pa /var/run/btd.sock
+Socket
+.Nm
+listens on.
+.It Pa /var/db/btd.db
+Where SDP responses and link keys are cached.
+.Sh SEE ALSO
+.Xr sbt 4 ,
+.Xr ubt 4 ,
+.Xr bt.conf 5 ,
+.Xr btctl 8 ,
+.Xr rc 8
+.Sh HISTORY
+The
+.Nm
+program first appeared in
+.Ox 4.5 .