Jump to content
Denicio

Keep Bluetooth devices paired once between Mac/Windows

27 posts in this topic

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.

  • Similar Content

    • By fusion71au
      Making a High Sierra USB Installer Entirely From Scratch in Windows
      This is a proof of concept tutorial, to show it's possible to create a vanilla High Sierra installer, entirely from scratch, in Windows (even without App Store downloaded "Install macOS High Sierra.app" from a real Mac ).  @PikeRAlpha's link to Apple's Software Catalog provides us with all the URLs necessary to download the needed files directly from Apple instead of some dubious source from the internet...
       

      Pre-Requisites
      8GB or larger USB drive Boot Disk Utility v2.1.2017rev021b from @CVAD TransMac (free 15 day trial) Paragon Hard Disk Manager Free Download Installer Files Directly from Apple
      1)  Browse Apple's Regular Software Catalog and find the URLs to download the following 6 installer files...
      BaseSystem.dmg BaseSystem.chunklist InstallInfo.plist InstallESDDmg.pkg AppleDiagnostics.dmg AppleDiagnostics.chunklist (Hint - search page for "InstallESD" to find its URL and others nearby)

      to a folder named "SharedSupport" on your Windows NTFS drive.  A browser download manager (eg Chrono for Chrome, dTA for FireFox) is handy since InstallESD is >4GB ---> allows you to pause/resume interrupted download...

      2)  Rename InstallESDDmg.pkg to InstallESD.dmg
      3)  Edit InstallInfo.plist with WordPad/text editor to remove the chunklistURL and chunklistid keys for InstallESD, and renaming it from InstallESDDmg.pkg to InstallESD.dmg (example of edited file attached to this post)...
      Note:  You can verify the SHA1 checksum of your InstallESD.dmg and BaseSystem.dmg with the correct ones at this website.
      Boot Disk Utility to format the Installer USB and Restore OS X Base System HFS partition
      1.  Format USB with BDU & latest Clover ---> creates boot files in CLOVER partition + second FAT partition
      2.  Extract 4.hfs from \SharedSupport\BaseSystem.dmg with BDU --> save to it's local folder
      3.  Restore 4.hfs to USB second partition with BDU --->  2nd partition becomes bootable "OS X Base System"
      Paragon Hard Disk Manager to extend HFS Partition to its Full Extent
      Open Paragon Partition Manager Free and resize the second partition of the USB drive to the full size allowed.  Don't forget to apply the changes at the end...
      Transmac to Copy "SharedSupport" folder to OS X Base System
      1.  Open the TransMac program and navigate to the HFS+ Volume/Install macOS High Sierra.app/Contents folder.  Right click anywhere in the empty space on the RHS pane and select "Copy Here"...
      2.  In the next stage, select the "SharedSupport" folder we created above as the "Files and Folders to be copied to the Mac Volume"...
      Clover Settings
      Clover configuration is required now.  The default config.plist (in the Clover FAT32 partition of the USB) maybe sufficient to boot your machine if you’re lucky.  If not, look at the Clover Wiki, Clover Instructions and Clover Configuration Thread for pointers and edit /EFI/Clover/config.plist accordingly with Wordpad or Notepad.
      The location of the important configuration files for Clover are summarized below
      config.plist--->EFI/CLOVER folder DSDT.aml with or without SSDT.aml--->EFI/CLOVER/ACPI/patched (don't need one if your DSDT is auto patched by Clover in config.plist) Kexts eg FakeSMC, NullCPUPowerManagement --->EFI/CLOVER/kexts/<osx version> or /Other. NB BootDiskUtility by default already has FakeSMC.kext installed here.  You may need to add VoodooPS2Controller for your laptop keyboard/trackpad to work. If UEFI booting, you will most likely need one of the OsxAptioFixDrv-64 drivers copied from /EFI/CLOVER/drivers-off/drivers64UEFI to /EFI/CLOVER/drivers64UEFI. If you want to use the installer to run High Sierra in Windows on VMware, you can follow my guide to set up the Virtual Machine and replace Clover's default config with EFI_Clover for VMware (which is compatible to run in VMware).  In the screenshots below, I have attached the USB Installer (in this case PhysicalDrive7) to my macOS Virtual Machine.  Reboot the system to the USB installer to install High Sierra ...
      What happens if we don't have access to TransMac or Paragon Hard Disk Manager?
      Not a problem, as long as we get "OS X Base System" bootable, we can launch terminal from the Utilities Menu to copy the SharedSupport folder over to the Installer app.  In essence, we will build the full installer app = 5GB+ on the target HD eg "Macintosh HD", by copying both the "small" installer app = 15MB (on "OS X Base System") and the SharedSupport folder from the NTFS volume (mounted in this example on /Volumes/DATA)...
      -bash-3.2# cd / -bash-3.2# cp -R Install\ macOS\ High\ Sierra.app /Volumes/Macintosh\ HD/ -bash-3.2# cp -R /Volumes/DATA/SharedSupport /Volumes/Macintosh\ HD/Install\ macOS\ High\ Sierra.app/Contents/  
      ...then start installation with the startosinstall utility...
      -bash-3.2# /Volumes/Macintosh\ HD/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --volume /Volumes/Macintosh\ HD --converttoapfs NO --applicationpath /Volumes/Macintosh\ HD/Install\ macOS\ High\ Sierra.app  
      The above steps can be automated with the attached "startosinstall.command" script, which will assemble "Install macOS High Sierra.app" on "Macintosh HD" and launch the startosinstall utility targeting the "Macintosh HD" volume.  Copy/download to "Macintosh HD", then run in terminal (after attaching DATA USB with /Shared Support folder)...
      cd "/Volumes/Macintosh HD" chmod +x startosinstall.command ./startosinstall.command Updated Download Links for macOS Mojave 10.14GM
      Browse Apple's Developer Beta Software Catalog and find the URLs to download the following 6 installer files...
      BaseSystem.dmg BaseSystem.chunklist InstallInfo.plist InstallESDDmg.pkg AppleDiagnostics.dmg AppleDiagnostics.chunklist  
      startosinstall.command.zip
       
      InstallInfo.plist_edited_10.14beta1.zip
      InstallInfo.plist_edited_10.13.6.zip
    • By Thereman
      Hello, I'm a noob at installing MacOS on my current PC (which is running Windows 10 x64 Pro).
      Can I do a dual boot with windows 10 and MacOS Mojave? I already have windows 10 installed and I would like to put and MacOS Mojave, can it? If not, should I reinstall from 0 MacOS Mojave and after Windows 10?
       
      P.S: I have already make a topic about "Can I run MacOS" and the export boys on the forum said to me I can run it.
    • By fasullo
      Ciao a tutti. Vorrei condividere con voi questo prodotto acquistato su wish. Per poco più di 2€ ho acquistato questa chiavetta bluetooth 4.0. In descrizione c'è scritto per windows. Appena arrivata a casa attaccata alla mia macchina e ed perfettamente funzionante anche su OS X. Ancora in fase di test ma sembra non fare una piega.

      Consigliatissima.

      https://www.wish.com/product/5a0af683650f3c5d57f70b43





      L'unica pecca è che fa una luce intermittente fortissima.
      Adesso gli metto su un pò di nastro isolante nero.
×