Skip to content
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

Connection refused for BLE_ATH-M50xBT #47

Open
Vrizkag opened this issue Jan 19, 2021 · 7 comments
Open

Connection refused for BLE_ATH-M50xBT #47

Vrizkag opened this issue Jan 19, 2021 · 7 comments

Comments

@Vrizkag
Copy link

Vrizkag commented Jan 19, 2021

bluetooth_battery 00:0A:45:0B:5C:5C
00:0A:45:0B:5C:5C is offline [Errno 111] Connection refused

Then i tried this:

bluetooth_battery 00:0A:45:0B:5C:5C.1
00:0A:45:0B:5C:5C is offline [Errno 16] Device or resource busy

Before that, I went into bluetoothctl to get the correct address

[BLE_ATH-M50xBT]# info
Device 00:0A:45:0B:5C:5C (public)
	Name: BLE_ATH-M50xBT
	Alias: BLE_ATH-M50xBT
	Class: 0x00240418
	Icon: audio-card
	Paired: yes
	Trusted: yes
	Blocked: no
	Connected: yes
	LegacyPairing: no
@TheWeirdDev
Copy link
Owner

TheWeirdDev commented Jan 19, 2021

I'm not sure what's the reason. Disconnect your device first, then run the script again while disconnected. This works for some devices.

@cheriimoya
Copy link
Contributor

cheriimoya commented Jan 25, 2021

did you try to rerun the script @Vrizkag? like in executing the same command twice?
i.e.

$ bluetooth_battery 00:0A:45:XX:XX:XX
00:0A:45:XX:XX:XX is offline [Errno 111] Connection refused

$ bluetooth_battery 00:0A:45:XX:XX:XX
Battery level for 00:0A:45:XX:XX:XX is 80%

@isalgueiro
Copy link

Got the same problem using different device, let me know if you rather have a separate issue for this 876964 headset.

( 876964 is this headset model name 🤷 )

[876964]# info E9:08:EF:93:XX:XX
Device E9:08:EF:93:XX:XX (public)
        Name: 876964
        Alias: 876964
        Class: 0x00240404
        Icon: audio-card
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)

With the headset connected (script exits in less than 1s, it returns this error every time I run it):

╰─ bluetooth_battery E9:08:EF:93:XX:XX
E9:08:EF:93:XX:XX is offline [Errno 111] Connection refused

With the headset disconnected

╰─ bluetooth_battery E9:08:EF:93:XX:XX
Couldn't find the RFCOMM port number
E9:08:EF:93:XX:XX is offline [Errno 112] Host is down

@oesst
Copy link

oesst commented May 12, 2021

+1
Same error with a Bose quietcomfort 35.

The command journalctl -f -o cat /usr/bin/gnome-shell prints out:

Bluetooth battery indicator: 28:11:XXXXXX is offline (16, 'Device or resource busy')
Bluetooth` battery indicator: 28:11:XXXXXXis offline (111, 'Connection refused')

@eqaderi
Copy link

eqaderi commented Jun 13, 2021

I have the same issue with my headset, I'm on Ubuntu 20.04.2

@pipapu
Copy link

pipapu commented Oct 12, 2021

I have the same issue on Ubuntu (5.4.0-89-generic #100-Ubuntu SMP) with a Bowers & Wilkins headphone. Battery level is reported correctly after a reboot, but after the first suspend I get the same behaviour ("Errno 111") as described above.

Oh, and I found these lines repeated over and over in /var/log/syslog:
Oct 12 20:37:01 XXX gnome-shell[6989]: Usage of object.actor is deprecated for Indicator#012get@resource:///org/gnome/shell/ui/environment.js:287:29#012_refresh@/home/axel/.local/share/gnome-shell/extensions/[email protected]/extension.js:80:13#012_runLoop@/home/pipapu/.local/share/gnome-shell/extensions/[email protected]/extension.js:47:14
Oct 12 20:37:02 XXX gnome-shell[6989]: Bluetooth battery indicator: Battery level for B0:67:2F:1B:A9:6D is 100%

So, actually the battery level is correctly reported by the device. Perhaps the deprecate warning is not correctly interpreted by bluetooth_battery?

@talhajunaidd
Copy link

I can confirm that after a restart, battery status is reported correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants