Skip to content
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

[Bug Report] Airpods detection is not stable which sometimes pauses the music playback when "ear detection" is enabled #3

Closed
luoluomeng opened this issue Jun 16, 2021 · 11 comments
Labels
🐛 bug Something isn't working

Comments

@luoluomeng
Copy link

🐛 Describe the bug

Airpods detection is not stable which sometimes pauses the music playback when "ear detection" is enabled

📜 To Reproduce

Steps to reproduce the behavior:

  1. Pair AirPods pro
  2. Start AirPodsDesktop
  3. Start NeteaseCloudMusic and play some music
  4. Listen to the music
  5. Music pauses sometimes
  6. Check the AirPodsDesktop immediately, the following status will show randomly:
  • AirPods2 with incorrect battery status
  • AirPods Pro but the battery status is incorrect(Such as Left:100%, right:30% but actually it's 30% 30%)
  • Disconnected

🚀 Expected behavior

Music should continue playing and AirPodsDesktop should show the right status of AirPods pro

🖼️ Screenshots

image
image
image

⚙️ Environments:

  • OS: Windows 10 21H1 build 19043
  • Version: 0.1.0

🌟 Additional context

@SpriteOvO SpriteOvO added the 📝 under investigation This issue is under investigation label Jun 16, 2021
@SpriteOvO
Copy link
Owner

@luoluomeng Thanks for reporting!

Music pauses sometimes

Yes, this is a known bug and I will try to fix it later.

AirPods2 with incorrect battery status

The battery values of AirPods 2 looks good, what's wrong with that?

AirPods Pro but the battery status is incorrect(Such as Left:100%, right:30% but actually it's 30% 30%)

Could you run AirPodsDesktop with the --trace argument, send the log file after a few seconds of running and write in the reply the value of the AirPods battery you see on your Apple device?

Disconnected

Does the disconnection happen randomly? If it happens after putting the AirPods back in the case, this is expected behavior because the AirPods will stop working with the Bluetooth module after that.

@SpriteOvO SpriteOvO added the 🐛 bug Something isn't working label Jun 16, 2021
@SpriteOvO
Copy link
Owner

My screen fits 100% DPI, so I'm not sure if the title text (e.g. "AirPods 2", "Disconnected") size is appropriate for high DPI users? If so, I will make the window size vary with DPI, otherwise I will make the font size as fixed as the window.

@luoluomeng
Copy link
Author

@SpriteOvO Thanks, I'll try the trace mode and get some logs, For the issues mentioned above(recognized as airpods2, disconnected, or incorrect battery percentage), I think there should be some incorrect data in the broadcast, maybe we need to filter the correct one.

My screen is 3840x2160 with 250% DPI, the title looks good but as the screenshot shows, there are some truncations on the battery percentage number.

@luoluomeng
Copy link
Author

luoluomeng commented Jun 17, 2021

AirPodsDesktop.log
Please check the log.
I also tried another similar project Winpods which has a similar issue, attach its log as well and hope it helps:
image

SpriteOvO added a commit that referenced this issue Jun 17, 2021
@SpriteOvO SpriteOvO removed the 📝 under investigation This issue is under investigation label Jun 18, 2021
SpriteOvO added a commit that referenced this issue Jun 28, 2021
@SpriteOvO
Copy link
Owner

SpriteOvO commented Jun 28, 2021

Hey, sorry it's a little late, I've pushed a few commits that should fix the problem, could you please test it (artifact)? Thank you!

@luoluomeng
Copy link
Author

luoluomeng commented Jun 29, 2021

Hey, sorry it's a little late, I've pushed a few commits that should fix the problem, could you please test it (artifact)? Thank you!

Of course!
It looks good now, and I'll keep using it to see if it's fixed completely.

@SpriteOvO
Copy link
Owner

@luoluomeng Any updates? I think this issue can be closed?

@luoluomeng
Copy link
Author

Still observing, it's working well for 90% of the time, but it still has a chance to show the battery status when the AirPods is disconnected for a while:
image

@SpriteOvO
Copy link
Owner

@luoluomeng It may be helpful to post trace logs from around the time of the problem (about 3 minutes). :)

@SpriteOvO
Copy link
Owner

SpriteOvO commented Jul 7, 2021

So, if your AirPods are actually closed (2 pods are in the case and the lid is closed), the InfoWindow pop-up may be because someone near you is also using AirPods.

This may not be completely fixable, as we have no way to track AirPods reliably for Apple's privacy reasons (MAC addresses are Random Non-resolvable).

A workaround for this is to reduce the receiving range, which can ignore advertisement data packets broadcasted far away from your Bluetooth receiver. You can adjust this value in Settings in the tray right-click menu.

@luoluomeng
Copy link
Author

Hmmm, adjust the range works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants