/usr.bin/bluetooth/bthost/bthost.1

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 115 lines · 115 code · 0 blank · 0 comment · 0 complexity · 4836a58308cd2ded711ac93f89a47535 MD5 · raw file

  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
  39. The
  40. .Nm
  41. utility looks for information about Bluetooth hosts and
  42. Protocol Service Multiplexor (PSM) values.
  43. It gets this information from the
  44. .Pa /etc/bluetooth/hosts
  45. and
  46. .Pa /etc/bluetooth/protocols
  47. files.
  48. .Pp
  49. In host mode, it simply converts between the host names and Bluetooth addresses.
  50. The argument can be either a host name or a Bluetooth address.
  51. The program first attempts to interpret it as a Bluetooth address.
  52. If this fails, it will treat it as a host name.
  53. A Bluetooth address consists of six hex bytes separated by a colon,
  54. e.g.,
  55. .Dq Li 01:02:03:04:05:06 .
  56. A host name consists of names separated by dots, e.g.,
  57. .Dq Li my.cell.phone .
  58. .Pp
  59. In protocol mode, it simply converts between the Protocol Service Multiplexor
  60. names and assigned numbers.
  61. The argument can be either a Protocol Service Multiplexor name or
  62. an assigned number.
  63. The program first attempts to interpret it as an assigned number.
  64. .Pp
  65. The options are as follows:
  66. .Bl -tag -width indent
  67. .It Fl b
  68. Produce brief output.
  69. .It Fl h
  70. Display usage message and exit.
  71. .It Fl p
  72. Activate protocol mode.
  73. .El
  74. .Pp
  75. The
  76. .Nm
  77. utility will print results to the standard output, and error messages to the
  78. standard error.
  79. An output can be quite different,
  80. here is an example that demonstrates all of the possibilities:
  81. .Bd -literal -offset indent
  82. % bthost localhost
  83. Host localhost has address FF:FF:FF:00:00:00
  84. % bthost ff:ff:ff:00:00:00
  85. Host FF:FF:FF:00:00:00 has name localhost
  86. % bthost -b localhost
  87. FF:FF:FF:00:00:00
  88. % bthost -b ff:ff:ff:00:00:00
  89. localhost
  90. % bthost do.not.exists
  91. do.not.exists: Unknown host
  92. % bthost 0:0:0:0:0:0
  93. 00:00:00:00:00:00: Unknown host
  94. % bthost -p sdp
  95. Protocol/Service Multiplexor sdp has number 1
  96. % bthost -p 3
  97. Protocol/Service Multiplexor rfcomm has number 3
  98. % bthost -bp HID-Control
  99. 17
  100. % bthost -p foo
  101. foo: 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 m_evmenkin@yahoo.com