How to share Bluetooth devices among Linux/MacOS/Windows systems

Nelson Aloysio
3 min readFeb 28, 2023
Figure: Sharing Bluetooth among operating systems. Still missing Android/iOS, though.

Bluetooth devices depend on a pairing key to connect to other machines. And for those who have to work on different operating systems on a day-by-day basis, repairing a number of Bluetooth devices each time to switch machines can be a pain — unless this key is shared among them, that is.

Before following this guide…

Please make sure each Bluetooth device you want to share among systems has been paired at least once in all of them, with Windows being the last.

On Windows

For this guide to work on Windows, it’s got to be the last pairing device.

After successfully pairing your Bluetooth (BT) device, download PsExec and extract the package to any desired folder. Afterwards, open an elevated command prompt by right-clicking on StartCommand Prompt (Admin).

Navigate to the path containing the tool and open the Registry Editor by executing PsExec.exe -s -i regedit.exe (-s: system, -i : interactive):

Figure: Windows command prompt displaying commands to be executed.

With it opened, go to the following path to locate your device’s pairing key:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\

There you’ll find a folder with the same name as your BT card address, and within it a key containing a binary value for each device you connected to. Make sure you locate the right device and write down the values shown.

Figure: Example for address AA:BB:CC:DD:EE:FF and pairing key 01100220033004400550066007700880.

In case you want to share this Bluetooth device with another Windows machine, just right-click on the folder containing the key above, choose Export and save it to a file. Then open the Registry Editor elsewhere (also with PsExec) and choose FileImport. Don’t forget you must rename the created folder (or edit the .reg) to have the same address as your BT card. Reboot.

On MacOS

This step so far has only been tested on MacOS Ventura.

Open the Keychain Access application and select System on the sidebar. On your right, keep scrolling down until you find a MobileBluetooth key which matches the pairing time of your device on the Date Modified column.

After entering your password, you will see a window similar to the image below. Click on Show password in order to display the contents in XML:

Figure: Example as seen on MacOS Ventura.

Select the text and press (downwards arrow) a few times on your keyboard until you find a line starting with <string>, as shown above.

Then, replace the value in between with the pairing key you found in the previous steps (all in upper cases and with hyphens separating every two characters). Don’t forget to restart Bluetooth soon afterwards.

On Linux

A.k.a. the easiest among all three.

After booting into your Linux distribution of choice, open a terminal and update your Bluetooth pairing key by executing the command as root:

sudo nano /var/lib/bluetooth/<CARD_ADDRESS>/<DEVICE_ADDRESS>/info

Replace nano with your preferred text editor and <CARD_ADDRESS> and <DEVICE_ADDRESS> with the corresponding values. Look for this section:

[LinkKey]
Key=01020304050607080910111213141516

Then, replace the pairing key with the value you found in any previous step (all in upper cases and without separators this time). Remember to restart your Bluetooth systemd service before trying to reconnect your device.

That’s all, folks.

--

--