We are using the iOS DFU SDK https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library to update a device that is built against the nRF5 SDK 14.2.0. The problem is that from iOS we are unable to switch the device in to boot loader mode.
Using the Android nRF Connect app the DFU works except that after connecting to the device in app mode and initiating the DFU the device will disconnect and start advertising as a DfuTarg with the DFU service in its advertising packet. I need to go back in to the scanning screen of the nRF Connect app find the device, connect to it and initiate the DFU again.
When I try on iOS, either with the nRF Toolbox app or using the SDK in my code to initiate the DFU. The device never starts advertising as a DfuTarg, instead it just restarts in app mode. I verified that the device does not advertise as a DfuTarg with the DFU service by using the android nRF Connect app and scanning while the iPhone initiates the DFU.
If I initiate the DFU from the android nRF Connect app, but then scan and connect to the DfuTarg on the iPhone so the device is already in boot loader mode when the iPhone connects to it I am able to complete the DFU on the iPhone without any more problems.
I tried implementing the peripheralSelector and don't see a device in DFU mode only our device in app mode.
func select(_ peripheral: CBPeripheral, advertisementData: [String : AnyObject], RSSI: NSNumber, hint name: String?) -> Bool {
Here are the logs from the logger callbacks when using the iOS SDK
DFU Accepted ZIP File
DFU State = connecting
DFU: [Callback] Central Manager did update state to: Powered ON
DFU: Connecting to 574F48F5 KTV Front...
DFU: centralManager.connect(peripheral, options: nil)
DFU: [Callback] Central Manager did connect peripheral
DFU: Connected to 574F48F5 KTV Front
DFU: Discovering services...
DFU: peripheral.discoverServices(nil)
DFU: Services discovered
DFU: Starting Secure DFU...
DFU: Connected to 574F48F5 KTV Front
DFU: Services discovered
DFU: Secure DFU Service found
DFU: Discovering characteristics in DFU Service...
DFU: peripheral.discoverCharacteristics(nil, for: FE59)
DFU: DFU characteristics discovered
DFU State = starting
DFU: Enabling indications for 8EC90003-F315-4F60-9FB8-838830DAEA50...
DFU: peripheral.setNotifyValue(true, for: 8EC90003-F315-4F60-9FB8-838830DAEA50)
DFU: Indications enabled for 8EC90003-F315-4F60-9FB8-838830DAEA50
DFU: Buttonless DFU indications enabled
DFU: Application with buttonless update found
DFU State = enablingDfuMode
DFU: Trying setting bootloader name to Dfu61636
DFU: Writing to characteristic 8EC90003-F315-4F60-9FB8-838830DAEA50...
DFU: peripheral.writeValue(0x02084466753631363336, for: 8EC90003-F315-4F60-9FB8-838830DAEA50, type: .withResponse)
DFU: [Callback] Central Manager did disconnect peripheral
DFU: Disconnected by the remote device
DFU: Scanning for the DFU Bootloader...
If anyone has any suggestion as to what I need to do to successfully get the device to switch to the boot loader on the iPhone the help would be appreciated.
Thanks