TheWeirdDev / Bluetooth_Headset_Battery_Level

A python script to get battery level from Bluetooth headsets
GNU General Public License v3.0
763 stars 80 forks source link

Does not work with Samsung Galaxy Buds #3

Closed superbonaci closed 4 years ago

superbonaci commented 4 years ago

When entering the command with mac address process keeps waiting without any output.

TheWeirdDev commented 4 years ago

Try changing the port number in line 73 from 4 to 3. If it didn't work, try other numbers below 10. The port number is probably varied from one headset to another.

superbonaci commented 4 years ago

With 2,3,4 same thing. 0,1,>4 says ConnectionRefusedError: [Errno 111] Connection refused

TheWeirdDev commented 4 years ago

I assume your device does not support communication through AT commands. But to be sure, you can use this debug script to see if it outputs any useful info:

https://github.com/clst/Bluetooth_Headset_Battery_Level

superbonaci commented 4 years ago

It does not show any debug, just connects earphones to computer yet can't hear sound through them. I have to disconnect and reconnect again from KDE system settings to be able to hear.

TheWeirdDev commented 4 years ago

Well, unfortunately your device is not compatible with this protocol and there's nothing to be done about it. I'm closing this.

Bobo1239 commented 4 years ago

Hm, I also have Samsung Galaxy Buds and I'm at least able to see some AT communication (port 4):

AT+BRSF=923
  +BRSF:20
  OK
AT+CIND=?
  +CIND: ("battchg",(0-5))
  OK
AT+CIND?
  +CIND: 5
  OK
AT+CMER=3,0,0,1
  OK
AT+VGM=7
  OK
AT+VGS=8
  OK
AT+CCWA=1
  OK
AT+SAMSUNG=VID,117,PID,40977,BTVER,R170XXU0ATD3
  OK
AT+SAMSUNG=VR_BTN,0
  OK

Unfortunately it just stops there. Any idea what's going wrong?

TheWeirdDev commented 4 years ago

Seems like Samsung is sending samsung-specific commands. I don't know what it expects to receive or even if it expects to receive anything.

I haven't found any info or documentation about these commands.

superbonaci commented 4 years ago

@TheWeirdDev is there any way I can debug this, for example using android, to see what it sends and receives?

TheWeirdDev commented 4 years ago

@TheWeirdDev is there any way I can debug this, for example using android, to see what it sends and receives?

The latest pull request by @Bobo1239 claims that it adds support for Samsung galaxy buds. Have you tried pulling the new changes and check it again?

superbonaci commented 4 years ago

@TheWeirdDev not yet, cheking in a moment.

superbonaci commented 4 years ago

Finally tested, works perfect. Thank you very much.