-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support key sync from Windows to MacOS #18
Comments
try this |
Cool @roddy20. I haven't tested it but how sure are you that the offsets you use with sed are reliable? |
it works for me :) |
about offsets, I think these lines always have equal length but I agree, parsing from | to ], from " to " and from : to the end will be better |
we can make it more simple |
What d'you mean by mac addresses? The number on the left before =? I guess that's some kind of device ID? |
https://en.wikipedia.org/wiki/MAC_address "d49a207f0a02" is macaddress for Mouse and 342387feece6 is macadress for BT Dongle, they are constants until you change the hardware hex:ec,f3,a6,90,8e,3c,af,50,ff,0b,76,e3,b8,8e,77,75 is a pairing key and it is new for each new re-connection |
Right. You still need both values - the MAC in order to know which key to update on the other OS. |
Ok if [[ "$line" == '=hex' ]] done < "$input" |
and the missing part |
This is nice @roddy20 :) you could try writing this as Python and submitting a pull request, then you would appear as a contributing author to this repository |
I understand nothing in Python, so you may use it "as is" or add to main project as some kind of alternative solution |
if we have WinClone installed, we can read directly from Window's Registry Example: |
and one more script for those who has a lot of different macOSes installed if [[ -f "/private/var/root/Library/Preferences/com.apple.bluetoothd.plist" ]] if [[ -f "/private/var/root/Library/Preferences/blued.plist" ]] if [[ $source ]] for s in /Volumes/*/private/var/root/Library/Preferences if [[ -f "$s/com.apple.bluetoothd.plist" ]] if [[ -f "$s/blued.plist" ]] cp -v "${source}" "${target}" done` |
I just did this manually and it was pretty straightforward.
From a paired device in Windows 10 (the Bose 700s, which interestingly support LE but were not paired by LE), I exported the link key data, changed the endianness to MacOS, then replaced this in the Mojave
/private/var/root/Library/Preferences/com.apple.bluetoothd.plist
(I used a hex editor to find and replace the existing paired key with Windows').The only gotcha was that I had to not only disable Bluetooth before modifying the
plist
file, but also perform a system reboot before starting Bluetooth again. Otherwise, something was reverting the key change to theplist
file. I tried to see if I could figure out which specific service was doing this but didn't have any luck.I appreciate that perhaps replacing the key on Windows is easier than the above but wanted to share that it is indeed possible nevertheless.
The text was updated successfully, but these errors were encountered: