This is, at least, what Google Pixel Buds use to report left, right, and case battery status. Also, extend the BatteryStateQuerier class to support returning more than one value, and I added logging support (mostly for my debugging convenience).
I figured that out by enabling BT snoop logs on my phone. The protocol is simple, and data is sent from the headset automatically on connection (and regularly when the battery level changes). Once I figured out which UUID the channel/port corresponded to, I found out it is Google's Nearby/Fastpair protocol (https://developers.google.com/nearby/fast-pair/landing-page). The protocol documentation doesn't appear to be public, but information can be gathered from opensource code.
Only tested with Google Pixel Buds A-series. I believe some BT speakers use that protocol as well.
This is, at least, what Google Pixel Buds use to report left, right, and case battery status. Also, extend the BatteryStateQuerier class to support returning more than one value, and I added
logging
support (mostly for my debugging convenience).I figured that out by enabling BT snoop logs on my phone. The protocol is simple, and data is sent from the headset automatically on connection (and regularly when the battery level changes). Once I figured out which UUID the channel/port corresponded to, I found out it is Google's Nearby/Fastpair protocol (https://developers.google.com/nearby/fast-pair/landing-page). The protocol documentation doesn't appear to be public, but information can be gathered from opensource code.
Only tested with Google Pixel Buds A-series. I believe some BT speakers use that protocol as well.