chore: updated btw_win_linux.md guide
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: "Sharing same Bluetooth device on Windows/Linux dual-boot"
|
title: "Sharing same Bluetooth device on Windows/Linux dual-boot"
|
||||||
date: 2023-10-14
|
date: 2023-10-14
|
||||||
lastmod: 2023-10-14
|
lastmod: 2025-12-21
|
||||||
categories: ["Tutorial"]
|
categories: ["Tutorial"]
|
||||||
tags: ["linux","windows","bluetooth"]
|
tags: ["linux","windows","bluetooth"]
|
||||||
contentCopyright: true
|
contentCopyright: true
|
||||||
@@ -9,7 +9,95 @@ hideHeaderAndFooter: false
|
|||||||
---
|
---
|
||||||
This is a guide written on how to share the same Bluetooth device(s) across Windows and Linux without having to uniquely pair each.
|
This is a guide written on how to share the same Bluetooth device(s) across Windows and Linux without having to uniquely pair each.
|
||||||
<!--more-->
|
<!--more-->
|
||||||
## Steps
|
|
||||||
|
## Method 1: Extract Keys from Linux (Recommended)
|
||||||
|
|
||||||
|
This method uses `hivexsh` to read the Windows registry directly from Linux without needing to boot into Windows.
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
Install hivex:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Arch Linux
|
||||||
|
sudo pacman -S hivex
|
||||||
|
|
||||||
|
# Debian/Ubuntu
|
||||||
|
sudo apt install libhivex-bin
|
||||||
|
|
||||||
|
# Fedora
|
||||||
|
sudo dnf install hivex
|
||||||
|
```
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
|
||||||
|
1. Pair your Bluetooth device(s) with Linux **first**
|
||||||
|
2. Reboot into Windows, then re-pair the devices with Windows
|
||||||
|
3. Reboot back to Linux
|
||||||
|
4. Mount your Windows partition (if not already mounted):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo mount /dev/sdXN /mnt/windows
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Find your Bluetooth adapter MAC address and paired devices:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls /var/lib/bluetooth/
|
||||||
|
# Example output: 24:EB:16:23:5B:94
|
||||||
|
|
||||||
|
ls /var/lib/bluetooth/24:EB:16:23:5B:94/
|
||||||
|
# Example output: EC:66:D1:B1:9A:33 (your device)
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Use `hivexsh` to extract the pairing key from the Windows registry:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
hivexsh /mnt/windows/Windows/System32/config/SYSTEM
|
||||||
|
```
|
||||||
|
|
||||||
|
7. Navigate to the Bluetooth keys (MAC addresses are lowercase, no colons):
|
||||||
|
|
||||||
|
```text
|
||||||
|
cd ControlSet001\Services\BTHPORT\Parameters\Keys
|
||||||
|
ls
|
||||||
|
cd 24eb16235b94
|
||||||
|
lsval
|
||||||
|
```
|
||||||
|
|
||||||
|
Example output:
|
||||||
|
```text
|
||||||
|
"ec66d1b19a33"=hex(3):1d,68,ef,88,a8,fa,60,2e,a3,1c,69,2e,61,a4,36,4f
|
||||||
|
```
|
||||||
|
|
||||||
|
8. Convert the key to Linux format (remove commas, uppercase):
|
||||||
|
|
||||||
|
```text
|
||||||
|
1d,68,ef,88,a8,fa,60,2e,a3,1c,69,2e,61,a4,36,4f
|
||||||
|
→ 1D68EF88A8FA602EA31C692E61A4364F
|
||||||
|
```
|
||||||
|
|
||||||
|
9. Update the Linux Bluetooth info file:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo nano /var/lib/bluetooth/24:EB:16:23:5B:94/EC:66:D1:B1:9A:33/info
|
||||||
|
```
|
||||||
|
|
||||||
|
Replace the `Key=` value under `[LinkKey]` with the converted key.
|
||||||
|
|
||||||
|
10. Restart the Bluetooth service:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl restart bluetooth
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Method 2: Export Keys from Windows
|
||||||
|
|
||||||
|
This method requires exporting the registry keys while booted into Windows.
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
|
||||||
1. Pair your Bluetooth device(s) with Linux **first**
|
1. Pair your Bluetooth device(s) with Linux **first**
|
||||||
2. Reboot into Windows, then re-pair the devices with Windows
|
2. Reboot into Windows, then re-pair the devices with Windows
|
||||||
@@ -38,3 +126,8 @@ This is a guide written on how to share the same Bluetooth device(s) across Wind
|
|||||||
|
|
||||||
12. Paste the key from the previous step into the `Key=` portion of the **Linux** Bluetooth `info` file. Make sure to **remove all spaces, hyphens, and change all characters to upper-case (all-caps)**.
|
12. Paste the key from the previous step into the `Key=` portion of the **Linux** Bluetooth `info` file. Make sure to **remove all spaces, hyphens, and change all characters to upper-case (all-caps)**.
|
||||||
13. Save the `info` file with the changes to complete device sharing. Repeat for any other Bluetooth devices to share.
|
13. Save the `info` file with the changes to complete device sharing. Repeat for any other Bluetooth devices to share.
|
||||||
|
14. Restart the Bluetooth service:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl restart bluetooth
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user