bthost(1)

bthost1

Look up bluetooth host names and protocol service multiplexor values

Usage

bthost [-bhp] host_or_protocol

Overview

The bthost utility looks for information about Bluetooth hosts and Protocol Service Multiplexor (PSM) values. It gets this information from the /etc/bluetooth/hosts and /etc/bluetooth/protocols files.

In host mode, it simply converts between the host names and Bluetooth addresses. The argument can be either a host name or a Bluetooth address. The program first attempts to interpret it as a Bluetooth address. If this fails, it will treat it as a host name. A Bluetooth address consists of six hex bytes separated by a colon, e.g., “01:02:03:04:05:06”. A host name consists of names separated by dots, e.g., “my.cell.phone”.

In protocol mode, it simply converts between the Protocol Service Multiplexor names and assigned numbers. The argument can be either a Protocol Service Multiplexor name or an assigned number. The program first attempts to interpret it as an assigned number.

The options are as follows:

-b

Produce brief output.

-h

Display usage message and exit.

-p

Activate protocol mode.

The bthost utility will print results to the standard output, and error messages to the standard error. An output can be quite different, here is an example that demonstrates all of the possibilities:

% bthost localhost
Host localhost has address FF:FF:FF:00:00:00
% bthost ff:ff:ff:00:00:00
Host FF:FF:FF:00:00:00 has name localhost
% bthost -b localhost
FF:FF:FF:00:00:00
% bthost -b ff:ff:ff:00:00:00
localhost
% bthost do.not.exists
do.not.exists: Unknown host
% bthost 0:0:0:0:0:0
00:00:00:00:00:00: Unknown host
% bthost -p sdp
Protocol/Service Multiplexor sdp has number 1
% bthost -p 3
Protocol/Service Multiplexor rfcomm has number 3
% bthost -bp HID-Control
17
% bthost -p foo
foo: Unknown Protocol/Service Multiplexor

Files

/etc/bluetooth/hosts
/etc/bluetooth/protocols

Exit status

The bthost utility exits 0 on success, and >0 if an error occurs.

Releases

52 releases since FreeBSD 5.3-RELEASE; the text changed 33 times.

  1. 5.3–5.5
  2. 6.0–6.3
  3. 6.4
  4. 7.0
  5. 7.1
  6. 7.2
  7. 7.3
  8. 7.4
  9. 8.0
  10. 8.1
  11. 8.2
  12. 8.3
  13. 8.4
  14. 9.0
  15. 9.1
  16. 9.2
  17. 9.3
  18. 10.0
  19. 10.1
  20. 10.2
  21. 10.3
  22. 10.4
  23. 11.0
  24. 11.1
  25. 11.2
  26. 11.3
  27. 11.4
  28. 12.0
  29. 12.1
  30. 12.2
  31. 12.3
  32. 12.4
  33. 13.0–13.2
  34. 13.3–16.0

Authors

Maksim Yevmenkin ⟨[email protected]⟩

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.