1 .\" $NetBSD: btkey.1,v 1.3 2009/03/10 19:36:33 joerg Exp $
3 .\" Copyright (c) 2007 Iain Hibbert
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
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.
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.
33 .Nd Bluetooth Link Key management utility
46 program is used to manage Bluetooth Link Key storage.
47 Keys are normally handled by the
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.
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.
62 will read, write or clear keys in device memory or the key cache
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
74 The options are as follows:
75 .Bl -tag -width ".Fl a Ar address"
77 Specify the remote device address.
78 May be given as a BDADDR or a name.
80 Clear key from device.
84 Specify the local device address.
85 May be given as a BDADDR or a name.
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.
91 List keys stored in device.
93 List keys stored in file.
104 Super-user privileges are required to read or write link keys.
110 .Pa /var/db/bthcid.keys
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