bt-dualboot icon indicating copy to clipboard operation
bt-dualboot copied to clipboard

No LinkKey

Open tribbloid opened this issue 1 year ago • 11 comments

$ sudo ./bt-dualboot --sync-all --no-backup --dry-run
Traceback (most recent call last):
  File "/home/shared/conda/bin/./bt-dualboot", line 8, in <module>
    sys.exit(main())
  File "/home/shared/conda/lib/python3.9/site-packages/bt_dualboot/cli/app.py", line 342, in main
    app.run()
  File "/home/shared/conda/lib/python3.9/site-packages/bt_dualboot/cli/app.py", line 262, in run
    self.sync_all()
  File "/home/shared/conda/lib/python3.9/site-packages/bt_dualboot/cli/app.py", line 228, in sync_all
    devices_for_push = sync_manager.devices_needs_sync()
  File "/home/shared/conda/lib/python3.9/site-packages/bt_dualboot/bt_sync_manager/bt_sync_manager.py", line 129, in devices_needs_sync
    index = self._index_devices()
  File "/home/shared/conda/lib/python3.9/site-packages/bt_dualboot/bt_sync_manager/bt_sync_manager.py", line 61, in _index_devices
    linux_devices   = get_linux_devices()
  File "/home/shared/conda/lib/python3.9/site-packages/bt_dualboot/bt_linux/devices.py", line 40, in get_devices
    return [bluetooth_device_factory(device_path) for device_path in get_devices_paths()]
  File "/home/shared/conda/lib/python3.9/site-packages/bt_dualboot/bt_linux/devices.py", line 40, in <listcomp>
    return [bluetooth_device_factory(device_path) for device_path in get_devices_paths()]
  File "/home/shared/conda/lib/python3.9/site-packages/bt_dualboot/bt_linux/bluetooth_device_factory.py", line 55, in bluetooth_device_factory
    info = extract_info(device_info_path)
  File "/home/shared/conda/lib/python3.9/site-packages/bt_dualboot/bt_linux/bluetooth_device_factory.py", line 39, in extract_info
    "pairing_key":  config.get("LinkKey", "Key"),
  File "/home/shared/conda/lib/python3.9/configparser.py", line 781, in get
    d = self._unify_values(section, vars)
  File "/home/shared/conda/lib/python3.9/configparser.py", line 1152, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'LinkKey'

How did this happen?

tribbloid avatar Aug 26 '23 22:08 tribbloid

Perhaps this tool cannot handle bluetooth 5 very well. This error message is telling that bluetooth device info file does not contain 'LinkKey' section. In my case, i inspect all my bluetooth device and notice that bt 5.0 device just has no 'LinkKey' section.

I meet the same problem, and solved by editing some files manually following this guide. It will tell you how to handle bluetooth 5.1 device. There somehow is a little weird difference between bt 5.1 and 5.0. Details are in its discussion page, witch might also be helpful.

Hyffer avatar Sep 03 '23 04:09 Hyffer

if that's the case, the project should be considered obsolete.

tribbloid avatar Sep 03 '23 17:09 tribbloid

Facing the same issue.

edwinclement08 avatar Sep 05 '23 15:09 edwinclement08

I have exactly the same issue trying to sync xbox x controller from win10 to arch linux.

R8s6 avatar Sep 24 '23 20:09 R8s6

RIP. There's an article on Arch Wiki that linked to this tho: https://wiki.archlinux.org/title/Bluetooth#Dual_boot_pairing

It also has some manual instructions there

justin13888 avatar Nov 30 '23 07:11 justin13888

I checked on my machine, and it happens with some devices. My mouse doesn't have the linkKey setting. Maybe if there's no link key, we don't need to sync it?

wmeints avatar Dec 29 '23 06:12 wmeints

You still need to sync it, using the Arch Wiki guide posted by Hyffer and justin. Itʼs just that this tool wonʼt do it, and #14 apparently doesnʼt work anymore.

dhouck avatar Dec 29 '23 08:12 dhouck

Yeah and project seems unmaintained now. Personally don't need this feature anymore because I changed my setup but I'd be interested in hearing about any new progress made for this!

justin13888 avatar Jan 12 '24 13:01 justin13888

In my case temporarily unpairing the device without the LinkKey section was sufficient to sync other devices.

superrnovae avatar Feb 26 '24 16:02 superrnovae

Same issue here with a ZMK/Nice!Nano keyboard

cobowers avatar Mar 02 '24 22:03 cobowers

Had the same issue with missing LinkKey. https://github.com/ademlabs/synckeys works for me.

ngocvantran avatar Apr 15 '24 20:04 ngocvantran