This post shows how to change Bluetooth device address on Raspberry Pi.
Bluetooth device address (aka BD_ADDR, Bluetooth MAC address) is a 48-bit identifier assigned to each Bluetooth chip. Whether it can be changed is depends on each chip. Fortunately, Raspberry Pi’s on-board Bluetooth chip (Cypress/Broadcom) allows device address change.
Assumptions
Raspberry Pi board with on-board Bluetooth chip (e.g. Raspberry Pi3 B+, Raspberry Pi Zero W)
Steps
1. Prep
1-1.Install prerequisite package.
|
1 |
sudo apt-get install libbluetooth-dev |
1-2. Download the archived file of bdaddr tool. [1][2]
|
1 |
wget -U firefox http://www.petrilopia.net/wordpress/wp-content/uploads/bdaddrtar.bz2 |
1-3. Extract the archive file.
|
1 |
bzip2 -d bdaddrtar.bz2 && tar xf bdaddrtar |
1-4. Make.
|
1 |
cd bdaddr && make |
2. Bluetooth Address Change
2-1. Check the original Bluetooth address..
|
1 2 3 |
$ ./bdaddr -i hci0 Manufacturer: Broadcom Corporation (15) Device address: B8:27:EB:89:DA:DA |
2-2. Change Bluetooth device address.
|
1 |
sudo ./bdaddr -i hci0 -r 00:11:22:33:44:55 |
The result should be like this:
|
1 2 3 4 5 6 |
$ sudo ./bdaddr -i hci0 -r 00:11:22:33:44:55 Manufacturer: Broadcom Corporation (15) Device address: B8:27:EB:89:DA:DA New BD address: 00:11:22:33:44:55 Address changed - Device reset successully |
2-3. Reset hci device.
|
1 |
sudo hciconfig hci0 reset |
2-4. Also, restart bluetooth service.
|
1 |
sudo systemctl restart bluetooth.service |
3. Verify
3-1. Check the change with bdaddr tool.
|
1 2 3 |
$ ./bdaddr -i hci0 Manufacturer: Broadcom Corporation (15) Device address: 00:11:22:33:44:55 |
3-2. Check the change with bluetoothctl.
|
1 2 3 |
$ bluetoothctl [bluetooth]# list Controller 00:11:22:33:44:55 raspberrypi [default] |
References
[1] Change your bluetooth device mac-address
[2] Wget: Error 403- Can I get around this?

Nice article! It’s very informative post. Thanks for sharing such a great and helpful article. After reading through this article, I have got some ideas related to Raspberry pi. Best Raspberry Training Institute in India
Thanks, you made my day. I wrote a BLE program that worked
on an RPi 3B+ + SD card. When I used this SD card in another RPi
the program did not function anymore. Changing the MAC address
of the second RPi into that of the first made it function again.