Created
July 26, 2013 04:48
-
-
Save dominicgs/6086330 to your computer and use it in GitHub Desktop.
A script to change the address of a CSR Bluetooth dongle using bccmd.
Example:
# set_bdaddr.sh hci1 01 02 03 04 05 06
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#hci1 01:02:03:04:05:06 | |
#bccmd -d hci1 psset bdaddr 04 00 06 05 03 00 02 01 | |
CMD="bccmd -d $1 psset bdaddr $(($5)) 00 $(($7)) $(($6)) $(($4)) 00 $(($3)) $(($2))" | |
echo $CMD | |
$CMD | |
bccmd -d $1 warmreset | |
/etc/init.d/bluetooth restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is no longer the best way to achieve this. Use the
bdaddr
tool from the Bluez tools.