I need help configuring Bluetooth earbuds for dual boot

im following this article in the Arch wiki:
https://wiki.archlinux.org/title/Bluetooth#Dual_boot_pairing
i already got from Windows the Bluetooth keys from the registry;
it looks something like this:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\f0d41555857e]
"XX800XX4d2XX"=hex:45,df,80,c5,XX,52,8d,02,XX,a0,2e,XX,9b,XX,a6,XX

it’s an LTK key that should look like this:
45DF80C537528D02DCA02E349B71A6F3

i cd into

cd /var/lib/bluetooth/   
[bluetooth]# ls
XX:D4:XX:55:XX:7E
[bluetooth]# cd F0:XX:15:XX:85:XX
[F0:XX:15:XX:85:XX]# ls
00:XX:66:XX:72:XX  A2:XX:BE:XX:E6:XX  AC:XX:0A:XX:D2:XX  cache  CC:14:BC:D9:8C:86  settings

now i don’t know how to proceed.

it would have been easier if i could do that through Dolphin and use nano.

Honestly and simply:
I don’t think your approach to the issue is correct.

“gymnastics” like this should never be neccessary

I do not have Windows - but do use my BT devices interchangably between Android and Linux - and they also work when I pair them with someone elses Windows device.

Not an issue.

This here looks like a classic XY problem (sorry!).

https://xyproblem.info/

:man_shrugging:
i also have no issues using these earbuds with an android phone or a different PC that also has windows,but apparently it’s different with Dual booting when the same adapter is being used.

when switching from one OS to the other i need to first remove the earbuds from the list and pair them again.
it’s a known issue and that’s why I’m following the wiki.

Ah - ok.

If you refer to the Arch Wiki
you should give / replicate
the literal responses that you got from each command in that wiki, in sequence
so that people who know how to do it can follow along with what you did

I cannot help - because I do not have a Windows system alongside (dual boot).
No Windows at all, actually.

Good luck!

heretic speaking:

can’t you teach/adjust Windows to accept an in Linux already paired device? :wink:
… the other way around, you know? :wink:

i made some progress;
apparently i need to edit the “info” file related to the earbuds DeviceMAC
/var/lib/bluetooth/<AdapterMAC>/<DeviceMAC>/info
i found it and it looks like this:

[General]
Name=WF-1000XM5
Class=0x240404
SupportedTechnologies=BR/EDR;
Trusted=true
Blocked=false
Services=00000000-deca-fade-deca-deafdecacaff;00001108-0000-1000-8000-00805f9b34fb;0000110b-0000-1000-8000-00805f9b34fb;0000110c-0000-1000-8000-00805f9b34fb;0000110d-0000-1000-8000-00805f9b34fb;0000110e-0000-1000-8000-00805f9b34fb;0000110f-0000-1000-8000-00805f9b34fb;0000111e-000>
WakeAllowed=true

[DeviceID]
Source=2
Vendor=1356
Product=3683
Version=513

[LinkKey]
Key=2C1XX0157XX6CCXX33XX6EAXXE455E6D
Type=4
PINLength=0

so if i’m not mistaking ,i need to replace the current LinkKEY with:
45DFXXC5375XXD0XXCAXXE3XXB7XX6F3

i didn’t think about it as i first stumbled upon the Arch wiki, and also suppose it’s easier to modify Linux than Windows.

Final command is showing 3 keys

Bluetooth - Saving the configuration - ArchWiki
If you have several keys, as in Bluetooth 5.1, edit the info file and substitute all applicable keys with their recorded values

info

[IdentityResolvingKey]
Key=001B6624726F

[PeripheralLongTermKey]
Key=A27EBE96E6C1

[SlaveLongTermKey]
Key=AC800A24D2E6

Dual Boot pairing

This page only describes the manual method of doing so. To automate the process, see the bt-dualboot project and the related repositories.

each one of these :

00:XX:66:24:XX:6F  A2:XX:BE:XX:E6:XX  AC:XX:0A:XX:D2:XX  CC:XX:BC:XX:8C:XX

is a different blutooth device(this is their DeviceMAC).
i ls into the right one AC:XX:0A:XX:D2:XX and found it’s info file.
you can see above.
i’ll edit it and report back.

Extracting on Linux

If this is not a Bluetooth 5.1 device, you will only see the pairing key:
If so, get your device’s key through hex:

hex 001B6624726F

But data shown in Archwiki does not look anything like data posted here

from arch wiki:

" If so, get your device's key through `hex`:

> hex 123456789876

:00000 XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX (some other chars).

this is what i got

in the windows registry key i also have
00000000
and
00000008

what i don’t understand is that my BT device is 5.3 and i should have a different output as you showed previously.

anyway,i’ll try with what i have for now and see.

yes - I was inclined to mention this as well,
but since I do not actually know anything about it except the info behind this link
I didn’t.

i prefer the manual approach and not have to mount Windows into Linux.

… no need to do that
in order for … anything … to work as described

(as far as I understood it)

but you will need to access the needed information if you want to follow the guide …

Mounting a Windows partition is simpler than the previous commands delivering confusing and inconsistent results

Mount a file system - Archwiki

To manually mount a file system located on a device (e.g., a partition) to a directory, use mount(8)

and may not be needed for bt-bluetooth

Advantages and alternatives

  • doesn’t require to reboot multiple times
  • simple install
  • provides single simple cli, doesn’t require invoke additional scripts
  • discover mounted Windows partition automatically
  • safe update of Windows Registry without changing file size (rewrite only)
  • backup Windows Registry prior update
  • doesn’t require import/export files, handle encoding issues
  • allows --dry-run prior actual changes

i succeeded and honestly it’s not complicated,but nothing is once you figure it out;

-pair earbuds in Linux so that the info file is created(then put them back in the case)
-pair earbuds in windows then follow above(arch wiki)instructions to retrieve 1.mac address of earbuds and 2. LinkKey(remove spaces,and the letters should be capital).
(put back earbuds in case)
-boot into Linux(don’t pair your earbuds!) and navigate to the folder of your earbuds(see above),edit the info file and replace the Linkkey with the one from windows.
reboot into Linux and put on the earbuds,they should pair automatically(don’t pair them manually).
it should also work on windows.

now i have to decide of the better way to sync the clocks(another dual-boot issue)

1 Like

Please see UTC vs Local Time in my Tutorial;
[Multiboot] Windows and Linux on Separate Disks:


UTC VS. LOCAL TIME

Linux defaults to using UTC time rather than Local time; Windows uses Local time.

This causes particular annoyance when multibooting, as each OS defaults to a different time standard and sets the BIOS clock accordingly on each boot. No matter how many times you might manually set the correct time (in either OS), it always resets after a reboot.

Methods exist to resolve this in Linux, however this author has found those to be unreliable. This issue only exists due to a Windows design flaw, or oversight; so, let Windows in turn assume the burden of repair.

Linux already handles UTC with superior grace.

The most elegant solution is to create a Windows registry file with the following content;

Let’s call it RealTimeIsUniversal.reg:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001

After merging this registry modification, Windows will be ready to set the BIOS time to UTC after the next reboot. Windows time will need to be manually set once after the reboot, but from that point forward, both Windows and Linux will use the UTC time standard.

Note that this modification will not affect your date/time display in Windows. Configure it as you would normally.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.