site  contact  subhomenews

What is a Bluetooth agent?

October 29, 2020 — BarryK

I want to post a link here, as it somewhat improved my understanding of what a Bluetooth agent is...

As posted a couple of days ago, I have been working on a new BluePup:

The main problem I had with it at that time, was it ran 'bluetoothctl' interactively, and parsed the log of response strings to detect success or otherwise of each operation, and to wait on completion of each operation. This is English-centric, but I wanted 'bluetoothctl' to output non-English messages -- hence Iinternationalized bluetoothctl:

And I rewrote BluePup to use 'bluetoothctl' non-interactively, so don't have to parse response-strings. That is, a command is entered on the commandline when invoke 'bluetoothctl' and it exits immediately after executing the command.

However, I didn't understand what an "agent" is, and in particular, didn't understand that 'bluetoothctl' running in interactive-mode is the agent. So, in non-interactive mode, as soon as 'bluetoothctl' exits, so does the agent.

The light came on when I read this page: has given me a clue how to proceed, running 'bluetoothctl' non-interactively. 

Tags: easy