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

DFU failure

I'm using SDK 15 and soft device S132 6.0.  Using nrf Toolbox to update custom firmware, I'm running into a situation where the DFU update fails with an error code 4 when trying to rename to DfuTarg before resetting into the bootloader.  

What are some possible reasons why this failure could occur?  What is error code 4?

I'm using similar firmware in other instances and have not had this error occur, so I'm looking for reasons why this error could occur.

Thanks,

Matthew

  • Edvin,

    The messages for a failure are below.  I think I can isolate the problem to a specific application version that I've written.  I don't know of a good way to debug issues related to DFU, so I'm trying to what sort of issue could prevent the device renaming from occurring.

    Thanks!

    Verbose: Connecting to LSG Troffer A7E0...

    Debug: centralManager.connect(peripheral, options: nil)

    Debug: [Callback] Central Manager did connect peripheral

    Info: Connected to LSG Troffer A7E0

    Verbose: Discovering services...

    Debug: peripheral.discoverServices(nil)

    Info: Services discovered

    Verbose: Starting Secure DFU...

    Info: Connected to LSG Troffer A7E0

    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 indications for 8EC90003-F315-4F60-9FB8-838830DAEA50...

    Debug: peripheral.setNotifyValue(true, for: 8EC90003-F315-4F60-9FB8-838830DAEA50)

    Verbose: Indications enabled for 8EC90003-F315-4F60-9FB8-838830DAEA50

    Application: Buttonless DFU indications enabled

    Warning: Application with buttonless update found

    Verbose: Trying setting bootloader name to Dfu05676

    Verbose: Writing to characteristic 8EC90003-F315-4F60-9FB8-838830DAEA50...

    Debug: peripheral.writeValue(0x02084466753035363736, for: 8EC90003-F315-4F60-9FB8-838830DAEA50, type: .withResponse)

    Info: Data written to 8EC90003-F315-4F60-9FB8-838830DAEA50

    Info: Indication received from 8EC90003-F315-4F60-9FB8-838830DAEA50, value (0x):200204

    Error: Error 4: Operation failed

    Verbose: Disconnecting...

    Debug: centralManager.cancelPeripheralConnection(peripheral)

    Debug: [Callback] Central Manager did disconnect peripheral

    Info: Disconnected

  • Ok. So it is only for one particular DFU project that you are trying to upload? That would suggest that the issue is not in the bootloader. 

     

    Are you sure that you are using the correct application version (at least one higher than the application that is already running?)

    Can you please try to perform the DFU operation with nRF Connect for Desktop, and see where it fails there?

    Do you get any messages like "INVALID_OBJECT", or "INSUFFICIENT_AUTHENTICATION"?

     

    Does your bootloader require bonding? (By default it does not, so if you have not changed that part, then it probably doesn't).

     

    Best regards,

    Edvin

  • Edvin,

    I agree that I don't think the issue is the bootloader, and the bootloader does not require bonding. The issue is not with the firmware version. I have built my application from the Buttonless DFU template application with no bonding.  Here's my question:

    Under what state, or under what condition, would the Buttonless DFU template application receive and then reject the renaming request from the nrf Toolbox app?

    Thanks!

  • Hello,

    I don't know.

    Typically the device performing the DFU operation doesn't rename the device. The device, DfuTarg is defined in the bootloader application:

    SDK\examples\dfu\secure_bootloader\pca_10040\config\sdk_config.h.

     

    Can you please try with nRF Connect and see what sort of error you get there?

     

     

     

  • I downloaded nRF connect for Mac but I'm not sure how to use it to perform firmware updating.  Do I need to use the windows version?

Related