1

I connected a device (a joystick) using bluetoothctl and trusted it. So far so good, everything works. But if I quit bluetoothctl power the joystick off and power it on again, it won't reconnect...

Here step-by-step what I do in the bluetoothctl cli:

[bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# power on
[bluetooth]# discoverable on
[bluetooth]# pairable on
[bluetooth]# scan on
[bluetooth]# connect <device_addr>
[bluetooth]# trust <device_addr>

Funny thing is that I noticied this when I quit :

[bluetooth]# quit
Agent unregistered

And in the journal I am seeing this message :

# journalctl -u bluetooth -n50
[...]
Mar 05 12:27:30 hostname bluetoothd[522]: No agent available for request type 0
Mar 05 12:27:30 hostname bluetoothd[522]: device_request_pin: Operation not permitted

So as far as I understand my device tries to connect but it cannot find an agent to connect.

Am I missing something? What am I supposed to do to be able to reconnect automagically without pairing through the CLI everytime I want to play?

Thanks!

Jesus_21
  • 111
  • 3

1 Answers1

0

I also need it too! Only thing i can think of is creating a bash script which is running as a cronjob and tries to connect to device if it is disconnected since the device IDs are the same.

Also i've found a repository on Github which is doing basically the same thing that i ve mentioned.

https://github.com/noraworld/bluetoothctl-autoconnector