Hello,
I have developed my own iOS app which is capable of DFU update different devices with nRF51 and nRF52 chips.
Using only APP file (both .hex and .zip) works perfectly. Now I am having an issue with updating with a ZIP file containing SD+BL+APP.
For the full zip, the app successfully uploads the first image, then disconnects, reconnects again, reads services and characteristics, it enables a notification and it finally fails on writing the first characteristics ("Writing is not permitted"). Here are more details:
- I am using Xcode 10.0 and iOS 12.0
- I am using the iOSDFULibrary version updated yesterday (4.1.3?)
- I am trying to update from SDK 12.2.0 and softdevice 3.1.0 to SDK 13.1.0 and softdevice 4.0.5
- I have tried both using the "forceDfu" flag to true and false
- "Service Changed" is enabled in the new firmware (not in the old one)
- The name is changed on the new DFU, but I don't think this is an issue as it successfully reconnect for the second image.
- I am using Secure DFU.
Here is a the log of the app when it fails:
... 98% (1/2) 99% (1/2) Verbose: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50... Debug: peripheral.writeValue(0x03, for: 8EC90001-F315-4F60-9FB8-838830DAEA50, type: .withResponse) 100% (1/2) Info: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50 Info: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600301502f02005cc7604c Application: Checksum (Offset = 143184, CRC = 4C60C75C) received Verbose: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50... Debug: peripheral.writeValue(0x04, for: 8EC90001-F315-4F60-9FB8-838830DAEA50, type: .withResponse) Info: Data written to 8EC90001-F315-4F60-9FB8-838830DAEA50 Info: Notification received from 8EC90001-F315-4F60-9FB8-838830DAEA50, value (0x): 600401 Application: Data object executed Application: Upload completed in 66.42 seconds Debug: [Callback] Central Manager did disconnect peripheral Info: Disconnected by the remote device Verbose: Connecting to iBKSDFU52V3... Debug: centralManager.connect(peripheral, options: nil) Debug: [Callback] Central Manager did connect peripheral Info: Connected to iBKSDFU52V3 Verbose: Discovering services... Debug: peripheral.discoverServices([FE59]) Info: Services discovered Verbose: Secure DFU Service found Verbose: Discovering characteristics in DFU Service... Debug: peripheral.discoverCharacteristics(nil, for: FE59) Info: DFU characteristics discovered Verbose: Enabling notifications for 8EC90001-F315-4F60-9FB8-838830DAEA50... Debug: peripheral.setNotifyValue(true, for: 8EC90001-F315-4F60-9FB8-838830DAEA50) Verbose: Notifications enabled for 8EC90001-F315-4F60-9FB8-838830DAEA50 Application: Secure DFU Control Point notifications enabled Verbose: Writing to characteristic 8EC90001-F315-4F60-9FB8-838830DAEA50... Debug: peripheral.writeValue(0x0601, for: 8EC90001-F315-4F60-9FB8-838830DAEA50, type: .withResponse) Error: Writing to characteristic failed. Check if Service Changed service is enabled. Error: Error 3: Writing is not permitted. Verbose: Disconnecting... Debug: centralManager.cancelPeripheralConnection(peripheral) Debug: [Callback] Central Manager did disconnect peripheral Info: Disconnected
Please let me know if you need me to provide any other information.
Thanks in advance,
BR,
Gabriel.