Extremely slow and unstable FOTA on nrf5340 based device after code update in app

Hi,

I am developing a nrf5340 based device (no external memory) using FOTA to update the firmware. This process used to work quite well for a while now, but I ran into trouble recently, because to my surprise the update over the air does not work anymore after a small update to the code (content wise not related to FOTA).

The Update gets stuck on the nrf Connect app on my iPhone at various points early in the process - never finishing successfully. Using my own iOS app I can manage to "force" the update process in an extremely slow speed restarting the process several times, because here, too, the FOTA-process breaks repeatedly at unpredictable times (it took more than an hour to do so). This "new behavior" is the same on several samples of my device - so it does not seem to be a hardware problem.

So: the device and the process still seem to work in principle, but became extremely slow and unreliable. Does anyone have an idea what can cause this behavior on the nrf5340? ... and how I could bring this back to the old quick and reliable update process over the air?

Does the speed and stability in any way depend on the size or other properties of the app_update.bin file, which now is (just a little) larger? What are the limits to the FOTA process with nrf5340 determining speed and stability? Could there be any cause effect relationship between the firmware upload via BLE while the firmware on the device communicates via BLE at the same time?

I am using nrf Connect SDK v2.4.0 (arm64) on the nrf5340 side and an up to date version of nrf Connect on my iPhone.

Thanks a lot for your advice.

Regards,

Jens