[patch/fix] bluetooth tethering
I needed to tether to my Transformer Prime tablet over Bluetooth and installed CM9, only to discover that Bluetooth was well, broken. Checking netcfg, the problem appeared to be that Bluetooth had a default MAC address of 43:29:b0:00:00:00. This post http://forum.xda-developers.com/show...1&postcount=10
suggests that it shouldn't affect bluetooth, but I suspected a bad MAC address would break Bluetooth PAN.
Looking around it looks like the property ro.bt.btaddr_path is supposed to be set from efs. Problems: 1 - property is not set 2 - I have no idea how to read efs.
So I dug around the source code and figured out that some program called brcm_patchram_plus is supposed to set the MAC address. I hardcoded the MAC address and voila! Bluetooth PAN and tethering work!
I provide the brcm_patchram_plus to this post in case anyone needs a quick fix to this problem - I think the new behavior I add is actually okay, if it errors on finding " ro.bt.btaddr_path", it sets the MAC to c8:ef:ab:cc:17:20, which other bt devices should be happy with. I'd submit this to git somewhere but haven't figured out how to do it.
The correct fix should be to check if some file exists in init.rc, if it doesn't generate a random file containing a mac address and set ro.bt.btaddr_path to it. Don't have time to do that, so I'll leave it to people here.
Also, I don't know how to make a update.zip anymore, so I'll let other people figure it out. But using some terminal emulator, first copy brcm_patchram_plus to your sdcard and run:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
cp /sdcard/brcm_patchram_plus /system/bin/brcm_patchram_plus
chmod 755 /system/bin/brcm_patchram_plus
restart your phone. You'll probably have to repair everything since you have a new MAC now. also your MAC will be set to c8:ef:ab:cc:17:20.