Bluetoothctlはプロキシを開いたままにします(自動的に再接続)。

Bluetoothctlはプロキシを開いたままにします(自動的に再接続)。

bluetoothctlを使用してデバイス(ジョイスティック)を接続して信頼しました。今まではとても良かった、とても良かった。しかし、bluetoothctlを終了すると、ジョイスティックの電源を切って再びオンにすると再接続されません。

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>

興味深いことに、私は仕事をやめたときに次の事実に気づきました。

[bluetooth]# quit
Agent unregistered

日記で、私は次のメッセージを見ました。

# 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

私が理解したのは、私のデバイスが接続しようとしましたが、接続するプロキシを見つけることができません。

私は何を逃したことがありませんか?プレイするたびにCLIを介してペアリングすることなく自動的に再接続するにはどうすればよいですか?

ありがとうございます!

ベストアンサー1

私も必要です!私が考えることができる唯一のことは、cronjobで実行され、デバイスIDが同じであるため、接続が切断されたときにデバイスに接続しようとするbashスクリプトを作成することです。

また、基本的に私が言及したのと同じことをするGithubのリポジトリを見つけました。

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

おすすめ記事