d4rken-org / capod

A companion app for AirPods on Android.
https://play.google.com/store/apps/details?id=eu.darken.capod
GNU General Public License v3.0
526 stars 45 forks source link

Airpods Max are always detected as on ear #106

Closed SavvySphynx closed 1 year ago

SavvySphynx commented 1 year ago

See title. I've been unable to find an app that can detect when my airpods leave my head, so it might not be doable.

d4rken commented 1 year ago

Not sure if it's possible, I don't own AirPods Max to text with. Does any of the raw data change (enable debug mode)?

SavvySphynx commented 1 year ago

I did a screen recording to show it in action.

https://user-images.githubusercontent.com/127359443/224079732-fcc27b18-81a9-4104-a814-f0118248dfb8.mp4

d4rken commented 1 year ago

The 6th value is used by other AirPods to encode the wear status. Here it changes from 03 to 23. Is this reproducible? Which number is shown when you wear the headphones and when not?

d4rken commented 1 year ago

So 0b00100011 (0x23) vs 0b00000011 (0x03)

SavvySphynx commented 1 year ago

Yes, it shows the same here 03 when worn, 23 when not. It changes several other values as well.

d4rken commented 1 year ago

Yes, it shows the same here 03 when worn, 23 when not.

:+1:

It changes several other values as well.

The second part of the values are encrypted, only apple knows how to read that, no one figured out how to decode it on Android.

d4rken commented 1 year ago

Please report back after the next release :slightly_smiling_face:

steam3d commented 1 year ago

Here is my data and data from this issue

Worn Not worn
22 02
24 04
03 23

Looks likes you can't just .isBitSet(5)), because it least at one case it will be broken. I haedcoded in my application values because I did not find clear pattern. Maybe better to make the same here

https://github.com/steam3d/MagicPods-Windows/issues/323