Skip to content

Instantly share code, notes, and snippets.

@ekuester
Last active July 14, 2022 16:06
Show Gist options
  • Save ekuester/a573abbbd055766337f314a79b623fa4 to your computer and use it in GitHub Desktop.
Save ekuester/a573abbbd055766337f314a79b623fa4 to your computer and use it in GitHub Desktop.
How-to bluetooth pair an Apple Magic Mouse in a Dual Boot System with Fedora 27 Linux and macOS 10.13 High Sierra
With help of the python script from <https://github.com/digitalbirdo/BT-LinkkeySync> you will succeed in pairing an Apple Magic Mouse both under Linux Fedora 27 and High Sierra.
# first start Linux Fedora 27
# all commands with $ in front should be executed as root in a terminal, so
$ sudo su
# stop bluetooth services
$ systemctl stop bluetooth.service bluetooth.target
# now delete the subdirectories in /var/lib/bluetooth (warning: all bluetooth devices must be newly initialized)
$ rm -frv /var/lib/bluetooth/F8\:63\:3F\:3C\:11\:E3/
# the name of the subdirectory will vary depending on the computer
# start bluetooth services anew
$ systemctl start bluetooth.service bluetooth.target
# connect the bluetooth device(s)
# look in /var/lib/bluetooth if there are newly created subdirectories
# note the name of the subdirectory under F8:63:3F:3C:11:E3 (in our case the Apple Mouse has 7C:6D:62:F4:9C:88)
# shut down the computer
---
# start macOS High Sierra
# in Preferences - Bluetooth delete the device if existing
# connect the bluetooth device in question anew
# in a command line execute the python script (before set highSierraLoc in line 15 to True)
$ sudo python ./BT-LinkkeySync.py
# look into file btkeys.reg in our case under
"7c6d62f49c88"=hex:87,0c,bd,40,cc,a5,25,6e,a5,02,a1,6b,0e,1b,bf,e0
# delete the commata, convert to upper case and note for later
Key=870CBD40CCA5256EA502A16B0E1BBFE0
# shut down the computer
---
# start Linux Fedora 27 again
$ sudo su
# stop bluetooth services
$ systemctl stop bluetooth.service bluetooth.target
# edit info file, the name of the subdirectories will vary, find it out yourself
$ nano /var/lib/bluetooth/F8:63:3F:3C:11:E3/7C:6D:62:F4:9C:88/info
# substitute the whole line beginning with Key by the line from above and save the file
# start bluetooth services anew
$ systemctl start bluetooth.service bluetooth.target
# connect the bluetooth device
# Good luck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment