Skip to content

Instantly share code, notes, and snippets.

@dominicgs
Created July 26, 2013 04:48
Show Gist options
  • Save dominicgs/6086330 to your computer and use it in GitHub Desktop.
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
#!/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
@dominicgs
Copy link
Author

This is no longer the best way to achieve this. Use the bdaddr tool from the Bluez tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment