TheWeirdDev / Bluetooth_Headset_Battery_Level

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

Sony WH-1000XM4 #53

Closed pfmephisto closed 3 years ago

pfmephisto commented 3 years ago

With the Sony WH-1000XM4, the script seems to get stuck in the while loop. https://github.com/TheWeirdDev/Bluetooth_Headset_Battery_Level/blob/91325e13f0c3dce39b8f17a22684c0853cd7a038/bluetooth_battery.py#L111 I don't see any error messages until I manually force quit it. My assumption is that the WH-1000XM4 might either require other values to be sent first or there is another variable to be read.

I will try to debug it further and in case I'll find out more will post it here.

ErebusBat commented 3 years ago

Have you tired different ports? My XM3 requires port 10.

GinTR1k commented 3 years ago

Have you tired different ports? My XM3 requires port 10.

I have the Sony WH-1000XM4 too, and i've have tried 1-30 ports and nothing. Sometimes the error messages “Device or resource is busy” or "Operation now in progress" appeared.

pfmephisto commented 3 years ago

I'm not sure what changed since. But for me it works now if I first disconnect the headphones using bluetoothctl