dfu upgrade failed

Hi,

Customers have reported the problem of dfu upgrade failure, and we also use the same type of mobile phone (iPhone 11 & iPhone XR) for testing. It is found that there is indeed a problem of upgrade failure, but this failure is random and does not happen often. And, once there is an upgrade failure, it will keep appearing. At least for a while, the upgrade was unsuccessful. The current software uses sdk 17.1 and flash_s140_nrf52_7.3.0_softdevice.

Some logs on failure:

Parts: 1
Size: 303 KB
Soft Device Size: Zero KB
Bootloader Size: Zero KB
Connecting to Bt_test
Connected to Bt_test
Discovering services...
Services discovered
Starting Secure DFU...
Connected to Bt_test
Services discovered
Secure DFU Service found
Discovering characteristics in DFU Service...
DFU characteristics discovered
Enabling indications for 8EC90003-F315-4F60-9FB8-838830DAEA50...
Indications enabled for 8EC90003-F315-4F60-9FB8-838830DAEA50
Buttonless DFU indications enabled
Application with buttonless update found
Trying setting bootloader name to Dfu10658
Writing to characteristic 8EC90003-F315-4F60-9FB8-838830DAEA50...
Data written to 8EC90003-F315-4F60-9FB8-838830DAEA50
Indication received from 8EC90003-F315-4F60-9FB8-838830DAEA50, value (0x):200204
Error 4: Operation failed
Disconnecting...
Disconnected

Some logs when the upgrade is successful:

Parts: 1
Size: 303 KB
Soft Device Size: Zero KB
Bootloader Size: Zero KB
Connecting to Bt_test
Connected to Bt_test
Discovering services...
Services discovered
Starting Secure DFU...
Connected to Bt_test
Services discovered
Secure DFU Service found
Discovering characteristics in DFU Service...
DFU characteristics discovered
Enabling indications for 8EC90003-F315-4F60-9FB8-838830DAEA50...
Indications enabled for 8EC90003-F315-4F60-9FB8-838830DAEA50
Buttonless DFU indications enabled
Application with buttonless update found
Trying setting bootloader name to Dfu33136
Writing to characteristic 8EC90003-F315-4F60-9FB8-838830DAEA50...
Data written to 8EC90003-F315-4F60-9FB8-838830DAEA50
Indication received from 8EC90003-F315-4F60-9FB8-838830DAEA50, value (0x):200201
Response (Op Code = Set Name, Status = Success) received
Bootloader name changed successfully
Writing to characteristic 8EC90003-F315-4F60-9FB8-838830DAEA50...
Data written to 8EC90003-F315-4F60-9FB8-838830DAEA50
Indication received from 8EC90003-F315-4F60-9FB8-838830DAEA50, value (0x):200101
Response (Op Code = Enter Bootloader, Status = Success) received
Disconnected.
Disconnected by the remote device
Scanning for the DFU Bootloader...
DFU Bootloader found with name Dfu33136
Connecting to Dfu36593...
Connected to Dfu36593
Discovering services...
Services discovered
Secure DFU Service found
Discovering characteristics in DFU Service...
DFU characteristics discovered
MTU set to 247
Enabling notifications for 8EC90001-F315-4F60-9FB8-838830DAEA50...
Notifications enabled for 8EC90001-F315-4F60-9FB8-838830DAEA50

This seems to be a probabilistic problem, how can I fix it?

thanks.

Parents
  • Hi

    Is this reproducible with the buttonless_DFU example project in SDK 17.1.0 or has the customer made any changes to it to trig these errors? 

    The error you're seeing indicates that the bootloader failed to store the new advertisement name to flash, possibly due to a flash timeout.

    A flash timeout means that the SoftDevicewas unable  to schedule a flash operation which was successfully requested by the application/bootloader. This should not happen unless there is a lot of BLE activity in parallel with the flash writes. Please have a look at table 1 in the Flash memory API chapter and see if your application meets any of the criteria for low to medium probability of success.

    Best regards,

    Simon

Reply
  • Hi

    Is this reproducible with the buttonless_DFU example project in SDK 17.1.0 or has the customer made any changes to it to trig these errors? 

    The error you're seeing indicates that the bootloader failed to store the new advertisement name to flash, possibly due to a flash timeout.

    A flash timeout means that the SoftDevicewas unable  to schedule a flash operation which was successfully requested by the application/bootloader. This should not happen unless there is a lot of BLE activity in parallel with the flash writes. Please have a look at table 1 in the Flash memory API chapter and see if your application meets any of the criteria for low to medium probability of success.

    Best regards,

    Simon

Children
Related