raspberry pi でbluetooth通信を連続1時間超えると接続ができなくなる

raspberry pi4 でbluetooth通信(SPP)を使ってスマホに送信するプログラムを作成しています。
1時間ぐらい常に送受信は問題なく動くのですが、1時間超えるとbluetooth通信の接続ができなくなります。
メニューバーのBluethoothアイコンの色が変わりません。
PGを起動しなおしてもダメでraspberry pi4本体を再起動しない限りダメです。
そこでメニューバーをみるとbluetoothのアイコンが2個あるのですが問題ないのでしょうか?
イメージ説明
あと接続ができなくなるということは
sudo rfcomm listen /dev/rfcomm0 22
プログラムを起動する前に実行しているのですが rfcomm0がrfcomm1 , 2に変わっているということでしょうか?
この変の分かる方がいれば、よろしくお願いいたします。

/etc/systemd/system/dbus-org.bluez.service

[Unit] Description=Bluetooth service Documentation=man:bluetoothd(8) ConditionPathIsDirectory=/sys/class/bluetooth [Service] Type=dbus BusName=org.bluez #ExecStart=/usr/libexec/bluetooth/bluetoothd ExecStart=/usr/libexec/bluetooth/bluetoothd --compat #ExecStartPost=/usr/bin/sdptool add SP ExecStartPost=/usr/bin/sdptool add --channel=22 SP NotifyAccess=main #WatchdogSec=10 #Restart=on-failure CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE LimitNPROC=1 ProtectHome=true ProtectSystem=full [Install] WantedBy=bluetooth.target Alias=dbus-org.bluez.service

コメントを投稿

0 コメント