0

How can I copy Bluetooth pairings from a working Raspbian to a fresh installation.

Setting up on each new installation destroys existing pairings.

Milliways
  • 59,890
  • 31
  • 101
  • 209

1 Answers1

1

As part of the procedures I wrote for configuring a fresh installation of Raspbian (now Raspberry Pi OS) I use the following steps to transfer Bluetooth pairings.

Preparation on working Pi
3. Backup Bluetooth
    sudo su
    tar cf bluePi.tar /var/lib/bluetooth

On a fresh installation of Raspberry Pi OS on the Pi 13 Restore Bluetooth sudo su cd / tar xf /home/pi/bluePi.tar

I have used this to setup Bluetooth from Jessie => Stretch and again from Stretch => Buster
It can also be used to transfer Bluetooth from Raspberry Pi OS (32-bit) with desktop => Raspberry Pi OS (32-bit) Lite which lacks the tools to perform the setup.

I use the SD Card in each of my Pi to setup Bluetooth so I have settings for the Bluetooth controllers on each Pi allowing me to easily transfer SD Card between Pi.
NOTE this does not magically allow Bluetooth devices to be paired to multiple controllers; the normal pairing restrictions apply, but I have a keyboard which can be paired to 3 controllers.

Milliways
  • 59,890
  • 31
  • 101
  • 209
  • To be clear re the Raspberry Pi OS (32-bit) with desktop => Raspberry Pi OS (32-bit) Lite transfer: Once transferred to the "Lite" host, does Bluetooth operate with the same device (e.g. BT speaker) as was paired with on the "Desktop" machine? I.e. BT spkr named XYZ paired, connected & operational on "Desktop". After xfer to "Lite" system, will "Lite" also pair, connect & play to spkr XYZ? – Seamus Sep 14 '20 at 00:57
  • @Seamus I can't comment on BT speaker - I have only used one with Raspberry Pi with desktop. I see no reason it wouldn't (assuming the correct software is present) I note my Lite doesn't seem to be running bluealsa.service. It certainly works with keyboard & mouse (although there is little point is using a mouse on Lite) – Milliways Sep 14 '20 at 03:58