-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AirPods Pro 2 in-ear detection not working well #38
Comments
Is the detection wrong, does it display the wrong status in the dashboard even after waiting? Or is it just slow? If the detection is wrong we need to look at how the data differs from AirPods Pro Gen 1. If it's just slow you can try updating the monitoring interval in the settings. If it's still slow there could be a change in behavior: The AirPods randomize their MAC address (every few minutes or when rebooted via case). If all other information is still the same, then CAPod can immediately recognize your AirPods. If unlucky and the AirPods have a new MAC address and change some data (e.g. "in-ear" status) in the same message, then CAPod will loose track and there is a delay until the AirPods are recognized again based on their signal level (how close they are). All quite complicated, but the best we can do for now. |
It's a bit of a mix of both. For instance, I looked at the monitor when removing one airpod, and the behaviour was:
Yes already put the setting on low latency |
Does it work better if you use a slower latency mode? |
That means that the issue isn't in the play/pause code. Which is good but then it's also not as easy a fix. The case is a bit of a special "case". If you add/remove a pod from your ear (or just cup with your hand), does it always not work? What if you remove one AirPod (nothing changes?) then remove the second AirPod, does it then change? To rule out a decoding issue, you can enable debug mode and the on screen card should display the raw data in hex values. Even if the UI does not update the in-ear state, does the raw data change? Edit: In debug mode, does the receive counter in the top right corner keep going up? Maybe this is after all related to CAPod loosing track of your specific AirPods. Are any other around? I wonder if we have code yet to take a shortcut if there is only ONE pair of AirPods around, or if there are multiple but only one of the type the user selected 🤔 |
Nope
It's a bit complicated to be very precise because the behaviour seems a bit messy (looks like the app misinterpret data to me). Following your scenario:
Additional things I noticed:
From what I saw during the described scenario before is that the counter is not resetting and just going up. But I can also see that sometime it reset kinda randomly (need more observation, maybe related to case opened or not)
No, not in my apartment, at least This sounds like a decoding issue indeed, I may have a look this weekend at the raw data, learning to sniff packets from BLE soon! |
Also, one more question to better understand, Is the debug logger logging every raw data received from the device or only the one it knows / can decode? |
Not so much "left mic enabled" but "left mic priority", left is the default, afaik.
If the debug data did NOT change, then it can't be a decoding issue though? We can only decode what is received 🤷
For gen1 the case does not have a Bluetooth, it only communicates through the pods, i.e. when one is in the case. I think the gen2 case also doesn't have a Bluetooth chip.
That sounds like a decoding issue. AirPods 2 are defined here but they mostly inherit from the base "dual pod" class here
The raw data shown in the UI in debug mode is just the raw data that is then also shown by the icons in decoded form. If you use the "record debug log" option it will contain all BLE advertising packets the phone receives. Working with log files is a bit time consuming though. For playing around with this the easiest would probably be to just install Android Studio, and open this project in it, and then just install the dev version to watch all of it in the log viewer. |
Here are some more hints for your research: Android calls what is received
|
Thanks a lot 🙏🏼 I'll try to play a bit during the weekend and keep you up to date. |
I tried to check a bit, but very newbie on this 😅 |
If you see the same data being received, then I wouldn't really know how what to look for. |
See also: |
Do not lose time. There is no way to detect ear on 5B58 firmware. We must wait a new firmware version maybe something will change. I did a lot of test with any settings of AirPods Pro 2. For @Gallouche who said that AirPods Pro 2 good works on mac os etc it is because apple use other protocol to detect ear position that much faster than BLE. |
As far as I know, the Airpods also send data that has yet not been properly decoded. Is it known for sure that the data is encrypted? If so, is that encryption Apple specific, or can it be analyzed and reversed as part of some kind of handshake? Is the ear detection information possibly send in that undecoded data blob? |
@mainrs |
Just to let you know, the newer airpods pro 2 fw 5E133 still doesn't fix things (at least for me). |
@d4rken I just noticed that in ear detection doesn't work at all when playing music. But as soon as I pause music it starts working. |
Airpods pro 2 does not support ear detection |
It does work when music isn't playing tho 🤔 |
What do you mean exactly? In-ear detection is usually used to automatically pause and resume audio playback when you take them out of your ear. Do you mean that, if the music is paused and you put them into your ear, the music resumes playback automatically? |
Yes exactly, If I pause music and wear the airpods it resumes the music. |
At least I have never encountered this behavior. What device do you use? What firmware is on your airpods pro v2? |
I am using Poco X3 (with LineageOS 20) |
I run GrapheneOS on a Google Pixel 6. I can confirm that with firmware 5E135 autoplay works when putting the earphone back into your ear. It does not work when removing it though. However, it is really spotty. It does not work all the time and it worked only with the left earbud for me. I could not reproduce it with the right one. |
Don't fixate too much on whether music playback starts or ends. This is only a reaction to conditions. The important part is whether the "in-ear" detection status changes correctly when looking at the data (e.g. in CAPod). |
@d4rken It does change correctly when music isn't playing |
I will clone the repo tonight and tinker around the in-ear detection. Let's see if I can figure it out |
You could not spend time on this. I made planty of tests and can confirm that ear detection will not work on none Apple devices. Apple detects when you listen to music on none Apple device and stopping sending data. |
any updates on this issue? also, i've noticed that when i'm using the airpods with my mac, the app detects if they are in ear almost immediately, but not when connected to the phone itself. |
here's another thing i noticed, the app detects the airpods if they are removed way quicker and accurately if no music is playing, but take a long time to detect if something is playing. and as mentioned by others, resuming works normally and quickly. |
ear detection seems to be working almost all the times on the airpod which is the microphone but not the other one with the new firmware 7A294. kind of an improvement..? |
Hey there, first thanks a lot for the app love it!
Just bought AirPods Pro 2, and while setting up the app, I saw that the in-ear detection is not accurate, and it doesn't detect well if a pod is in-ear or not.
While checking the monitor mode a bit and putting them on and off, I can see that the pod's status is either long to update or not correct at all.
This is quite annoying for the auto-pause, which is not working, for instance.
I don't have much more info to provide for now, but I would be glad to help debug!
The text was updated successfully, but these errors were encountered: