toy / blueutil

CLI for bluetooth on OSX: power, discoverable state, list, inquire devices, connect, info, …
https://github.com/toy/blueutil
Other
972 stars 52 forks source link

battery display #34

Closed alanhe421 closed 4 years ago

alanhe421 commented 4 years ago

I've noticed that if it's an apple device, you can see the power in a Bluetooth-managed location.

Can I get power information for these devices?

like this https://gist.github.com/miyagawa/ed22215692e1937ab4bc

toy commented 4 years ago

There is no such functionality in blueutil. There is ioreg which is used at the link you gave and its functionality can probably be reproduced using IOKit, but not sure if non apple devices are giving information. There is also Akku app which I assume is more universal, but looking at ammount of code it is apparently is pretty complex.

alanhe421 commented 4 years ago

I found solution

https://apple.stackexchange.com/questions/328091/airpods-battery-level-with-ioreg