¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Rig Bluetooth Connection Status on Conky-Is it Possible? #draws #ft818 #bluetooth #conky


 

This is way low on the priority, but has anyone figured a way to show connection status of Bluetooth adapter on a rig on the Conky? I am running a DRAWS Hat with BAP 3.0.8 and finally have almost everything working with my FT-818ND (still have not made an ARDOP connection yet). Last wish list thing is to be able to glance at the Conky and see if the BT connection to the radio is connected or not.?
I have found that from terminal window I can enter bluetoothctl info 98:D3:31:F7:55:37 and it returns
Device 98:D3:31:F7:55:37 (public)
Name: SPP-CA
Alias: SPP-CA
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Serial Port ? ? ? ? ? ? ? (00001101-0000-1000-8000-00805f9b34fb)

Is there a way to parse out that "Connected: yes" and put it in an IF statement in the Conky like the check to see if a app or service is running?


 

On Thu, Sep 2, 2021 at 11:17 AM, Chris wrote:
bluetoothctl info 98:D3:31:F7:55:37
I haven't played with this and can't say specific for Conky but to parse the data you could use:
bluetoothctl info 98:D3:31:F7:55:37 | grep Connected
which should just show you the connected statement. Taking it one step more:
bluetoothctl info 98:D3:31:F7:55:37 | grep Connected | awk '{ print $2 }'
should leave you with yes or no.

Hope that helps
?
--
73, de KM4ACK
|
|


 

?Something like these lines in .conkyrc in your home directory should work:

${if_match ${exec bluetoothctl info 98:D3:31:F7:55:37?| grep "Connected: yes"} == "Connected:yes" ${color green}BluetoothConnected! \
$else \
${color red}{blink?'Bluetooth Disconnected!'}
${endif}

I say "Something like" because I haven't tested this and almost certainly the format is a little off. But maybe this is enough to get you started.? I don't use Bluetooth on my Pi so can't test it out myself without adding a bluetooth device. You probably have to troubleshoot the above code to get it to actually work.?