Firmware upgrade failed issue over BLE

Hi,

I’m working on an nRF5340 using nRF Connect SDK v2.7.99-cs2.
BLE security is configured as Just Works (Security Mode 1, Level 2) on the peripheral.

I’m attempting firmware upgrade over BLE, but the upgrade is failing due to what looks like message ordering between the peripheral and the central:

  • On the peripheral (firmware logs):
    I see Response = 1 (Start of Frame) → DataResponse = 0 (End of Frame).
    This is the expected sequence.

  • On the central (peer device logs):
    The observed order is Response = 1Response = 0Data, which arrives out of order, causing the FUS to fail.

I also suspected thread scheduling. Although BLE thread priorities aren’t directly configurable, I reduced other thread priorities higher than BLE and keep the following as it is:
CONFIG_BT_RX_PRIO=8
CONFIG_BT_HCI_TX_PRIO=7
CONFIG_BT_DRIVER_RX_HIGH_PRIO=6
CONFIG_SYSTEM_WORKQUEUE_PRIORITY=-1
So what could be the possible root cause of this behavior?

Related