1.\" Copyright (c) 2003 Maksim Yevmenkin <m_evmenkin@yahoo.com> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $Id: bthost.1,v 1.7 2003/05/21 22:19:00 max Exp $ 26.\" 27.Dd May 8, 2003 28.Dt BTHOST 1 29.Os 30.Sh NAME 31.Nm bthost 32.Nd look up Bluetooth host names and Protocol Service Multiplexor values 33.Sh SYNOPSIS 34.Nm 35.Op Fl bhp 36.Ar host_or_protocol 37.Sh DESCRIPTION 38The 39.Nm 40utility looks for information about Bluetooth hosts and 41Protocol Service Multiplexor (PSM) values. 42It gets this information from the 43.Pa /etc/bluetooth/hosts 44and 45.Pa /etc/bluetooth/protocols 46files. 47.Pp 48In host mode, it simply converts between the host names and Bluetooth addresses. 49The argument can be either a host name or a Bluetooth address. 50The program first attempts to interpret it as a Bluetooth address. 51If this fails, it will treat it as a host name. 52A Bluetooth address consists of six hex bytes separated by a colon, 53e.g., 54.Dq Li 01:02:03:04:05:06 . 55A host name consists of names separated by dots, e.g., 56.Dq Li my.cell.phone . 57.Pp 58In protocol mode, it simply converts between the Protocol Service Multiplexor 59names and assigned numbers. 60The argument can be either a Protocol Service Multiplexor name or 61an assigned number. 62The program first attempts to interpret it as an assigned number. 63.Pp 64The options are as follows: 65.Bl -tag -width indent 66.It Fl b 67Produce brief output. 68.It Fl h 69Display usage message and exit. 70.It Fl p 71Activate protocol mode. 72.El 73.Pp 74The 75.Nm 76utility will print results to the standard output, and error messages to the 77standard error. 78An output can be quite different, 79here is an example that demonstrates all of the possibilities: 80.Bd -literal -offset indent 81% bthost localhost 82Host localhost has address FF:FF:FF:00:00:00 83% bthost ff:ff:ff:00:00:00 84Host FF:FF:FF:00:00:00 has name localhost 85% bthost -b localhost 86FF:FF:FF:00:00:00 87% bthost -b ff:ff:ff:00:00:00 88localhost 89% bthost do.not.exists 90do.not.exists: Unknown host 91% bthost 0:0:0:0:0:0 9200:00:00:00:00:00: Unknown host 93% bthost -p sdp 94Protocol/Service Multiplexor sdp has number 1 95% bthost -p 3 96Protocol/Service Multiplexor rfcomm has number 3 97% bthost -bp HID-Control 9817 99% bthost -p foo 100foo: Unknown Protocol/Service Multiplexor 101.Ed 102.Sh FILES 103.Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact 104.It Pa /etc/bluetooth/hosts 105.It Pa /etc/bluetooth/protocols 106.El 107.Sh EXIT STATUS 108.Ex -std 109.Sh SEE ALSO 110.Xr bluetooth 3 , 111.Xr bluetooth.hosts 5 , 112.Xr bluetooth.protocols 5 113.Sh AUTHORS 114.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com 115