Code: Select all
#!/bin/bash # A check script ot see if the blue tooth has fallen over /usr/bin/l2ping 00:12:12:12:12:12 -c 5 > /tmp/check RESULT=$? if [ $RESULT = 0 ]; then echo OK > /dev/null else echo "Going for a reboot, no Bluetooth ping" | logger -t root -p local5.info mail -s "Bluetooth down" firstname.lastname@example.org < /home/pi/email sleep 10 /sbin/reboot fi
My issue is finding the command to actually connect via a2dp, because using a gui, i can connect and stream audio no problem, but I just can't locate the command to connect automatically.jamiesk wrote:Has the phone been paired from the Pi?
I use BT to connect to my solar invertor. The first part of the script checks that I can "ping" the invertor, as I've seen it not connect properly and its the Pi.
Could you use this to re-initialise the connection to the phone instead of my reboot?
Sorry, I have been using the CLI. I just saw the Pi GUI for the first time yesterday!!!uncrocks wrote:My issue is finding the command to actually connect via a2dp, because using a gui, i can connect and stream audio no problem, but I just can't locate the command to connect automatically.
The pi and my phone are paired and the phone is marked as 'trusted' on the pi.
loluncrocks wrote:P.S. My half-British side couldn't help but notice the way you spelled initialize .
Users browsing this forum: No registered users and 15 guests