Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bluetooth pairing keys install #1

Open
bam80 opened this issue May 26, 2023 · 12 comments
Open

bluetooth pairing keys install #1

bam80 opened this issue May 26, 2023 · 12 comments

Comments

@bam80
Copy link

bam80 commented May 26, 2023

I would like to install pre-existing bluetooth pairing keys with Ansible to make BT mouse work after system install.
Is it possible?

@vbotka
Copy link
Owner

vbotka commented May 26, 2023

How do you copy the keys without Ansible? Post a script.

@bam80
Copy link
Author

bam80 commented May 27, 2023

I don't have such a script, but here is the code to copy BLE keys from Linux to Windows:
https://github.com/x2es/bt-dualboot/pull/14/files

@vbotka
Copy link
Owner

vbotka commented May 27, 2023

The description is in:

Quote: "Sync Bluetooth for dual-boot Linux and Windows"

If you install bt-dualboot the simple task below should do the job

- hosts: all
  tasks:
    - command: 'sudo bt-dualboot --sync-all'

Let me know if this works for you. We can add it to the role then.

@bam80
Copy link
Author

bam80 commented May 28, 2023

What I can see from the doc, --sync-all is suitable for syncing all the devices between Linux and Windows.
What I need is:

  • pull the keys from existing Linux hosts as a backup measure
  • sync the backed up keys with Linux hosts needed

@vbotka
Copy link
Owner

vbotka commented May 28, 2023

I see. Unfortunately, I have no Linux/Windows dual-boot to test it. Still the same Let me know if bt-dualboot is working for you. Feel free to submit a PR.

@bam80
Copy link
Author

bam80 commented May 28, 2023

the syncing between Linux and Windows works fine, I tested it

@vbotka
Copy link
Owner

vbotka commented May 28, 2023

Good to know. Feel free to submit a PR.

@bam80
Copy link
Author

bam80 commented May 29, 2023

I thought maybe the measures to gather bt keys as part of other hw info are already exist?
That would be start I guess. And then the copy itself.
I'm not familiar with Ansible architecture enough to say that.

@bam80
Copy link
Author

bam80 commented May 29, 2023

Alternatively, if it possible to forcibly set a key for BT connection, that would be good to know

@vbotka
Copy link
Owner

vbotka commented May 29, 2023

I thought maybe the measures to gather bt keys as part of other hw info ...

BT keys are not part of HW info the same way any other keys (ssh, gpg, ...) are not.

@vbotka
Copy link
Owner

vbotka commented May 29, 2023

Alternatively, if it possible to forcibly set a key for BT connection, that would be good to know

You can ask this in the bt-dualboot project.

@bam80
Copy link
Author

bam80 commented May 29, 2023

OK, so the idea is to handle it the same way as WiFi key then.
IIUC, the script above does reading the key from Linux configs, we would need to rework it so it could write instead.
I'm not a python programmer so some help would be welcomed.

There are also many approaches supporting Windows to Linux sync, those might be more interesting for our case as they support "write" to Linux from exported file:
https://github.com/x2es/bt-dualboot#alternatives
We would need to investigate which of the projects suits best for our needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants