2022年12月29日 星期四

ubunth bluez problem

1. prepare

apt install python3-bluez

2. for python 3.10 

pip install git+https://github.com/pybluez/pybluez

3. about battery

PauseAudio enable Battery info in 2022 (?)

pactl list cards | grep battery will show battery percentage

also show in /var/log/syslog like this

  pulseaudio[1226]: Battery Level: 100% 

for unknown periods

2023/01/07 modified : ignore anything about "-E" or Experimental option, don't care about complain in syslog, just look syslog, or "pactl list cards" to get battery level

with "-E" option, or use blueman "battery option" , the red power indicator always show on indicator area, anonnying!


and it complain about "Could not find org.bluez.BatteryProviderManager1.RegisterBatteryProvider(), is bluetoothd started with experimental features enabled (-E flag)?" even if modify daemon script to start with -E.

sudo vi /etc/systemd/system/bluetooth.target.wants/bluetooth.service

sudo systemctl daemon-reload

sudo systemctl restart bluetooth

the battery report seems related to this "-E flag", not sure