BTHOST(1)
π BTHOST β the manual, but make it make sense
Okay bestie, so this is BTHOST(1) from the general commands manual, and honestly? It's giving "small utility, big main character energy." It looks up Bluetooth host names and Protocol Service Multiplexor (PSM) values for you. Let's get into it. π¦
β¨ SYNOPSIS β¨
bthost [-bhp] host_or_protocol
That's the whole vibe: one argument, a couple of optional flags, done. π
πΈ DESCRIPTION πΈ
So the bthost utility is literally just out here looking for info about Bluetooth hosts and Protocol Service Multiplexor (PSM) values. Where does it get that info? From /etc/bluetooth/hosts and /etc/bluetooth/protocols, bestie. Those two files are the source of truth. π
In host mode, it simply converts between host names and Bluetooth addresses. The argument can be either a host name or a Bluetooth address. Here's the order it does things: the program first attempts to interpret it as a Bluetooth address. If that 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 β cute, right? And a host name consists of names separated by dots, e.g. my.cell.phone. π
In protocol mode, it simply converts between Protocol Service Multiplexor names and assigned numbers. The argument can be either a Protocol Service Multiplexor name or an assigned number. And the order here? The program first attempts to interpret it as an assigned number. iykyk. π₯
The options are as follows β and there are literally only three, so no excuses:
-bβ Produce brief output. (Short king behavior. π)-hβ Display usage message and exit. (It's giving "help me help you". π)-pβ Activate protocol mode. (Flip the switch, bestie. π)
The bthost utility will print results to the standard output, and error messages to the standard error. And an output can be quite different β here is an example that demonstrates all of the possibilities. Not me being obsessed with how clean this is π:
% 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
See how the flag combos stack? -bp is literally the moment. π
π FILES π
/etc/bluetooth/hosts/etc/bluetooth/protocols
These two are the whole support system. Protect them at all costs. π«Ά
π EXIT STATUS π
The bthost utility exits 0 on success, and >0 if an error occurs. So if you see a zero, you ate. If not, something's off and the program is telling you. π
π¦ SEE ALSO π¦
Go read those if you want the full lore. No cap. β¨
π AUTHORS π
Maksim Yevmenkin <m_evmenkin@yahoo.com> β the icon who made this happen. Periodt. π
Fr fr, that's the whole page. Nothing skipped, nothing guessed. The vibes are new, the facts are exactly the same. π§
Debian Β· May 8, 2003 β okay that's the source and the date, and this is me signing off, bestie. Go look up some Bluetooth hosts. Slay. π πΈ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2003 Maksim Yevmenkin <m_evmenkin@yahoo.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms