xref: /netbsd-src/usr.bin/btpin/btpin.1 (revision a5847cc334d9a7029f6352b847e9e8d71a0f9e0c)
1.\"	$NetBSD: btpin.1,v 1.9 2009/05/16 07:18:42 plunky Exp $
2.\"
3.\" Copyright (c) 2006 Itronix Inc.
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 Itronix Inc. may not be used to endorse
15.\"    or promote products derived from this software without specific
16.\"    prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
22.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25.\" ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd May 16, 2009
31.Dt BTPIN 1
32.Os
33.Sh NAME
34.Nm btpin
35.Nd Bluetooth PIN utility
36.Sh SYNOPSIS
37.Nm
38.Op Fl P
39.Op Fl d Ar device
40.Op Fl s Ar path
41.Brq Fl p Ar pin | Fl r Op Fl l Ar len
42.Fl a Ar address
43.Sh DESCRIPTION
44The
45.Nm
46utility is used to register a temporary PIN with the
47.Xr bthcid 8
48daemon for the purposes of pairing Bluetooth devices.
49The PIN will be valid for 5 minutes or until used, whichever comes first.
50.Pp
51The options are as follows:
52.Bl -tag -width indent
53.It Fl a Ar address
54Specify the remote device address.
55The address can be specified as BD_ADDR or a name.
56If a name was specified, the
57.Nm
58utility attempts to resolve the name via
59.Xr bt_gethostbyname 3 .
60.It Fl d Ar device
61Specify the local device address.
62The device can be specified by BD_ADDR or device name.
63See
64.Xr btconfig 8
65for a list of devices available.
66If no device is specified, the PIN will be valid for any local device.
67.It Fl l Ar len
68Specify length of PIN to generate, where 1 \*[Le]
69.Ar len
70\*[Le] 16.
71.It Fl P
72Pair with remote device.
73.Nm
74will attempt to open an authenticated L2CAP connection to the Service
75Discovery Service on the remote device, to force immediate pairing.
76.It Fl p Ar pin
77The PIN to register.
78The PIN may be up to 16 bytes in length.
79.It Fl r
80Generate a random PIN, the default length is 4 bytes.
81.It Fl s Ar path
82Specify path to the control socket.
83The default path is
84.Pa /var/run/bthcid .
85.El
86.Sh EXIT STATUS
87.Ex -std
88.Sh FILES
89.Bl -item -compact
90.It
91.Pa /var/run/bthcid
92.El
93.Sh SEE ALSO
94.Xr btkey 1 ,
95.Xr btconfig 8 ,
96.Xr bthcid 8
97.Sh AUTHORS
98.An Iain Hibbert
99for Itronix, Inc
100