I want to set up the Bluetooth on boot so I can connect to it whenever I want with a device which is not trusted by the Raspberry Pi Bluetooth. I set up the Bluetooth on boot on my Raspberry Pi this way. In /etc/rc.local, I added :
sudo bluetoothctl <<EOF power on discoverable on pairable on EOF sudo hciconfig hci0 sspmode 0 sudo bt-agent -c NoInputNoOutput -p /root/bluetooth.cfg &
I use a Bluetooth configuration file to secure the Bluetooth connection, more information here
The problem is, after some time (~3 minutes), the discoverable mode is automatically turned OFF and I cannot connect to
Another problem is, after a device connect/disconnect, the discoverable mode is also turned OFF.
Is this possible to keep the discoverable mode ON every time and even if some Bluetooth devices connect/disconnect to the Raspberry ?
Edit: I'm using the Raspberry Pi Model B V1.2