This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

OTA DFU not working

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.zip
Parts: 1
Size: 85 KB
Soft Device Size: Zero KB
Bootloader Size: Zero KB
[Callback] Central Manager did update state to: Powered ON
Connecting to [app name] v0.2...
centralManager.connect(peripheral, options: nil)
[Callback] Central Manager did connect peripheral
Connected to [app name] v0.2
Discovering services...
peripheral.discoverServices(nil)
Services discovered
Starting Secure DFU...
Connected to [app name] v0.2
Services discovered
Secure DFU Service found
Discovering characteristics in DFU Service...
peripheral.discoverCharacteristics(nil, for: FE59)
DFU characteristics discovered
Enabling indications for 8EC90003-F315-4F60-9FB8-838830DAEA50...
peripheral.setNotifyValue(true, for: 8EC90003-F315-4F60-9FB8-838830DAEA50)
Indications enabled for 8EC90003-F315-4F60-9FB8-838830DAEA50
Buttonless DFU indications enabled
Application with buttonless update found
Writing 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-838830DAEA50
Indication received from 8EC90003-F315-4F60-9FB8-838830DAEA50, value (0x):200101
Response (Op Code = 1, Status = 1) received
[Callback] Central Manager did disconnect peripheral
Disconnected by the remote device
Scanning for the DFU Bootloader...
centralManager.scanForPeripherals(withServices, [FE59]
Scanning timed out returning no matching peripherals!
centralManager.stopScan()

Parents Reply Children
  • Hi Ronnie I am having this exact same issue with code I am working on for a custom board. Would you know the specific name of the sdk_config file for the bootloader because I have feeling that is the error I am getting as well. I get the same exact errors that you were getting

  • Hi Peter,

    I think what I was referring to was that I had made the necessary changes (LF clock source etc) to the sdk_config.h file located at:

    SDK/examples/ble_peripheral/MyProject/pca10040/s132/config/sdk_config.h

    but not to the one located at:

    SDK/examples/dfu/secure_bootloader/pca10040_s132_ble_debug/config/sdk_config.h

    Hope this helps!

  • Hi Ronnie, 

    I tired those changes and so far I am still stuck. I have a little bit of progress, buttonless dfu template application by itself, when I run it on my custom boards, is seemingly accepting the firmware and I get an application sent notification after loading process but then when I restart board it shows up as DFU target again. I added DFU to my application that I am working on and I couldn't get it to work through the context of the application.

    I followed the same tutorial you did for adding DFU. Since my buttonless dfu template app seems to be the closest to working on my custom boards I am planning on adding my other firmware to a copy of that app so that I can run everything there. 

    Would you be able to send me some of the application firmware you used just so that it can inform something on my part on the debugging side? I am using a BL652, which is different than a BMD300 in some ways but I think it has the same config from a clock standpoint in order for the firmware to be comparable and interchangeable. 

    Thank you

Related