Jump to content
InsanelyMac Forum
  • Announcements

    • Allan

      Solution to create a topic or post.   04/24/2018

      Hello guys. The majority of you are having issues to create a topic or post here. This are a problem with our current theme InsanelyMac.  Now the theme will be the Default IPS. Sorry for any inconvenience.
Denicio

Keep Bluetooth devices paired once between Mac/Windows

Recommended Posts

Intro

 

You might have noticed that once you pair your Bluetooth devices in either Mac or Windows, you blatantly need to re-pair the same devices every time in order to utilize them. This is due to the fact, that, despite pairing these devices on the same BT adapter, each OS stores the pairing keys uniquely. My guide is a step-by-step procedure to remedy this problem. If you would like to learn more about the internals of the solution itself, please refer to the following:

 

- The original thread about fixing this problem can be found here by camoguy. Awesome work!

- The original code for automating the fix is hosted here. Congratulations on your work, I was able to learn Python because of you and your interesting project.

 

Procedure

 

A) Boot into Windows, open Bluetooth preferences.

B)Pair all Bluetooth devices that you plan on using on both Mac/Windows. You need to pair on Windows first because certain drivers are installed while you pair new devices.

 

r4loaEM.png

 

C) Restart into macOS, open your Bluetooth panel.

D) Pair once again the same Bluetooth devices. If you have trouble pairing, lookup how to enable Discovery Mode on your devices.

 

nRi3c8m.png

 

E) Open Terminal, run chmod +x ~/Desktop/bt.py (this file is attached on this post).

F) Run ~/Desktop/bt.py

 

U51pZmD.png

 

G) On you desktop you will find BTFix/BTFix.reg, copy this file on your Windows disk or an external USB disk.

 

uYVwaad.png

 

H) Reboot into Windows.

I) Download PSTools and extract it on your Downloads folder (or any other folder).

J) Run cmd.exe as Administrator, navigate to your PSTools folder.

K) Type psexec -s -i C:\Windows\regedit.exe

 

CUwUkhQ.png

 

L) Regedit is now open. Click File -> Import, and select your previously generated BTFix.reg file.

 

YNbPSQi.png

 

M) Restart Windows.

N) Check that all your Bluetooth devices connect successfully.

 

jcZzFaN.png

 

Notes

 

Bluetooth 4.0 devices are not covered with this version. As soon as I get a Bluetooth 4.0 capable device in order to experiment, I will update this thread with findings. Waiting for your input too!

bt (El Capitan, Sierra).zip

bt (High Sierra).zip

Share this post


Link to post
Share on other sites
Advertisement

Notes

 

Bluetooth 4.0 devices are not covered with this version. As soon as I get a Bluetooth 4.0 capable device in order to experiment, I will update this thread with findings. Waiting for your input too!

 

Thanks for your efforts (and the original guys).

So I have the Apple BCM943602CS wiFi-BT combo card. BT is 4.0. 

What would be different for BT 4.0 ?

Share this post


Link to post
Share on other sites

Thanks for your efforts (and the original guys).

So I have the Apple BCM943602CS wiFi-BT combo card. BT is 4.0. 

What would be different for BT 4.0 ?

The difference would be if the devices you connect to it are BT 4.0 capable. Give it a try, most of your devices will work with this method.

Share this post


Link to post
Share on other sites

The difference would be if the devices you connect to it are BT 4.0 capable. Give it a try, most of your devices will work with this method.

OK. Thanks. I figured it out without any mods.

This is what I had to do to get the my Apple Magic Keyboard and Apple wireless mouse (non-chargeable) to work in Win10 & macOS 10.13:

1. Boot macOS and disconnect & remove the kbd & mouse from bluetooth (used a wired kbd & mouse temporarily)

2. reboot to Win10 and install latest bootcamp drivers to Bluetooth, WiFi, wireless kbd & wireless mouse.

3. While in WIN10, add the kbd & mouse. Worked perfect (mouse touch scroll & volume keys displays up/down on screen just like macOS)

4. reboot to macOS and add kbd & mouse via System Pref->bluetooth and they both work perfect.

5. reboot to WIN10 and kbd & mouse still work.

 

I check the link keys in both WIN10 & macOS and they are both different for each kbd & mouse. So don't know how it's working.

