Firmware Update from IOS

Hello,

after having a product using a nrf52832 MCU for a while in production using nrf connect sdk 2.5.1, we now wanted to supply a first firmware update. However, while the system was tested to work beforehand we now noticed that the firmware update (which we supply from our app) process, is extremly slow from IOS devices. It got to the point where it is pretty annoying to update from IOS devices for our customers. We are using an nrf52832 with external flash. The update process works also not very well from IOS devices using the nrf device manager app. The problem seems similar to the one posted here: DFU on iOS 17.3.1 nRF Connect app very slow. - Nordic Q&A - Nordic DevZone - Nordic DevZone But the solution does no longer seem accessible as for some reason I can set the number of buffers no longer to 2 (minimum is 3 in the app). 

Do you have any idea what the problem could be?

  • Thank you, that helped.

    I previously had 

    CONFIG_MCUMGR_TRANSPORT_NETBUF_COUNT=2
    CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=2475

    By increasing the netbuf_count to 4 and decreasing netbuf size the update process already worked a lot smoother. Setting additionally 

    CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL_MIN_INT=12
    CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL_MAX_INT=12

    increases the speed further. 

    Do you have an explanation why that helped? I still would prefer to have a solution that I could implement by updating our app, as we already have samples in the field that would remain a pain to update via IOS.  Any idea what changed in IOS, because the process was definitely running better with the current firmware settings, like 6-12 months ago?  

  • It looks like a buffer configuration mismatch: if the DFU library/app is configured for 4 buffers, but the device firmware allocates only 2, the library will send more data than the device's RX buffers can handle, causing throughput drops or timeouts.

    To handle this gracefully on the app side, we are adding a workaround/patch to both the library and nRF Connect Device Manager. Similar to how we handle bufferSize / reassembly negotiation, the app will now detect this mismatch automatically and dynamically scale down the buffer count to match the device, ensuring the update proceeds smoothly. 

    TL;DR: Fix implemented in nRF Connect Device Manager 1.14.9 (aiming to release today). The fix will also be merged into nRF Connect for Mobile and rolled out in its next feature update.

  • Were you able to reproduce my issue? I updated the nrf device manager app to 1.14.9 but I still face the same issue when using netbuf_count of 2. The app already has trouble pairing properly with my device, it takes long to even start the upating process and when it eventually starts it hangs and stops often. 

  • Could you provide a simple project or .config under build/mcuboot/zephyr and build/zephyr to help us reproduce the issue?

  • 0167.DFUTest.zip Find attached a project zip. Its for an nrf52832 MCU and should work on any dev board. Overlays just might need adjustments if you want UART output. And as mentioned we use for that project nrfconnect sdk 2.5.1

    Firmware Update works well with the device manager app from android. From the apple device manager app the app needs already very long to just pair and get information and when one gets the update to eventually start its very slow. If you switch the NETBUF_COUNT in the project to 4 and reduce NETBUF_SIZE to 1230 it works well from apple, but it would be better for us if we can get it to work with the original settings, as it was working before and works from android devices. Please let me know if this helps to reproduce and solve the issue. Let me know if you need anything else. Thank you.

Related