freebsd-src/usr.bin/bluetooth/bthost/bthost.1
Maksim Yevmenkin 0986ab12e4 Update Bluetooth code.
Reviewed by: M. Warner Losh <imp@bsdimp.com>; John Hay <jhay@freebsd.org>
Approved by: M. Warner Losh <imp@bsdimp.com> (mentor)
2003-10-12 22:04:24 +00:00

112 lines
3.7 KiB
Groff

.\" Copyright (c) 2003 Maksim Yevmenkin <m_evmenkin@yahoo.com>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: bthost.1,v 1.7 2003/05/21 22:19:00 max Exp $
.\" $FreeBSD$
.\"
.Dd May 8, 2003
.Dt BTHOST 1
.Os
.Sh NAME
.Nm bthost
.Nd look up Bluetooth host names and Protocol Service Multiplexor values
.Sh SYNOPSIS
.Nm bthost
.Op Fl bhp
.Ar host_or_protocol
.Sh DESCRIPTION
The
.Nm
utility looks for information about Bluetooth hosts and
Protocol Service Multiplexor (PSM) values.
It gets this information from the
.Pa /etc/bluetooth/hosts
and
.Pa /etc/bluetooth/protocols
files.
.Pp
In host mode it simply converts between host names and Bluetooth addresses.
The argument can be either host name or Bluetooth address.
The program first attempts to interpret it as Bluetooth address.
If this fails, it will treat it as host name.
A Bluetooth address consists of six hex bytes sparated by column,
e.g. 01:02:03:04:05:06.
A host name consists of names separated by dots, e.g. my.cell.phone.
.Pp
In protocol mode it simply converts between Protocol Service Multiplexor names
and assigned numbers.
The argument can be either Protocol Service Multiplexor name or assigned number.
The program first attempts to interpret it as assigned number.
.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl b
Produce brief output.
.It Fl h
Display usage message and exit.
.It Fl p
Activate protocol mode.
.El
.Pp
The
.Nm
utility will print results to the standard output and error messages to the
standard error.
You may see output of different kinds.
Here is an example that shows all of them:
.Pp
.D1 Ic % bthost localhost
.Dl Host localhost has address FF:FF:FF:00:00:00
.D1 Ic % bthost ff:ff:ff:00:00:00
.Dl Host FF:FF:FF:00:00:00 has name localhost
.D1 Ic % bthost -b localhost
.Dl FF:FF:FF:00:00:00
.D1 Ic % bthost -b ff:ff:ff:00:00:00
.Dl localhost
.D1 Ic % bthost do.not.exists
.Dl do.not.exists: Unknown host
.D1 Ic % bthost 0:0:0:0:0:0
.Dl 00:00:00:00:00:00: Unknown host
.D1 Ic % bthost -p sdp
.Dl Protocol/Service Multiplexor sdp has number 1
.D1 Ic % bthost -p 3
.Dl Protocol/Service Multiplexor rfcomm has number 3
.D1 Ic % bthost -bp HID-Control
.Dl 17
.D1 Ic % bthost -p foo
.Dl foo: Unknown Protocol/Service Multiplexor
.Sh FILES
.Bl -tag -width "/etc/bluetooth/hosts" -compact
.It Pa /etc/bluetooth/hosts
.It Pa /etc/bluetooth/protocols
.El
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
.Xr bluetooth 3 ,
.Xr bluetooth.hosts 5 ,
.Xr bluetooth.protocols 5
.Sh AUTHORS
.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com