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.\" $FreeBSD$ 27.\" 28.Dd May 8, 2003 29.Dt BTHOST 1 30.Os 31.Sh NAME 32.Nm bthost 33.Nd look up Bluetooth host names and Protocol Service Multiplexor values 34.Sh SYNOPSIS 35.Nm 36.Op Fl bhp 37.Ar host_or_protocol 38.Sh DESCRIPTION 39The 40.Nm 41utility looks for information about Bluetooth hosts and 42Protocol Service Multiplexor (PSM) values. 43It gets this information from the 44.Pa /etc/bluetooth/hosts 45and 46.Pa /etc/bluetooth/protocols 47files. 48.Pp 49In host mode, it simply converts between the host names and Bluetooth addresses. 50The argument can be either a host name or a Bluetooth address. 51The program first attempts to interpret it as a Bluetooth address. 52If this fails, it will treat it as a host name. 53A Bluetooth address consists of six hex bytes separated by a colon, 54e.g., 55.Dq Li 01:02:03:04:05:06 . 56A host name consists of names separated by dots, e.g., 57.Dq Li my.cell.phone . 58.Pp 59In protocol mode, it simply converts between the Protocol Service Multiplexor 60names and assigned numbers. 61The argument can be either a Protocol Service Multiplexor name or 62an assigned number. 63The program first attempts to interpret it as an assigned number. 64.Pp 65The options are as follows: 66.Bl -tag -width indent 67.It Fl b 68Produce brief output. 69.It Fl h 70Display usage message and exit. 71.It Fl p 72Activate protocol mode. 73.El 74.Pp 75The 76.Nm 77utility will print results to the standard output, and error messages to the 78standard error. 79An output can be quite different, 80here is an example that demonstrates all of the possibilities: 81.Bd -literal -offset indent 82% bthost localhost 83Host localhost has address FF:FF:FF:00:00:00 84% bthost ff:ff:ff:00:00:00 85Host FF:FF:FF:00:00:00 has name localhost 86% bthost -b localhost 87FF:FF:FF:00:00:00 88% bthost -b ff:ff:ff:00:00:00 89localhost 90% bthost do.not.exists 91do.not.exists: Unknown host 92% bthost 0:0:0:0:0:0 9300:00:00:00:00:00: Unknown host 94% bthost -p sdp 95Protocol/Service Multiplexor sdp has number 1 96% bthost -p 3 97Protocol/Service Multiplexor rfcomm has number 3 98% bthost -bp HID-Control 9917 100% bthost -p foo 101foo: Unknown Protocol/Service Multiplexor 102.Ed 103.Sh FILES 104.Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact 105.It Pa /etc/bluetooth/hosts 106.It Pa /etc/bluetooth/protocols 107.El 108.Sh EXIT STATUS 109.Ex -std 110.Sh SEE ALSO 111.Xr bluetooth 3 , 112.Xr bluetooth.hosts 5 , 113.Xr bluetooth.protocols 5 114.Sh AUTHORS 115.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com 116