Hi,
I've got buttonless OTA DFU working on nRF52 DK by following this tutorial:
academy.novelbits.io/.../
However, when I try to run the exact same thing on my own board which uses a BMD-300 (nRF52832) module, it doesn't work. I've erased the BMD-300 and programmed it with a hex file containing the secure bootloader, SoftDevice s132, bootloader settings and the application, which seems to run correctly and allows me to connect, as seen in this screenshot from the nRF Connect app on iOS:
However, when I click through to DFU and try to run the update (which works fine on the nRF52 DK), it gives the following error:
The full text output is below - any help on how to debug this would be much appreciated!
*****
File Name: app_update_0_3.zipParts: 1Size: 85 KBSoft Device Size: Zero KBBootloader Size: Zero KB[Callback] Central Manager did update state to: Powered ONConnecting to [app name] v0.2...centralManager.connect(peripheral, options: nil)[Callback] Central Manager did connect peripheralConnected to [app name] v0.2Discovering services...peripheral.discoverServices(nil)Services discoveredStarting Secure DFU...Connected to [app name] v0.2Services discoveredSecure DFU Service foundDiscovering characteristics in DFU Service...peripheral.discoverCharacteristics(nil, for: FE59)DFU characteristics discoveredEnabling indications for 8EC90003-F315-4F60-9FB8-838830DAEA50...peripheral.setNotifyValue(true, for: 8EC90003-F315-4F60-9FB8-838830DAEA50)Indications enabled for 8EC90003-F315-4F60-9FB8-838830DAEA50Buttonless DFU indications enabledApplication with buttonless update foundWriting to characteristic 8EC90003-F315-4F60-9FB8-838830DAEA50...peripheral.writeValue(0x01, for: 8EC90003-F315-4F60-9FB8-838830DAEA50, type: .withResponse)Data written to 8EC90003-F315-4F60-9FB8-838830DAEA50Indication received from 8EC90003-F315-4F60-9FB8-838830DAEA50, value (0x):200101Response (Op Code = 1, Status = 1) received[Callback] Central Manager did disconnect peripheralDisconnected by the remote deviceScanning for the DFU Bootloader...centralManager.scanForPeripherals(withServices, [FE59]Scanning timed out returning no matching peripherals!centralManager.stopScan()
Hello,
Have you tried to use another phone that is not currently doing the DFU (or using nRF Connect for Desktop) to see whether you see the advertisments from the DFU target starting after the devices…
Have you tried to use another phone that is not currently doing the DFU (or using nRF Connect for Desktop) to see whether you see the advertisments from the DFU target starting after the devices disconnect? If you can't see them, please try to use the _debug bootloader project (in your case that would be SDK\examples\dfu\secure_bootloader\pca10040_s132_ble_debug) and monitor the RTT log from the bootloader? What does it say?
Best regards,
Edvin
Hi Edvin,
Thanks for your response. I've just tried with the _debug bootloader project, but this doesn't even appear in nRF Connect app at all when run on the BMD-300 (it works as expected when following the exact same process on the DK board..)
Aha - a very silly oversight on my part - eventually realised there are separate sdk_config.h files for the bootloader and the application itself - and I'd made the necessary changes (to do with LF clock source etc) to the app one but not the bootloader. Sorted now - thanks again for your response!