digitalbirdo / BT-LinkkeySync

Scripts to synchronize bluetooth link keys from mac OSX to windows
MIT License
112 stars 32 forks source link

Error #2

Open g4fa opened 7 years ago

g4fa commented 7 years ago

HEllo

I have this error

blued.plist.zip File "/Users/fabien/Desktop/BT-LinkkeySync.py", line 40, in print(" Bluetooth 2.0: "+str(len(pl["LinkKeys"].keys()))+ " Links keys found") KeyError: 'LinkKeys'

Thanks for your aid

koubafire commented 7 years ago

I have the same ERROR. How do you solved it?

stanleyguevara commented 6 years ago

I have the same error on HighSierra. It's because plutil used to convert original plist file to XML returns gibberish instead of LinkKey content.

What worked for me to get the key was: sudo defaults read com.apple.bluetoothd

koubafire commented 6 years ago

When I have to use your syntaxe? In which step ?

Pair all your bluetooth devices to your Mac (e.g. keyboard, mouse, headphones) Open the Terminal and navigate to the folder where you have downloaded the fileBT-Linkkeysync.py Mark the script as executable with sudo chmod +x BT-Linkkeysync.py Run the script with sudo ./BT-Linkkeysync.py(you will be asked for your password) Store the generated file btkeys.reg file to a location accessible by windows. Download psexec and store it to C:/Windows/System32/ Run the command: psexec -s -i regedit Import the file btkeys.reg No need to reboot Use your keyboard on macOS and Windows

stanleyguevara commented 6 years ago

Sorry, I wasn't using the script, I did it manually HighSierra -> Archlinux, my K810 works ok on both systems now. Run the command on HighSierra, then invert the endianess manually, e.g. you'll get on OSX: 1dbcd2f7 f214699e 261551cb c3787768 Then you reverse by every 2 chars and capitalize, so it's: 687778C3CB5115269E6914F2F7D2BC1D Then I've put this string in right place on Linux, also manually. I guess It'll work for windows too, not sure about where to put it. The point is - script is broken on HighSierra, and I don't have time really to make a PR out of my finding. Good luck.