3

I have paired a Bluetooth keyboard and mouse with my Pi3 running Raspbian.

I am setting up Ubuntu MATE 16.04 on another SD Card to run on the same Pi3.

I would like to use the keyboard and mouse on both distributions. I expect this is possible, as I am using the same hardware.

I guess if I pair on Ubuntu this will break pairing on Raspbian (or will it)?

Where is the Bluetooth pairing stored on Raspbian?

1

Pairings are stored in /var/lib/bluetooth, but I have not tested if they're easily transferable to another system. You will certainly need to change the top directory to match system's bluetooth MAC.

In below example "A4:37:FB:E3:AC:CF" is RPI's MAC, "B0:A3:E6:A3:8B:A4" is a paired peripheral:

# find /var/lib/bluetooth/
/var/lib/bluetooth/
/var/lib/bluetooth/A4:37:FB:E3:AC:CF
/var/lib/bluetooth/A4:37:FB:E3:AC:CF/settings
/var/lib/bluetooth/A4:37:FB:E3:AC:CF/B0:A3:E6:A3:8B:A4
/var/lib/bluetooth/A4:37:FB:E3:AC:CF/B0:A3:E6:A3:8B:A4/info
/var/lib/bluetooth/A4:37:FB:E3:AC:CF/cache
/var/lib/bluetooth/A4:37:FB:E3:AC:CF/cache/B0:A3:E6:A3:8B:A4
  • For my Pi, I have 2 MicroSDs with Raspbian. I back up the pairings on card 1: sudo tar zcf bluetooth_pairings.tgz /var/lib/bluetooth and restore them on card 2: sudo tar xzf bluetooth_pairings.tgz -C / Works for me! – Colin May 5 '18 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.