Sync usage with man page.
[netbsd-mini2440.git] / usr.bin / btkey / btkey.1
blob0dd6ab942be0421073e21a58271d4b002f5e4559
1 .\"     $NetBSD: btkey.1,v 1.3 2009/03/10 19:36:33 joerg Exp $
2 .\"
3 .\" Copyright (c) 2007 Iain Hibbert
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. The name of the author may not be used to endorse or promote products
15 .\"    derived from this software without specific prior written permission.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 .\"
28 .Dd November 8, 2007
29 .Dt BTKEY 1
30 .Os
31 .Sh NAME
32 .Nm btkey
33 .Nd Bluetooth Link Key management utility
34 .Sh SYNOPSIS
35 .Nm
36 .Op Fl CcRrWw
37 .Op Fl k Ar key
38 .Fl a Ar address
39 .Fl d Ar device
40 .Nm
41 .Fl Ll
42 .Op Fl d Ar device
43 .Sh DESCRIPTION
44 The
45 .Nm
46 program is used to manage Bluetooth Link Key storage.
47 Keys are normally handled by the
48 .Xr bthcid 8
49 daemon which caches them in the
50 .Pa /var/db/bthcid.keys
51 file and provides them as required when Bluetooth connections
52 need to be authenticated.
53 .Pp
54 These keys are required for connections between remote
55 devices and the specific controller
56 .Pq not the Operating System
57 and so for multi-boot systems where it may not always be possible to
58 specify the same key across all OS's it can be better to have the
59 Bluetooth controller provide the keys directly from its semi-permanent
60 memory once devices are paired.
61 .Nm
62 will read, write or clear keys in device memory or the key cache
63 as required.
64 .Pp
65 Note that without the
66 .Xr bthcid 8
67 daemon running users will be unable to supply PINs, and Link Keys
68 resulting from new pairings will not be stored.
69 If no new pairings are expected and the keys are stored in
70 the controller then
71 .Xr bthcid 8
72 is not required.
73 .Pp
74 The options are as follows:
75 .Bl -tag -width ".Fl a Ar address"
76 .It Fl a Ar address
77 Specify the remote device address.
78 May be given as a BDADDR or a name.
79 .It Fl C
80 Clear key from device.
81 .It Fl c
82 Clear key from file.
83 .It Fl d Ar device
84 Specify the local device address.
85 May be given as a BDADDR or a name.
86 .It Fl k Ar key
87 Supply a Link Key as a string of hexadecimal digits.
88 Up to 32 digits will be processed and the resulting key
89 will be zero padded to 16 octets.
90 .It Fl L
91 List keys stored in device.
92 .It Fl l
93 List keys stored in file.
94 .It Fl R
95 Read key from device.
96 .It Fl r
97 Read key from file.
98 .It Fl W
99 Write key to device.
100 .It Fl w
101 Write key to file.
104 Super-user privileges are required to read or write link keys.
105 .Sh EXIT STATUS
106 .Ex -std
107 .Sh FILES
108 .Bl -item -compact
110 .Pa /var/db/bthcid.keys
112 .Sh EXAMPLES
113 Read key for mouse at ubt0 from file and write to device
115 .Dl btkey -d ubt0 -a mouse -rW
117 Write new key for keyboard at ubt0 to file
119 .Dl btkey -d ubt0 -a keyboard -k 92beda6cd8b8f66ebd2af270d55d70ec -w
121 Clear key for phone at bt3c0 from file and device
123 .Dl btkey -d bt3c0 -a phone -cC
124 .Sh SEE ALSO
125 .Xr btpin 1 ,
126 .Xr btconfig 8 ,
127 .Xr bthcid 8
128 .Sh AUTHORS
129 .An Iain Hibbert