I added a way to go from a running application into DFU mode using a custom characteristic and GPRETEG. However, CoreBluetooth caches services and characteristics for each BLE device and does not discover the DFU characteristics once the device enters DFU mode.
The only way to make this work is to manually clear the cache using:
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
Is anyone aware of a way to disable this caching?