Tremend on Facebook

Change your Bluetooth address of your Linux machine

August 10th, 2007 by Bogdan Nitulescu in Bluetooth, General, Linux

Do you have Bluetooth on your computer? Is it a Linux machine? For some weird reason, do you need it to have a different address?

If you answered yes to the above, here’s the magic command:

bccmd -d 0 psset -s 0 bdaddr 0x44 0x00 0x66 0x55 0x33 0x00 0x22 0x11

…and your Bluetooth device address (BDA) becomes 11:22:33:44:55:66. Of course, you will replace the underlined numbers with the actual address that you want to write.

It does not always work. You need bluez-utils 3, and you need a CSR chip in your computer or USB dongle. To find out, type hciconfig hci0 version and the manufacturer should be Cambridge Silicon Radio. Last time I checked, they had~70% market share, so you have a good chance of having one.

If you have more than a single device, use “bccmd -d 1 …” for hci1, and so on.

The option -s 0 stores it into the default memory, which is usually RAM – so the new address may be lost after reboot. Your chip may have various ROM stores – use -s 1 to -s 3. If you want specifically to write your new address in ram, use -s 4. Note that the store with the highest number has priority (e.g. if an address is stored in both RAM and flash, RAM has priority)

For gory details about programming CSR chips, you can get documents from http://www.csrsupport.com/

DZoneGoogle ReaderYahoo MessengerRedditEmailDelicious

You might also like

Enumerating LAN and WLAN clients on a Linux router A while ago I was asked to take a WiFi router and add some bell and whistles to its interface. It was...
Perforce Windows shell integration I'm happy again. Perforce shell integration used to make my machine hang on every file browse operation....
Getting updated Bluetooth discovery names from nearby devices I've needed to see updated information related to nearby Bluetooth devices. When using < hcitool...
Where in the /dev is the card reader? I've plugged a card reader in a USB socket on my Linux box and it's not that trivial to know if it's...
.

4 Responses

  1. eman Says:

    is that the only way? isn’t there a way to do it maybe with “hcitool cmd -something-“…? (too lazy to upgrade bluez-utils….. :D)

  2. Nitz Says:

    “bccmd” actually does the equivalent of two “hcitool cmd …” – first reads the size of the memory buffer in the dongle, the second writes the new address into the buffer.

    The exact way to do that is found in “tools/bccmd.c” from the bluez-utils source package, but I did not have time to transform that into a nice script. It makes more sense to compile and run the bccmd tool itself on your system.

  3. Mario Says:

    is it possible to change the bda in windows? if you can build a tool to do that please? thanks

  4. Nitz Says:

    It might be possible, but I don’t know of any Bluetooth driver that allows you to change it.

    But there’s nothing to stop you to boot your PC using a Linux live CD, change the address, then go back to Windows!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.