bt-agent(1)

πŸ’– bt-agent β€” the whole entire manual ✨

okay bestie, quick vibe check before we dive in: this page is bt-agent, and it lives in the bluez-tools family. yes the manual name is bt-agent even though the NAME section is gonna say something else, we'll get to that, i promise, it's giving typo energy and we're gonna be normal about it 🫢


πŸŽ€ NAME

bt-adapter β€” a bluetooth agent

not me clocking that the NAME line says bt-adapter when literally everything else on this page is about bt-agent πŸ™ˆ i am simply reporting what the page says, i do not make the rules, i just read them out loud with my whole chest πŸ’…

πŸ¦‹ SYNOPSIS

bt-agent [OPTION...]

Help Options:

  -h, --help

Application Options:

  -c, --capability=<capability>
  -p, --pin
  -d, --daemon

🌸 DESCRIPTION

this one is an interactive utility, and its whole job is managing incoming Bluetooth requests. we're talking stuff like a request for a pincode, a request to authorize a connection, a request to authorize a service request, etc. etc. πŸ¦‹

like... it's the little agent standing at the door being like "mm, do we let this one in?" and honestly? main character energy, no notes ✨


✨ OPTIONS ✨

  • -h, --help β€” shows you the help. that's it, that's the whole thing, iconic behavior 🌈
  • -c, --capability <capability> β€” you're telling it what the agent's input and output capabilities are. capability has to be one of these four, and there is no fifth one, don't try it:
    • DisplayOnly
    • DisplayYesNo (this one is the default)
    • KeyboardOnly
    • NoInputNoOutput

and fr fr, if you don't define this option at all, DisplayYesNo is what you get. so if you wanted a different vibe you GOTTA say so out loud, bestie πŸ’…

  • -p, --pin <file path> β€” point it at a file holding a list of authorization codes, one per device, matched up by name or by mac address πŸ‘‘

the contents of that file should be in this format:

AA:BB:CC:DD:EE:FF    123456
RemoteDeviceName     *         (accept any pin code)

so here's the tea: if a pin file is in the mix, it checks the passkey of the pairing device against the key sitting in that file. if the key matches β†’ it authorizes the device automatically, zero drama, slay. if it doesn't match β†’ it comes back to you and asks for manual authorization. you're the final boss, congrats πŸŽ€

  • -d, --daemon β€” runs the agent as a background process (as a daemon) πŸŒ™

in this mode the agent relies on a pin file and requests no manual user authorization at all. so any device that tries to pair without a valid passkey defined in the pin file? automatically rejected. no consultation, no asking, just a firm no thank you πŸ’€

heads up bestie: --daemon means the human is officially out of the loop. the pin file is doing ALL the deciding. make sure it's right πŸ™ˆ

πŸ‘‘ AUTHOR

Alexander Orlenko <zxteam@gmail.com>.


🌈 SEE ALSO


okay that's the whole page, you ate that 🫢 this was bluez-tools bt-agent, dated 2014-08-03, and it remains lowkey iconic to this day. go forth and pair responsibly, bestie πŸ’–βœ¨πŸŽ€πŸ¦‹