Introduction
Everyone knows what bluetooth is, and how it works. But are also tired of pairing devices every time they switch between windows and linux (or another linux)
The steps below are taken from the arch wiki, because people find reading heard, and pictures are nice.
The steps must begin with windows because windows has no method of adding devices as files and registry is hard.
Windows
Setup
- Begin by downloading the PS exec tools, because these keys can only be accessed by the system account.
- In an admin shell, within the extracted psexec folder, run the command
.\PsExec64.exe -s -i regedit.exe
to start the tool.
- Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys
- Within this registry key, is one subkey per Bluetooth adapter, named by MAC address. Observe how there exists another folder, thats usually a Bluetooth 5.1 device
If there are multiple subkeys, and you are unsure of which to use, use Control Panel to find the MAC address for the desired Bluetooth adapter.

Normal Bluetooth Devices
- You might see some subkeys named by MAC addresses, each containing name-value pairs with names like
LTK
orIRK
. These subkeys (if any) are for Bluetooth 5.1 devices. - If the device you’re trying to share has a subkey, it is a Bluetooth 5.1 device.
- Right click on the adapter’s registry key and export it as a
.reg
file. Keep this where you can access it via linux.
Bluetooth 5.1 Devices
These are indicated by their own folder! Utilize the mentioned Arch Wiki’s table to prepare the 5.1 keys in a proper manner.
Linux
Setup
- Assuming you have previously paired these devices, you will have an easier time.
- Ensure the keys extracted from windows are in an accessible location.
- Find how to open your file manager via CLI if you do not know how to do so.
Preparing the Keys
Using python, run the following script to clean the keys. Refer to the Wiki table to see the necessary transformations in the Source Key and Transformations column
# Space removal:key_value = "ENTER YOUR KEY HERE".replace(" ", "")
# octet reversal:ERand=" 63 02 84 B8 5D 40 44 DF "ERand=list(reversed(ERand.strip().split()))
# additional decimal conversion required for some:int("".join(ERand), 16)
# base64 to hex conversion:binascii.hexlify(base64.decodebytes(b'...')).upper()
For example, An LTK of 48 4D AF CD 0F 92 22 88 0A 52 9A F4 76 DA 8B 94
makes for a LongTermKey.Key of 484DAFCD0F9222880A529AF476DA8B94
Putting Keys in Place
- Enter sudo mode and navigate to
/etc/bluetooth
. Then open themac address
folder (exampleF4:3B:D8:XX:XX:XX
).- The next steps will be easier using a gui, hence open your file manager while in root.
- Create or open the folder that matches the MAC address of your bluetooth device
3. Within the folder, create or open the info file.
4. With the editor of your choice, add the prepared keys from their respective files.
Example:
[General]Name=Keyboard K480...[LinkKey]Key=9A05DD2E2770920F419AXXXXXXXXXXXXType=5PINLength=0