My particular use case is to detect, inside a shell script, if there is any bluetooth hardware at all.
Since 'bluetoothctl' systematically hangs when there is NO bluetooth hardware, I can NOT use the 'bluetoothctl' command to achieve this use case.
But I have found a good alternate method :
if rfkill list | grep -q -i Bluetooth; then ...; fi
So, the issue is NOT blocking for me.
But I suggest that 'man bluetoothctl' should indicate that 'bluetoothctl' waits (possibly indefinitely) for answers from the 'bluetoothd' daemon, and therefore is NOT adequate for scripting.
My particular use case is to detect, inside a shell script, if there is any bluetooth hardware at all.
Since 'bluetoothctl' systematically hangs when there is NO bluetooth hardware, I can NOT use the 'bluetoothctl' command to achieve this use case.
But I have found a good alternate method :
if rfkill list | grep -q -i Bluetooth; then ...; fi
So, the issue is NOT blocking for me.
But I suggest that 'man bluetoothctl' should indicate that 'bluetoothctl' waits (possibly indefinitely) for answers from the 'bluetoothd' daemon, and therefore is NOT adequate for scripting.