steam3d / MagicPods-Windows

Add little magic to your Airpods
https://magicpods.app
289 stars 11 forks source link

AirPods Pro mis-detection issue #92

Closed wsy closed 3 years ago

wsy commented 3 years ago

Hi, While using MagicPods, I found two bugs. However, I strongly believe that they have common root cause

Environment:

Computer platform: i5 10500, B460 chipset Bluetooth: BroadcomBCM94360 Computer Location: My office Earphone: AirPods Pro OS: Windows 10 Enterprise (20H2) MagicPods Version: 1.0.68.0 Settings in "Experiment" section: Only "Show 'connect' button" turned on. Settings of MagicPods

Bug 1: AirPods Pro mis-detection.

Scenario 1:

One day, I was on a metro, many kilometers away from my office and my AirPods Pro was with me. I used Microsoft Remote Desktop app to connect to my office computer from an iPad. MagicPods kept prompting me about my AirPods Pro's battery info. This must be some kind of 'false alarm' because no bluetooth connection can be made from many kilometers away.

Scenario 2:

Today my AirPods Pro was closed. (Both AirPods inside the case and the battery case is closed) MagicPods, again, kept prompting me about my AirPods Pro. (See the video below)

https://user-images.githubusercontent.com/2684991/115347830-77d51200-a1e4-11eb-856c-3cd12d1217d5.MOV

Bug 2: Wrong battery information

According to the above video, my AirPods Pro's battery case has 5% battery remaining. However, it actually have 36% battery remaining. (I know about your battery precision problem) Below is a photo. (This photo is shoot when AirPods battery case is closed)

BatteryInfoBug

And when I open the battery case, the MagicPods window shifts between two values. (See the video below)

https://user-images.githubusercontent.com/2684991/115362582-449a7f00-a1f4-11eb-84fb-68c49f5523f3.MOV

Log

Below is recent part of MagicPodsServiceLog.txt

20.04.2021 13:38:21 ----------------- ---- [Info] | | Run AirpodsState 20.04.2021 13:38:21 20:E2:A8:46:DC:84 ---- [Info] |GetPairedDevices| Find 诗峣的AirPods Pro Model airpodspro Disconnected 20.04.2021 13:38:22 ----------------- ---- [Info] |GetPairedDevices| programState Disconnected 20.04.2021 13:38:22 ----------------- ---- [Info] | | AirPods found 20.04.2021 13:38:22 ----------------- ---- [Info] | | Advertisement watcher started! 20.04.2021 13:38:25 AB:CD:13:63 -78 [Info] | Print Action | Open(RL) | Case:open 20.04.2021 13:48:05 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:48:24 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:48:35 7B:F8:7F:B1:3B:A7 -57 [Info] | Print Action | Open(RL) | Case:open 20.04.2021 13:48:39 7B:F8:7F:B1:3B:A7 -53 [Info] | Animation | Hide window 20.04.2021 13:48:39 7B:F8:7F:B1:3B:A7 -53 [Info] | Print Action | Case:Closed [close_ctrl] 20.04.2021 13:48:40 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:48:40 7B:F8:7F:B1:3B:A7 -45 [Info] | Animation | Hide window 20.04.2021 13:48:40 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:48:40 7B:F8:7F:B1:3B:A7 -46 [Info] | Animation | Hide window 20.04.2021 13:48:40 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:48:41 7B:F8:7F:B1:3B:A7 -52 [Info] | Animation | Hide window 20.04.2021 13:48:42 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:49:18 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:49:32 4A:5C:8C:1C:C7:76 -60 [Info] | Print Action | Open(RL) | Case:open 20.04.2021 13:49:57 4A:5C:8C:1C:C7:76 -41 [Info] | Animation | Hide window 20.04.2021 13:49:57 4A:5C:8C:1C:C7:76 -41 [Info] | Print Action | Case:Closed [close_ctrl] 20.04.2021 13:49:57 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:49:58 4A:5C:8C:1C:C7:76 -44 [Info] | Animation | Hide window 20.04.2021 13:49:59 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:49:59 4A:5C:8C:1C:C7:76 -44 [Info] | Animation | Hide window 20.04.2021 13:49:59 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:51:10 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:51:15 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:51:28 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:51:51 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:52:31 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:52:38 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:52:49 AB:CD:13:63 -63 [Info] | Animation | Show window 20.04.2021 13:53:34 AB:CD:13:63 -65 [Info] | Animation | Show window 20.04.2021 13:53:50 AB:CD:13:63 -65 [Info] | Animation | Show window

steam3d commented 3 years ago

Hi. Looks like The MagicPods catch your neighbours (employees)'s AirPods Pro. Because of that The MagicPods show one time your AirPods Pro data, second your neighbours (employees)'s AirPods Pro data. Apple doesn't allow detect AirPods, because of this, I can not know exactly which headphones are yours.

Your log is short, based on it i think your AirPods in radius between -40 and -55. Try to reduce search radius to 50, you will need bring AirPods Pro closer to PC to trigger animation

wsy commented 3 years ago

Did Apple use bluetooth MAC address randomization? If not, maybe MagicPods can use bluetooth MAC address to distinguish different AirPods. Also, none of my collegues' AirPods paired with my computer. So, MagicPods can detect other AirPods even if they're not paired?

steam3d commented 3 years ago
  1. Yes. Apple use randomization address. Apple device send real mac as encrypted string
  2. Yes. Any program include MagicPods can detect any apple devices.
steam3d commented 3 years ago

There are no any way to avoid it. Apple storage all their keys for encrypt data in icloud, no-one except apple apps can access to them.

wsy commented 3 years ago

OK. Thanks for your clarification. It seems the only thing I can do is to adjust detect radius.

wsy commented 3 years ago

I also found something sad.... My college's FAKE AirPods Pro speaks louder than my real one. If I adjust detect radius to -55, MagicPods sometimes fails to detect my AirPods Pro. If I adjust detect radius to -60, my college's FAKE AirPods Pro gets detected even if he is two meters away.

steam3d commented 3 years ago

Fake AirPods usually use very hight power Bluetooth module. Very much depends on the direction of the bluetooth antenna. If you have a usb bluetooth dongle maybe good idea to place it in front of you or behind the monitor. You will get values -30 ... -40 and you can filter your college's FAKE AirPods Pro