我使用的蓝牙耳机使用蓝牙版本4.1。当我连接到android时,它会显示电池状态。但是使用Linux(Ubuntu18.04)我无法获得电池状态。我试过了 bluetoothctl ,正在查找文件 /sys/class/power_supply
bluetoothctl
/sys/class/power_supply
askubuntu.com/questions/53880/is-there-any-way-to-check-the-battery-percentage-of-apple-wireless-peripherals
stackoverflow.com/questions/49078659/check-battery-level-of-connected-bluetooth-device-on-linux
我的蓝牙设备不使用GATT配置文件。它使用A2DP接收器进行音频流传输。
我看了Bluez的文档。他们都说是做关贸总协定的概况和属性。
有没有一种方法可以正确地读取Linux中的电池状态(即使是实用的)?android设备如何获得电池状态?这是Linux蓝牙协议栈的一个弱点吗?