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 bthost 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 host names and Bluetooth addresses. 50The argument can be either host name or Bluetooth address. 51The program first attempts to interpret it as Bluetooth address. 52If this fails, it will treat it as host name. 53A Bluetooth address consists of six hex bytes sparated by column, 54e.g. 01:02:03:04:05:06. 55A host name consists of names separated by dots, e.g. my.cell.phone. 56.Pp 57In protocol mode it simply converts between Protocol Service Multiplexor names 58and assigned numbers. 59The argument can be either Protocol Service Multiplexor name or assigned number. 60The program first attempts to interpret it as assigned number. 61.Pp 62The options are as follows: 63.Bl -tag -width indent 64.It Fl b 65Produce brief output. 66.It Fl h 67Display usage message and exit. 68.It Fl p 69Activate protocol mode. 70.El 71.Pp 72The 73.Nm 74utility will print results to the standard output and error messages to the 75standard error. 76You may see output of different kinds. 77Here is an example that shows all of them: 78.Pp 79.D1 Ic % bthost localhost 80.Dl Host localhost has address FF:FF:FF:00:00:00 81.D1 Ic % bthost ff:ff:ff:00:00:00 82.Dl Host FF:FF:FF:00:00:00 has name localhost 83.D1 Ic % bthost -b localhost 84.Dl FF:FF:FF:00:00:00 85.D1 Ic % bthost -b ff:ff:ff:00:00:00 86.Dl localhost 87.D1 Ic % bthost do.not.exists 88.Dl do.not.exists: Unknown host 89.D1 Ic % bthost 0:0:0:0:0:0 90.Dl 00:00:00:00:00:00: Unknown host 91.D1 Ic % bthost -p sdp 92.Dl Protocol/Service Multiplexor sdp has number 1 93.D1 Ic % bthost -p 3 94.Dl Protocol/Service Multiplexor rfcomm has number 3 95.D1 Ic % bthost -bp HID-Control 96.Dl 17 97.D1 Ic % bthost -p foo 98.Dl foo: Unknown Protocol/Service Multiplexor 99.Sh FILES 100.Bl -tag -width "/etc/bluetooth/hosts" -compact 101.It Pa /etc/bluetooth/hosts 102.It Pa /etc/bluetooth/protocols 103.El 104.Sh DIAGNOSTICS 105.Ex -std 106.Sh SEE ALSO 107.Xr bluetooth 3 , 108.Xr bluetooth.hosts 5 , 109.Xr bluetooth.protocols 5 110.Sh AUTHORS 111.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com 112