-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow controlling bluetooth with a bluez #127
Comments
I added bluetoothctl as an option for controlling bluetooth to the |
Excellent!! There were a couple of small bugs I've found so far, that I've resolved / worked around in this patch (feel free to improve further or whatever):
Without the small delay between changing power and getting status, this app was reporting the wrong status most of the time. Hardcoding a delay like this isn't great... This also fixes a bug where rfkill was still run when bluetoothctl was able to successfully power off the device. |
bluez can generally be used by non-root users without having to add udev rules / access /dev/rfkill directly. there's a dbus API but I don't see any obvious methods for managing BT adapter power... but using
bluetoothctl
directly (e.g.bluetoothctl power on/off
for the default adapter) would be a simple option too I think.The text was updated successfully, but these errors were encountered: