How to change the bluetooth device address (BD_ADDR)

Cheap bluetooth adapters often share the same bluetooth address (BD_ADDR). That is especially a problem if you want to use both at the same time with the same device. Fortunately one can change the address of a bluetooth adapter with the bdaddr command (delivered with recent versions of bluez-utils). This is a quick howto for recent versions of bluez.

1. Enable bluetooth

We need to enable bluetooth first, via systemctl. Don't plug in the bluetooth adapter!

# systemctl start bluetooth

2. Power on the adapter

Then we need to start bluetoothctl. We will end up in an interactive session, which allows us to configure all attached bluetooth controller.

# bluetoothctl

You should now see a prompt, which looks like that:


Now plug in the bluetooth adapter. A new device should show up, which looks like that:

[NEW] Controller 01:23:45:67:89:AB mymashine #2 [default]

Here 01:23:45:67:89:AB is the BD_ADDR of the new controller.
Now we need to select our controller via the select command.

[bluetooth]# select 01:23:45:67:89:AB

Once we've done that we need to power on our controller.

[bluetooth]# power on

The output will look similar to the one below:

[CHG] Controller 01:23:45:67:89:AB Class: 0x0000010c
Changing power on succeeded
[CHG] Controller  01:23:45:67:89:AB Powered: yes

The adapter is now ready to use. We can close our session via exit

3. Change the address

With bdaddr we can now change the BD_ADDR:
# bdaddr -i  01:23:45:67:89:AB  01:23:DE:AD:BE:EF

That's it, we're done! The new address is now 01:23:DE:AD:BE:EF.

Don't forget to disable bluetooth again, if you don't want to use it any longer:

# systemctl stop bluetooth

comments (0) - add comment

No comments so far, leave one?