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
931 stars 161 forks source link

Improve model identification and add AirPods Gen3 #147

Closed d4rken closed 1 year ago

d4rken commented 1 year ago

This changes the model check to compare against the full identifier (4 bytes). This prevents models with overlapping IDs from being misidentified. I also added new IDs and classes for AirPods 3rd gen.

This should closes #140.

The full identifiers are from my own AirPods app CAPod.

Sadly for these 3 I don't have the full ID either, so the code is not as clean as it could be and we still need to compare singleId:

The full IDs are based on OpenPods single identifiers, logs from volunteers and random people I met on the street where I could see the type of headphone they were wearing :smile:.

I have tested the code with my AirPods Pro. For the full identifiers you'll have to trust me. I can't guarantee their correctness, but have not gotten any reports about mismatches (yet).

For copy paste errors, compare against: https://github.com/d4rken-org/capod/search?q=DEVICE_CODE

Electric1447 commented 1 year ago

This is great, thank you!