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

Parents
  • 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)

Reply
  • 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)

Children
Related