Repository navigation
Conversation
…ng broadcast Some AirPods broadcast a frozen BLE advert (e.g. case stuck at 10% while AAP reports 95%). Cached AAP readings now record their source, and for 30 minutes a BLE value that disagrees with one by more than a decile is skipped in favour of the cached AAP value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the PR, will try to review it ASAP |
|
Not merging this as is. If the phone's AAP session drops while the pods or case charge, the fresh BLE level gets replaced by the older AAP value for up to 30 minutes. The cached label never shows while BLE is live, so it looks current. Can you attach a CAPod debug log covering the stuck period? I'd like to see the raw advert and AAP battery lines over time first. |
|
Here is a redacted log with raw advert data captured from CAPods, I held the AirPod case near my Android, slowly opened the lid, waited for the popup to appear, Checked the case charge number - it read 10%, and then slowly closed the lid, Stopping the capture afterwards. I should have checked the ACTUAL charge of the case, but I did not think of that. I know it isn't 10% charge though. |
|
Follow-up: I checked the case on my MacBook Pro 2019. It reads 62%. The log above shows the advert at 10% (case nibble 1 in Note: the AAP session in this log never got past HANDSHAKING (batteries={}, 3 failed |
|
The log shows why this can't help here: the phone's AAP session never gets past the first response (3 attempts, no battery update), so there's never an AAP value to prefer. With the PR applied the popup would still show 10%. The capture you offered would help most: pods out of the case, playing audio from the phone, Bluetooth off on the Mac. |
|
I have got another log for you, doing what you asked. I disabled Bluetooth on Mac, connected to my Android, enabled debug logging in CAPod, opened the case, took the AirPods out, played some random video with them out on my desk. Here is another redacted log file of that run - |
|
Not merging this. Your pods don't behave like genuine AirPods Pro 2: after connecting they send no device info or settings, never answer the key request, and the encrypted part of the advert barely changes across days. The public advert also claims both pods are in the case and charging while AAP reports them in your ears. The PR would only cover the first 30 minutes after an AAP session, and for genuine pods it would hide fresh BLE levels after recharging. CAPod shows what the device broadcasts, so there won't be a workaround. The serial can be checked at checkcoverage.apple.com. |
|
You were right. I checked the serials at checkcoverage.apple.com: the one printed in the case lid isn't valid, and the one the pods report over Bluetooth has been deactivated. Together with what you found in the logs, these look counterfeit, so the frozen case level comes from the pods themselves, not CAPod. Thank you for taking the time to go through both logs and explain what they showed. Closing this. |
What changed
On some AirPods the public Bluetooth broadcast gets stuck on an old case level (for example 10%) while the case is actually near full. When the phone wasn't holding the AirPods' paired connection (e.g. they were connected to a Mac), CAPod showed that stuck value. CAPod now keeps showing the last accurate reading from the paired connection, marked as cached with its age, for up to 30 minutes when the broadcast disagrees with it.
Technical Context
07 19 01 14 20 75 AA 31 33 00 10 …) for 15+ minutes across lid cycles and a pod removal, with case nibble1(10%). At the same moment the AAP session reportedCASE=95% NOT_CHARGING.PodDeviceprefers AAP, then BLE, then cache, so with no live AAP session the frozen BLE value won.CachedBatterySlotrecordsfromAap. A shared rule (bleBatteryUnlessOutrankedinPodDevice.kt) skips a BLE value when a cached AAP reading under 30 minutes old disagrees with it by more than one decile. The battery getters,isBatteryCached/cachedBatteryAt,batteryCaseReadingand the cache write path (toCachedState) all use it. A skipped BLE value never overwrites the AAP slot, so the window counts from the last real AAP reading.BatteryEstimator.liveReadingandChargedReaction.liveChargingSlotsread live BLE only and never display a value.fromAapdecodes as BLE-sourced, which keeps the previous behaviour.v5.6.0-rc0). Not yet tried on a real phone in the Mac-holds-the-session scenario.🤖 Generated with Claude Code