"Error: sending the request failed" trying to perform OTA DFU with nRF Connect app

I am on nRF Connect 2.5.0 SDK. I am trying to add OTA DFU support to my custom board using the MCUBoot bootloader, and everything appears normal when I look at the characteristic table but when trying to upload to the device using the nRF Connect app on iOS, the app appears to slowly upload the firmware (displaying low upload speed ~0.5kbps) then after a few minutes gives me "Error: sending the request failed". My board has no UART connection and I have been using RTT logging using the J-link on an nrf52DK; from what I have seen MCUboot logging with RTT is not reliable, and I have not been able to get it to work either. 

My procedure: 

1. Build and flash MCUboot and app onto the custom board with an nrf52DK.

2. Change my app and build the new app.

3. use nRF Connect app to try to upload 'app_update.bin' to device in upgrade mode "test and confirm". The procedure always fails before completing.

Here is my bootlaoder config in my prj.conf:

 

Here is my child_image/mcuboot.conf: 

and I have also statically defined the flash partitions in pm_static.yml based on the first automatically partitioned build:

Here is the log from the nrf connect app: 

I am fairly certain it is not a connection issue, since I never had any issues with the old NordicDFU on the nrf5 SDK using the exact same board. Since I don't have a UART port for MCUBoot logging I'm not sure how I can diagnose this issue. Any help would be much appreciated

Parents
  • Hi, 

    but when trying to upload to the device using the nRF Connect app on iOS

    Could you try with https://www.nordicsemi.com/Products/Development-tools/nrf-connect-device-manager?

    Regards,
    Amanda H. 

  • Hello Amanda, 

    Thanks for your reply. I was able to successfully upload the image, confirm it, and reset the device. However, it was very slow (it took around 15 minutes). Is there any reason for this? 

    Tony

  • Could you try to set CONFIG_BT_L2CAP_TX_MTU=498 to see if it can help or not?

    You can check by build/zephyr/.config and the sniffer log to see if the MTU is set and updated to 498. 

  • Unfortunately as I mentioned earlier I am at 99.89% RAM utilization, the maximum MTU size I can increase it to is 251 before I cannot build anymore, and there seems to be no change in the speed at 251. 

  • Hello,

    I was able to make enough space for CONFIG_BT_L2CAP_TX_MTU=498 by setting CONFIG_MCUMGR_TRANSPORT_NETBUF_COUNT=3 and CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=1650, but it is still just as slow. 

  • Do you see the MTU update to 498 in the sniffer log? Could you provide the sniffer log and build/zephyr/.config again?

  • I lowered the MCUMGR_TRANSPORT_NETBUF count and size more and also reduced the workqueue stack. It seems the app built correctly, my CONFIG_BT_L2CAP_TX_MTU is correct in build/zephyr/.config, but I don't see the MTU update to 498 in the sniffer log and the the packets are still size 272. 

    Sniffer log:

    build/zephyr/.config: 

Reply
  • I lowered the MCUMGR_TRANSPORT_NETBUF count and size more and also reduced the workqueue stack. It seems the app built correctly, my CONFIG_BT_L2CAP_TX_MTU is correct in build/zephyr/.config, but I don't see the MTU update to 498 in the sniffer log and the the packets are still size 272. 

    Sniffer log:

    build/zephyr/.config: 

Children