Maybe, the latest bootcamp drivers are tolerant of dual booting.

 

My only problem with BCM943602CS is that the Apple kbd & Apple mouse do not work during cold boot & restarts to access the BIOS & Clover.

I have Gigabyte Z77X-UP5 motherboard. It's a real pain when dual booting as I have to have another keyboard handy.

Share this post


Link to post
Share on other sites

OK. Thanks. I figured it out without any mods.

This is what I had to do to get the my Apple Magic Keyboard and Apple wireless mouse (non-chargeable) to work in Win10 & macOS 10.13:

1. Boot macOS and disconnect & remove the kbd & mouse from bluetooth (used a wired kbd & mouse temporarily)

2. reboot to Win10 and install latest bootcamp drivers to Bluetooth, WiFi, wireless kbd & wireless mouse.

3. While in WIN10, add the kbd & mouse. Worked perfect (mouse touch scroll & volume keys displays up/down on screen just like macOS)

4. reboot to macOS and add kbd & mouse via System Pref->bluetooth and they both work perfect.

5. reboot to WIN10 and kbd & mouse still work.

 

I check the link keys in both WIN10 & macOS and they are both different for each kbd & mouse. So don't know how it's working.

Maybe, the latest bootcamp drivers are tolerant of dual booting.

 

My only problem with BCM943602CS is that the Apple kbd & Apple mouse do not work during cold boot & restarts to access the BIOS & Clover.

I have Gigabyte Z77X-UP5 motherboard. It's a real pain when dual booting as I have to have another keyboard handy.

Way to go...! Actually, that's what I do, I keep a small USB keyboard handy for these type of situations :)

Share this post


Link to post
Share on other sites

Way to go...! Actually, that's what I do, I keep a small USB keyboard handy for these type of situations :)

 

Just found a fix.

Gigabyte had released a beta BIOS F13a a long time ago but I never used it at the time as I had some issues overclocking it to 4.8Ghz so have been running F12j-Mod9.

I just installed the F13a BIOS and both apple kbd & mouse are working in BIOS and hence Clover.

 

So looks like it's a BIOS issue.

 

Apple kbd & mouse continue to work with both Windows and macOS without any regedits with the F13a BIOS.

Share this post


Link to post
Share on other sites

Just found a fix.

Gigabyte had released a beta BIOS F13a a long time ago but I never used it at the time as I had some issues overclocking it to 4.8Ghz so have been running F12j-Mod9.

I just installed the F13a BIOS and both apple kbd & mouse are working in BIOS and hence Clover.

 

So looks like it's a BIOS issue.

 

Apple kbd & mouse continue to work with both Windows and macOS without any regedits with the F13a BIOS.

Amazing, next time I will opt for a Gigabyte (currently have ASRock).

Thanks, man. I finally find the solution in High Sierra. 

Glad I could be of help.

Share this post


Link to post
Share on other sites

Okay so i followed this guide and its amazing what you have done. But for some reason my keyboard connects but doesnt do anything in windows HOWEVER, if i turn my keyboard off and i check the registry the Key is there but there is nothing is in the Key if that  make sense (key in this case meaning folder in registry). But when i import the key file it shows up. Please help i really dont like using this amazon basics keyboard lmao.


After i add the reg key it connects to an unknown bluetooth device then goes to my full name ______ 's Keyboard and it says connected but i cant use it and after like 2 min it goes from connected to paired.

Share this post


Link to post
Share on other sites

Okay so i followed this guide and its amazing what you have done. But for some reason my keyboard connects but doesnt do anything in windows HOWEVER, if i turn my keyboard off and i check the registry the Key is there but there is nothing is in the Key if that  make sense (key in this case meaning folder in registry). But when i import the key file it shows up. Please help i really dont like using this amazon basics keyboard lmao.

After i add the reg key it connects to an unknown bluetooth device then goes to my full name ______ 's Keyboard and it says connected but i cant use it and after like 2 min it goes from connected to paired.

 

Try to attach on a reply the output files from the patch, I will take a look.

Share this post


Link to post
Share on other sites

Try to attach on a reply the output files from the patch, I will take a look.

