1*2a65137fSwiz.\" $NetBSD: bthset.1,v 1.5 2014/09/19 16:02:58 wiz Exp $ 2a5c89047Sgdamore.\" 3a5c89047Sgdamore.\" Copyright (c) 2006 Itronix Inc. 4a5c89047Sgdamore.\" All rights reserved. 5a5c89047Sgdamore.\" 6a5c89047Sgdamore.\" Redistribution and use in source and binary forms, with or without 7a5c89047Sgdamore.\" modification, are permitted provided that the following conditions 8a5c89047Sgdamore.\" are met: 9a5c89047Sgdamore.\" 1. Redistributions of source code must retain the above copyright 10a5c89047Sgdamore.\" notice, this list of conditions and the following disclaimer. 11a5c89047Sgdamore.\" 2. Redistributions in binary form must reproduce the above copyright 12a5c89047Sgdamore.\" notice, this list of conditions and the following disclaimer in the 13a5c89047Sgdamore.\" documentation and/or other materials provided with the distribution. 14a5c89047Sgdamore.\" 3. The name of Itronix Inc. may not be used to endorse 15a5c89047Sgdamore.\" or promote products derived from this software without specific 16a5c89047Sgdamore.\" prior written permission. 17a5c89047Sgdamore.\" 18a5c89047Sgdamore.\" THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND 19a5c89047Sgdamore.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20a5c89047Sgdamore.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21a5c89047Sgdamore.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY 22a5c89047Sgdamore.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23a5c89047Sgdamore.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24a5c89047Sgdamore.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25a5c89047Sgdamore.\" ON ANY THEORY OF LIABILITY, WHETHER IN 26a5c89047Sgdamore.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27a5c89047Sgdamore.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28a5c89047Sgdamore.\" POSSIBILITY OF SUCH DAMAGE. 29a5c89047Sgdamore.\" 30548073d0Swiz.Dd July 26, 2006 31a5c89047Sgdamore.Dt BTHSET 1 32a5c89047Sgdamore.Os 33a5c89047Sgdamore.Sh NAME 34a5c89047Sgdamore.Nm bthset 35a5c89047Sgdamore.Nd Bluetooth Headset utility 36a5c89047Sgdamore.Sh SYNOPSIS 37a5c89047Sgdamore.Nm 38a5c89047Sgdamore.Op Fl v 39a5c89047Sgdamore.Op Fl c Ar command 40a5c89047Sgdamore.Op Fl m Ar mixer 41a5c89047Sgdamore.Op Fl p Ar file 42a5c89047Sgdamore.Op Fl s Ar channel 43a5c89047Sgdamore.Nm 44a5c89047Sgdamore.Op Fl h 45a5c89047Sgdamore.Sh DESCRIPTION 46a5c89047SgdamoreThe 47a5c89047Sgdamore.Nm 4830d63321Stronutility is used to access a Bluetooth Headset with the 4930d63321Stron.Xr btsco 4 50548073d0Swizaudio device. 51a643df2fSplunkyIt opens the 52a643df2fSplunky.Xr mixer 4 53a643df2fSplunkydevice and creates the control connection 54548073d0Swizto the headset, then conducts volume settings each way. 55548073d0SwizWhen 56a5c89047Sgdamore.Nm 57a5c89047Sgdamorereceives a 58a5c89047Sgdamore.Dv SIGUSR1 59a5c89047Sgdamoresignal, it will start sending RING codes to the headset until the headset 60a5c89047Sgdamorebutton is pressed or a 61a5c89047Sgdamore.Dv SIGUSR2 62548073d0Swizsignal is received. 63548073d0SwizIf the headset is ringing and 64a5c89047Sgdamore.Nm 65a5c89047Sgdamorereceives a button press notification, the specified 66a5c89047Sgdamore.Ar command 67a5c89047Sgdamore(if any) is executed. 68a5c89047Sgdamore.Pp 69a5c89047SgdamoreWhen the server channel is specified with the 70a5c89047Sgdamore.Fl s 71a5c89047Sgdamoreoption, instead of opening the control connection, 72a5c89047Sgdamore.Nm 73a5c89047Sgdamorewill listen on the 74a5c89047Sgdamore.Ar channel 75a5c89047Sgdamorefor incoming connections from the Headset and register as Headset Audio 76a5c89047SgdamoreGateway with the local SDP server. 77a5c89047Sgdamore.Pp 78a5c89047SgdamoreThe options are as follows: 79a5c89047Sgdamore.Bl -tag -width indent 80a5c89047Sgdamore.It Fl c Ar command 81a5c89047SgdamoreSpecify an optional command to be executed when the headset responds to 82548073d0Swizringing with a button press event. 83548073d0SwizThis defaults to the contents of the 84a5c89047Sgdamore.Dv BTHSET_COMMAND 85a5c89047Sgdamoreenvironment variable, if set. 86a5c89047Sgdamore.It Fl h 87548073d0SwizPrint usage message. 88a5c89047Sgdamore.It Fl m Ar mixer 89548073d0SwizSpecify the path to the mixer device. 90548073d0SwizThis defaults to the contents of the 91a5c89047Sgdamore.Dv BTHSET_MIXER 92a5c89047Sgdamoreenvironment variable, or 93a5c89047Sgdamore.Pa /dev/mixer 94a5c89047Sgdamoreif not set. 95a5c89047Sgdamore.It Fl p Ar file 96a5c89047SgdamoreWrite the PID to 97a5c89047Sgdamore.Ar file 98548073d0Swizso that other programs can find us later. 99548073d0SwizThis defaults to the contents of the 100a5c89047Sgdamore.Dv BTHSET_PIDFILE 101a5c89047Sgdamoreenvironment variable, if set. 102a5c89047Sgdamore.It Fl s Ar channel 103a5c89047SgdamoreRegister with the local SDP server as a Headset Audio Gateway and listen for 104a5c89047Sgdamoreconnections on the given RFCOMM server channel. 105a5c89047Sgdamore.It Fl v 106a5c89047SgdamoreBe verbose. 107a5c89047Sgdamore.El 108a5c89047Sgdamore.Sh FILES 109a5c89047Sgdamore.Pa /dev/mixer 110*2a65137fSwiz.Sh EXIT STATUS 111*2a65137fSwiz.Ex -std 112a5c89047Sgdamore.Sh SEE ALSO 113548073d0Swiz.Xr btsco 4 , 114a643df2fSplunky.Xr mixer 4 115a5c89047Sgdamore.Sh AUTHORS 116a5c89047Sgdamore.An Iain Hibbert 117a5c89047Sgdamorefor Itronix, Inc 118