OSX CoreBluetooth GATT Cache¶
CoreBluetooth caches GATT attributes, so if you change things you are unlikely to see them unless you clear the cache.
There are lots of HOWTOs explaining how to do this but they all involve deleting
/Library/Preferences/com.apple.Bluetooth.plist which also blows away all your pairing information about all bluetooth devices. There’s a better way.
From this StackOverflow question:
sudo defaults write /Library/Preferences/com.apple.Bluetooth CoreBluetoothCache -dict sudo launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist sudo launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist
I’ve noticed that it can cause some momentary (a minute or two) instability/hanging with the bluetooth subsystem on OSX, but it will settle down and does work.