adolfintel / OpenPods

The Free and Open Source app for monitoring your AirPods on Android
https://fdossena.com/?p=openPods/index.frag
GNU General Public License v3.0
977 stars 166 forks source link

Case status while charging? #5

Closed adolfintel closed 5 years ago

adolfintel commented 5 years ago

According to #4, AirPods are supposed to show the charge status of the case while it's charging, even if the case is empty.

In my own testing and reverse engineering, I noticed that my AirPods send the case charge status only when there's at least 1 pod in the case, otherwise they just report the case as disconnected. My AirPods also don't show any difference in the data that they send when the case is charging compared to when it's not, so I was unable to identify where this additional case charge status is.

Despite my best efforts, I was unable to figure this one out, so if you're willing to try, the code that decodes the AirPods status beacons is in PodsService.java, and it is fully documented.

If you can figure this out, I am willing to reward you :)

AeliusSaionji commented 5 years ago

There's been a misunderstanding.

The case itself does not have a transmitter- it is true that airpods need to be inside the case for you to check the battery status.

My issue is about getting the battery status of the case while the case is closed.

adolfintel commented 5 years ago

Oh fuck me, I just spent a hour looking at useless data sent by those bloody things

adolfintel commented 5 years ago

Now I understand, the app is programmed to only show the status when airpods are connected (connected as bluetooth headphones, not just paired). I can remove this restriction but you might receive status beacons from other airpods around you if they're close enough, because there's no way on android to tell your set of airpods from the set of the guy sitting next to you on the bus

AeliusSaionji commented 5 years ago

I think that's fine.

AeliusSaionji commented 5 years ago

Would you be able to implement this conditionally? Prefer receiving battery status from connected airpods. If no airpods are connected, then search for status beacons.

adolfintel commented 5 years ago

Nope. Due to a crappy limitation in Android, I have no way to distinguish between the connected airpods, and the ones of the guy sitting next to you on the bus. If I remove the current restriction it would pick up signals from people around you. It's stupid, I know.