org.bluez.AgentManager(5)

πŸŽ€ NAME πŸŽ€

okay so this is the org.bluez.AgentManager(5) page β€” Linux System Administration edition β€” and it's literally the BlueZ D-Bus AgentManager API documentation. bestie, we're getting into pairing-agent territory and it's giving main character energy πŸ’…βœ¨


🌸 INTERFACE 🌸

Here's the vibe check on where this interface lives and who uses it:

  • Service β€” org.bluez
  • Interface β€” org.bluez.AgentManager1
  • Object path β€” /org/bluez
  • Used by β€” bluetoothctl(1)

🫢 METHODS 🫢

πŸ’« void RegisterAgent(object agent, string capability)

Registers a pairing agent. slay.

The object path you pass defines the path of the agent that will be called when user input is needed β€” and that agent must implement the org.bluez.Agent(5) interface. no cap.

Every application can register its own agent, and for all actions triggered by that application, its agent is used. πŸ’–

Apps are not required to register an agent. If an application chooses not to register an agent, the default agent is used β€” and in most cases that's a good idea. Only apps like a pairing wizard should register their own agent.

An application can only register one agent. Multiple agents per application is not supported. periodt.

Possible capability values:

  • "" β€” fallback to "KeyboardDisplay".
  • "DisplayOnly"
  • "DisplayYesNo"
  • "KeyboardOnly"
  • "NoInputNoOutput"
  • "KeyboardDisplay"

Possible errors:

  • org.bluez.Error.InvalidArguments
  • org.bluez.Error.AlreadyExists

Examples:

bluetoothctl
> agent <on/off/auto/capability>

πŸ¦‹ void UnregisterAgent(object agent)

Unregisters an agent that has been previously registered using RegisterAgent.

The object path parameter must match the same value that has been used on registration. yep, exact same path β€” no switching it up πŸ™ˆ

Possible errors:

  • org.bluez.Error.DoesNotExist

πŸ‘‘ void RequestDefaultAgent(object agent)

Requests to make the application agent the default agent. The application is required to register an agent first.

⚠️ special permission might be required to become the default agent.

Possible errors:

  • org.bluez.Error.DoesNotExist

Examples:

bluetoothctl
> default-agent

mwah πŸ’‹ β€” source/version: BlueZ, date: October 2023. this was org.bluez.AgentManager(5), and yes, she ate. πŸŽ€βœ¨

πŸ“¦ where this page comes from