04-26-2021, 08:30 AM
How can I, using python(3), check if the Bluetooth connection is active and, and if a device is connected?
Thank you for your donation!
Detect if Bluetooth is active/playing using python
|
04-26-2021, 08:30 AM
How can I, using python(3), check if the Bluetooth connection is active and, and if a device is connected?
04-26-2021, 10:42 AM
The active flags are below. "1" = active.
Code: pi@rp2:~ $ moodeutl -q "select * from cfg_system where param like '%active%'" To get the name of a connected Bluetooth device use the command below and parse the output. Code: # No device connected
04-26-2021, 01:08 PM
Is it in any way possible to do this in Python?
04-27-2021, 10:55 AM
For sqlite: https://docs.python.org/3/library/sqlite3.html
For sudo /var/www/command/bt.sh -c, you can use subprocess: https://docs.python.org/fr/3/library/subprocess.html |
« Next Oldest | Next Newest »
|