There sorry for bothering thanks for taking a look. Also i forgot to add when windows says unknown bluetooth device it detects its a keyboard then goes to __________'s Keyboard connected then it goes to paired i forgot to mention it detects its a keyboard. Also while it says connected i cant type anything its weird. but it works perfectly in OSX it auto pairs and everything. Im using a hackintosh if that makes a difference 

BTFix.zip

Share this post


Link to post
Share on other sites

Were you able to find anything?

I checked your generated reg file for Windows and everything seems OK. Did you follow the steps sequentially as they appear on the guide?

Share this post


Link to post
Share on other sites

Im going to try to reinstall windows any version of windows you recommend? For me i dont care tbh as long as i have a windows partition lol.

I personally install Windows 10 LTSB. It's a minimal version of Windows 10 that doesn't include any of the extras like Store, Maps, Mail apps etc. You just install yourself whatever you need.

Share this post


Link to post
Share on other sites

So i found what my issue was you need to install the Regisry key before you install the Bootcamp drivers if you already installed the drivers right click on the .MSI file you used to install it and click uninstall and install the registry key and once it connects automatically once then install the bootcamp drivers then everything works I dont know if this works for others but for me this is what worked

Share this post


Link to post
Share on other sites

I am not sure what how I did it. But following this guide and the others, I have bluetooth working in BIOS on the z270n gaming 5 along with CLOVER macOS High Sierra and Windows 10. Amazing. I did replace the wifi bt card with a legit Apple one and adapter. Thanks!

Share this post


Link to post
Share on other sites

I am not sure what how I did it. But following this guide and the others, I have bluetooth working in BIOS on the z270n gaming 5 along with CLOVER macOS High Sierra and Windows 10. Amazing. I did replace the wifi bt card with a legit Apple one and adapter. Thanks!

Nice going! Glad it worked for you.

Share this post


Link to post
Share on other sites

Great Work! But can not for  Bluetooth 4.0 LE/Smart. 

I'll try to pair my MiMouse (it's a Bluetooth 4.0 LE/Smart mouse) on windows 10 and import the keys on the Ubuntu & MacOS side, For day and day I  solved this problem!

You can use  Wireshark to capture & analysis Bluetooth data packets on each platform,now you can finder the answer.

For my platform is Windows 10+Ubuntu16.04+MacOS HighSierria。 For Bluetooth 4.0 LE/Smart mouse does not need  link key, The IRK LTK RAND EDIV Address Value data need. For different platforms the Value data may need convert。My paired keys config each platform list in below,You can use it as an example.

 

Config files:

==========================================================================================================================
Windows 10 Registry
==========================================================================================================================

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\c8ff2840fec4]
"18dc56001a6f"=hex:9f,63,4d,7f,83,58,a9,15,21,d9,07,85,e9,ef,31,48

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\c8ff2840fec4\ce995d228b53]
"LTK"=hex:5e,75,65,20,d4,27,da,d5,b8,fc,ec,b9,2d,60,e4,52
"KeyLength"=dword:00000000
"ERand"=hex(b):b2,41,8f,ac,43,e6,67,d2
"EDIV"=dword:000058ba
"IRK"=hex:b2,af,08,39,62,d8,99,69,49,ed,d9,6a,f8,ad,e7,4c
"Address"=hex(b):53,8b,22,5d,99,ce,00,00
"AddressType"=dword:00000001
"AuthReq"=dword:00000001

=============================================================================================================================
Linux /var/lib/blutooth/XX:XX:XX:XX:XX/XX:XX:XX:XX:XX/info
=============================================================================================================================
[General]
Name=MiMouse
Appearance=0x03c2
AddressType=static
SupportedTechnologies=LE;
Trusted=true
Blocked=false
Services=00001530-1212-efde-1523-785feabcd123;00001800-0000-1000-8000-00805f9b34fb;00001801-0000-1000-8000-00805f9b34fb;0000180a-0000-1000-8000-00805f9b34fb;0000180f-0000-1000-8000-00805f9b34fb;00001812-0000-1000-8000-00805f9b34fb;

[DeviceID]
Source=2
Vendor=10007
Product=64
Version=35

[IdentityResolvingKey]
Key=B2AF083962D8996949EDD96AF8ADE74C

[LongTermKey]
Key=5E756520D427DAD5B8FCECB92D60E452
Authenticated=0
EncSize=16
EDiv=22714
Rand=15161339848898331058

