Is it possible to "authorize service" using pybluez?

Viewed 265

If I pair a bluetooth device to my PC but I don't trust it, any time I power on the bluetooth device I will get a prompt like this in bluetoothctl:

Authorize service
[agent] Authorize service 0000111f-0000-1000-8000-00805f9b34fb (yes/no):

If I type yes, the device is allowed to connect.

I would like to write a small Python script that watches for new services and prompts me to authorize them using inotify-send, and pybluez seems like the tool for the job. However, after reading the documentation, I can't figure out if this is even possible. (Probably in large part because I'm not familiar with technical Bluetooth terminology.)

Is it possible to watch for- and authorize services using pybluez, and if so, how?

0 Answers
Related