-
Notifications
You must be signed in to change notification settings - Fork 80
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
Problem with Device is Offline error #58
Comments
Does it work on the older gnome desktop, like 3.38. I faced the same error. |
Used to work for me as well, now I get this.
|
I think it's not compatible with some devices |
same here |
Hi, try connecting to a different port. For example bluetooth_battery.py E8:AB:FA:27:9F:49.1 |
@Kronodile That didn't help for me, but |
i also have this issue |
same here, but the battery queries did not work afterwards |
This is what worked for me |
This worked for me too |
I am observing the same problem after upgrading to Ubuntu 21.10. To be clear, the Gnome extension that uses this script — and, therefore, presumably, the script itself — used to work just fine with Ubuntu 21.04 up until I upgraded to Ubuntu 21.10. Now, if I connect my Bluetooth headphones and run the script, it gives the following error:
If I try manually specifying ports from 1 to 30, it gives the same error with port 4, and with any other port is gives the following error:
If I disconnect the headphones and run the script, then it suddenly works! But, unlike reported by others above, this does not fix the issue for me. If I run the script while the headphones are disconnected, it successfully returns a charge level, and the headphones say, “Bluetooth disconnected,” and remain disconnected. It seems that the script briefly connects to the headphones, requests the charge level, and then disconnects. If I then reconnect the headphones, the script still gives the same error while the headphones are connected. Interestingly, this problem appears to be somewhat intermittent: while testing again in order to write this comment, for a brief moment the script actually managed to work correctly and report the battery charge level while the headphones were connected! I wasn’t able to reproduce this, though; the scenario I described above is still the only thing that happens reliably. |
I also faced the problem, for some devices (my headphone atleast), it fails to establish a connection, I wrote this script to do the same, just disconnect for a moment, check battery, then connect back again (if you don't want to, edit it to add some, say a flag): #!/usr/bin/python
import re
import sys
import os
from bluetooth_battery.bluetooth_battery import main
if __name__ == '__main__':
os.system("bluetoothctl disconnect "+ sys.argv[1])
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
main()
os.system("bluetoothctl connect "+ sys.argv[1]) And save it as 'bluetooth_battery' in ~/.local/bin... done :D |
When I want to get my headphone battery I Get this error
<Device MAC> is offline [Errno 16] Device or resource busy
And please update gnome extension for gnome 40
The text was updated successfully, but these errors were encountered: