Problem with DFU over BLE using west and mcuboot

I am building with west and then using this tutorial:

https://docs.zephyrproject.org/2.6.0/samples/subsys/usb/dfu/README.html

to create a .bin file.  I then use nrfConnect to do a DFU update.

The original firmware on the board (let's call it version 1) was built with nrfConnectSDK 1.4.1 and Segger Embeded Dtudio on a PC.

I am now building, same code base same prj.conf same board, on an Ubuntu machine and using the latest version of Zephyr and west, then signing manually with mcuboot. Let's call this version 2. Version of the firmware is signed using "root-rsa-2048.pem" file in mcuboot.  

I am able to update the board to from version 1 to version 2, but if I try to update version 2 to another version (same code base same prj.conf same board) I am not able to.  nrfConnect for mobile gives me an error stating that it timed out requesting an update.

Parents
  • Hi Christopher, 

    I assume the application version 2 is also based on usb-dfu sample ? And I assume you meant DFU over USB not "DFU over BLE" ?


    Have you double check if it's running after the update from version 1 to version 2? I would suggest to blink an LED just to make sure if it's running. 
    Also please slightly modify the application in version 2 so that the hex file is not identical. From my experience, mcuboot will ignore the update if the new firmware is identical to the one on one of the slot. 

  • Hi Hung

    Both versions are based on subsys/mgmt/mcumgr/smp_svr

    I am building with west, on an Ubuntu docker image from Zephyr, but unlike on my local machine building with west does not generate merged.hex and app_update.bin

    I learned that running west with and without nrf connect sdk is not the same.  I wonder if I should redo my docker image for nrf connect sdk. 

    By the way, it would be very convenient for the whole development community of Nordic released their docker images for everyone to use...avoiding all these build problems and questions on devzone.

  • Hi Christopher, 

    We actually do have a docker image for nRF Connect SDK provided by one of our employee here. It's not official thought. 

    There is a different between our nRF Connect SDK and Zephyr vanilla. When you build with NCS you will have the merged.hex and app_update.bin that you don't have to sign the image manually every time you build. I strongly suggest to use NCS.

    Please note that we also provide a Toolchain manager tool in nRF Connect for Desktop application that can help you to install the toolchain and the SDK automatically with just one click (WIndows&Mac). 

  • Thanks.  I experience bugs with NRF Desktop and Segger (both on Windows and Mac), so I am moving away from that.  But this exercise is specifically to create a CI/CD pipeline for firmware development so thats why I need to run from the command line.


    Thanks for your explanation of NCS, now I know.  However I do have one more question. How do I Know which version of Zephyr is associated with a particular version of NCS?  For example I am using hte latest release NCS 1.5.2, but I can't find the Zephyr version NCS is using

Reply
  • Thanks.  I experience bugs with NRF Desktop and Segger (both on Windows and Mac), so I am moving away from that.  But this exercise is specifically to create a CI/CD pipeline for firmware development so thats why I need to run from the command line.


    Thanks for your explanation of NCS, now I know.  However I do have one more question. How do I Know which version of Zephyr is associated with a particular version of NCS?  For example I am using hte latest release NCS 1.5.2, but I can't find the Zephyr version NCS is using

Children
Related