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

  • Hello Matthew,

    What custom firmware are you trying to upload? An application or bootloader firmware?

    Could you specify where you get the error 4? In nRF Toolbox, or in the application?

    Are you trying to rename the DfuTarg before you reset, or is the application failing to update the name, and then it resets?

     

    Sorry there are a lot of questions and no answers, but I am just trying to understand where the issue occurs.

     

    Best regards,

    Edvin

     

  • Hi Edvin,

    I am trying to upload application error.  I see the error 4 as a print out from the nrf Toolbox app.  The app disconnects from the 52832 after reporting the error 4.

    By observing the log messages, my understanding is the nrf toolbox app is trying to rename the device from the name I've given it to DfuTarg before resetting the 52832 into bootloader mode.

  • Hello Mathew,

    I don't think that the phone is trying to rename the device. Are you sure that the phone is not trying to find a device named DfuTarg?

     

    Do you have another DK, so that you can try to do this using nRF Connect for Desktop?

     

    Is there something special that you have done with the bootloader? Static address, Bootloader requires bonding? Have you changed anything in the Bootloader project?

     

    Best regards,

    Edvin

  • Edvin,

    Attached are some of the log messages from the nrfToolbox with a successful update.

    There is a section where the app is 'Trying setting bootloader name to Dfu82561'.  In this case, the indication received is (0x):200201, which is successful.  The app then goes on to reset the 52832 and update the firmware. 

    I have see instances where the indication received is (0x):200204, which is the error number 4.  The app then reports this error and fails in the firmware update.  I'm wondering what could prevent the bootloader name from being changed to Dfu82561.

    Thanks!

    Verbose: Connecting to LSG Troffer 623B...

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

    Debug: [Callback] Central Manager did connect peripheral

    Info: Connected to LSG Troffer 623B

    Verbose: Discovering services...

    Debug: peripheral.discoverServices(nil)

    Info: Services discovered

    Verbose: Starting Secure DFU...

    Info: Connected to LSG Troffer 623B

    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 Dfu82561

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

    Debug: peripheral.writeValue(0x02084466753832353631, 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):200201

    Application: Response (Op Code = 2, Status = 1) received

    Application: Bootloader name changed successfully

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

    Debug: peripheral.writeValue(0x01, 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):200101

    Application: Response (Op Code = 1, Status = 1) received

    Debug: [Callback] Central Manager did disconnect peripheral

    Info: Disconnected by the remote device

    Verbose: Scanning for the DFU Bootloader...

    Info: DFU Bootloader found with name Dfu82561

    Verbose: Connecting to Dfu67852...

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

  • Do you have a log from when the update fails as well?

     

    BR,

    Edvin

Related