[ConnectionParameters]
MinInterval=6
MaxInterval=9
Latency=100
Timeout=600

=======================================================================================================
MacOS com.apple.bluetoothd.plist
=======================================================================================================
{
    "SMPCloudLocalPrivateKey" = <4edf5681 31d2e5e2 0fbe80a2 7d28bb57 ae6f395b 932dbad7 60bbd490 1464348e 56da0fff b0777a3a f96c4148 eed126c5 3a9f8c9e 36820b25 e2d6766b 719bd79c 20fe862d df67e763 b1a544f2 75394731 4508c726 d9cea622 e17fdf79 e0eeb082>;
    "MagicCloudPairingMasterHint" = <d4b84bee f7db21e8 9cffc1b7 8b6759d9>;
    SMPDistributionKeys = {
        "c8-ff-28-40-fe-c4" = {
            "ce-99-5d-22-8b-53" = {
                AddressType = 1;
                MITMProtection = NO;
                OriginalAddressType = 1;
                LTKLength = <10>;
                RAND = <b2418fac 43e667d2>;
                IRK = <4ce7adf8 6ad9ed49 6999d862 3908afb2>;
                Address = <ce995d22 8b53>;
                EDIV = <ba58>;
                LTK = <5e756520 d427dad5 b8fcecb9 2d60e452>;
            };
        };
    };
    SMPCloudLocalNonce = <d40e7747 ba393789 0da2933c 2ff11b17>;
    LinkKeys = {
        "c8-ff-28-40-fe-c4" = {
            "4c-74-bf-64-06-f3" = <b05de895 fe4aeb5b c2dba041 547bcc7b>;
            "d8-9a-34-29-b9-85" = <dd8e162b bc6676af f6590315 f0e48a31>;
            "30-22-23-01-e8-1f" = <56dd3519 d1519956 eb6ff5f3 c2bdc2f1>;
            "18-dc-56-00-1a-6f" = <a4d18428 e04d25a6 a5e236c7 53255653>;
        };
    };
    "MagicCloudPairingMasterKey" = <2d6445ca aaafa3c9 efa77256 a7e75dc9>;
    "SMPCloudLocalPublicKey" = <4edf5681 31d2e5e2 0fbe80a2 7d28bb57 ae6f395b 932dbad7 60bbd490 1464348e 56da0fff b0777a3a f96c4148 eed126c5 3a9f8c9e 36820b25 e2d6766b 719bd79c>;
}
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.



  • Posts

    • Monitor EDID often contains OEM string in Details Timing section. For example Extracted contents: header: 00 ff ff ff ff ff ff 00 serial number: 06 10 df 9c 00 00 00 00 1a 15 version: 01 04 basic params: 95 1d 12 78 02 chroma info: ef 05 97 57 54 92 27 22 50 54 established: 00 00 00 standard: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 descriptor 1: c2 23 a0 d4 50 84 1a 30 40 2a 36 00 1e b3 10 00 00 18 descriptor 2: 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 descriptor 3: 00 00 00 fe 00 4c 50 31 33 33 57 50 31 2d 54 4a 41 37 descriptor 4: 00 00 00 fc 00 43 6f 6c 6f 72 20 4c 43 44 0a 20 20 20 extensions: 00 checksum: 7a Manufacturer: APP Model 9cdf Serial Number 0 Made week 26 of 2011 EDID version: 1.4 Digital display 6 bits per primary color channel DisplayPort interface Maximum image size: 29 cm x 18 cm Gamma: 2.20 Supported color formats: RGB 4:4:4 First detailed timing is preferred timing Established timings supported: Standard timings supported: Detailed mode: Clock 91.540 MHz, 286 mm x 179 mm 1440 1504 1546 1652 hborder 0 900 903 909 926 vborder 0 -hsync -vsync Dummy block ASCII string: LP133WP1 Monitor name: Color Checksum: 0x7a (valid)  
    • "copy to clip board" - "скопировать" "log copied to clip board!" - "журнал скопированного"   First one is better.   Good! I think to reduce EDID as talking above. 
    • And my config.plist I will also try iMacPro1.1 SMBIOS on my build. This may help clarify something
×