Ghetto BT MAC address changer script

I recently ordered several BT adapters which have the CSR chip in them, but the ALL have the same address. Here is a simple little hacky script I made:

#!/bin/sh
set -x
sudo rfkill unblock all
hciconfig | grep hci | cut -c1-4 | while read -r line ; do
    echo "Processing $line"
    inc=`rand | cut -c1-2`
    sudo hciconfig $line up
   
    sudo bccmd -t hci -d $line psset -s 0 bdaddr da 00 12 71 7d 00 $inc 1a
    sleep 1
    sudo bccmd -d $line warmreset
    sleep 1
    sudo bccmd -d $line psget bdaddr
done

Blog tags: 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <python> <c>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.