xref: /netbsd/usr.bin/bthset/bthset.1 (revision 6550d01e)
1.\"	$NetBSD: bthset.1,v 1.4 2006/08/19 16:37:26 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 July 26, 2006
31.Dt BTHSET 1
32.Os
33.Sh NAME
34.Nm bthset
35.Nd Bluetooth Headset utility
36.Sh SYNOPSIS
37.Nm
38.Op Fl v
39.Op Fl c Ar command
40.Op Fl m Ar mixer
41.Op Fl p Ar file
42.Op Fl s Ar channel
43.Nm
44.Op Fl h
45.Sh DESCRIPTION
46The
47.Nm
48utility is used to access a Bluetooth Headset with the
49.Xr btsco 4
50audio device.
51It opens the
52.Xr mixer 4
53device and creates the control connection
54to the headset, then conducts volume settings each way.
55When
56.Nm
57receives a
58.Dv SIGUSR1
59signal, it will start sending RING codes to the headset until the headset
60button is pressed or a
61.Dv SIGUSR2
62signal is received.
63If the headset is ringing and
64.Nm
65receives a button press notification, the specified
66.Ar command
67(if any) is executed.
68.Pp
69When the server channel is specified with the
70.Fl s
71option, instead of opening the control connection,
72.Nm
73will listen on the
74.Ar channel
75for incoming connections from the Headset and register as Headset Audio
76Gateway with the local SDP server.
77.Pp
78The options are as follows:
79.Bl -tag -width indent
80.It Fl c Ar command
81Specify an optional command to be executed when the headset responds to
82ringing with a button press event.
83This defaults to the contents of the
84.Dv BTHSET_COMMAND
85environment variable, if set.
86.It Fl h
87Print usage message.
88.It Fl m Ar mixer
89Specify the path to the mixer device.
90This defaults to the contents of the
91.Dv BTHSET_MIXER
92environment variable, or
93.Pa /dev/mixer
94if not set.
95.It Fl p Ar file
96Write the PID to
97.Ar file
98so that other programs can find us later.
99This defaults to the contents of the
100.Dv BTHSET_PIDFILE
101environment variable, if set.
102.It Fl s Ar channel
103Register with the local SDP server as a Headset Audio Gateway and listen for
104connections on the given RFCOMM server channel.
105.It Fl v
106Be verbose.
107.El
108.Sh EXIT STATUS
109.Ex -std
110.Sh FILES
111.Pa /dev/mixer
112.Sh SEE ALSO
113.Xr btsco 4 ,
114.Xr mixer 4
115.Sh AUTHORS
116.An Iain Hibbert
117for Itronix, Inc
118