Hello all,

Did anyone try the application update on the feather ?
I tried the sample available with the sdk 1.2, one will have to disable the version 2 in the code for it to compile correctly (to make it simple as the led1 is not defined in the feather board version).
Then I programmed the board using the newtmgr.
The application works well and the file is downloaded from the remote server.
However, when I restart the board, the old application is run and not the new one!
I tried the same sample on the thingy91 and the update take effect and the new application firmware is run.
I am wondering if someone else tried it and worked correctly.
Thanks for any help.
louis.h

    Hey Louis

    lbh00 Did anyone try the application update on the feather ?

    Application update?

    lbh00 However, when I restart the board, the old application is run and not the new one!

    This is odd. Make sure that you’re using the latest binary. You also need to have MCUBoot enabled in the example code otherwise it will not work as well.

      Hello Jared,

      Yes I am referring to the http_application_update which is found in the samples of the SDK from nordic.
      Which latest binary are you referring to ?
      Here is the prj.conf of the project

      #
      # Copyright (c) 2019 Nordic Semiconductor ASA
      #
      # SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
      #
      # General config
      CONFIG_NCS_SAMPLES_DEFAULTS=y
      CONFIG_REBOOT=y
      
      # Network
      CONFIG_NETWORKING=y
      CONFIG_NET_SOCKETS=y
      CONFIG_NET_NATIVE=n
      
      # LTE link control
      CONFIG_LTE_LINK_CONTROL=y
      CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
      
      # BSD library
      CONFIG_BSD_LIBRARY=y
      CONFIG_BSD_LIBRARY_SYS_INIT=n
      
      # Library for buttons and LEDs
      CONFIG_DK_LIBRARY=y
      CONFIG_DK_LIBRARY_INVERT_LEDS=n
      
      # Heap and stacks
      CONFIG_HEAP_MEM_POOL_SIZE=2048
      CONFIG_MAIN_STACK_SIZE=8192
      
      # Image manager
      CONFIG_IMG_MANAGER=y
      CONFIG_FLASH=y
      CONFIG_IMG_ERASE_PROGRESSIVELY=y
      
      # GPIO
      CONFIG_GPIO=y
      
      # FOTA library
      CONFIG_FOTA_DOWNLOAD=y
      
      # Download client
      CONFIG_DOWNLOAD_CLIENT=y
      CONFIG_DOWNLOAD_CLIENT_TLS=y
      CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
      
      # DFU Target
      CONFIG_DFU_TARGET=y
      
      # Modem key management
      CONFIG_MODEM_KEY_MGMT=y
      
      # Application Upgrade support
      CONFIG_BOOTLOADER_MCUBOOT=y
      
      # Sample configuration
      CONFIG_DOWNLOAD_HOST="xxx.xxx.xxx.xxx"
      CONFIG_DOWNLOAD_PORT=xxx
      CONFIG_DOWNLOAD_FILE="app_update.bin"
      CONFIG_APPLICATION_VERSION=1

        lbh00 Which latest binary are you referring to ?

        I’m referring to app_update.bin This does not get produced unless CONFIG_BOOTLOADER_MCUBOOT=y is enabled.

        When in doubt clean the project using the -p flag:

        west build -b circuitojo_feather_nrf9160ns -p

        I would put some console output ( LOG_INF("Start of app"); )at the beginning of the program to make sure it’s consistent across resets. I’ve never seen the app regressing like this but I’ve seen plenty of times where I compiled incorrectly. Mostly in the case where I’d upload the code and wonder why it’s not updating anything.

          I just did a new test where I made sure that the compiled version and uploaded to the remote http server has
          CONFIG_BOOTLOADER_MCUBOOT=y
          Also I use printk that print a different message for different app_update.bin

          Is it the MCUboot that does the swapping from Slot1 to Slot0 ?

            lbh00 MCUboot does facilitate the update procedure. When you Use the HTTP Application Update example it will use the 2 slot setup.

              Ok, but in the case when we use newtmgr, the mcuboot just directly overwrite the old application firmware right ?

                hello Jared,

                how what can I do to debug this ? I have a feeling that it is MCUboot related.
                would the mcuboot from nordic work if I flash it onto the feather ?

                regards
                louis.h

                  lbh00 how what can I do to debug this ?

                  Have you tried my earlier suggestion with modifying a print statement at the beginning? That way when you load with newtmgr you can immediately see, even after a reset, that you’re running the correct firmware.

                  I have a feeling that it is MCUboot related. would the mcuboot from nordic work if I flash it onto the feather ?

                  It’s the same exact boot loader so I’m not sure how it will help you here.

                  Remember when your app loads, it will download whatever file you have targeted in the cloud. If that app_update.bin is outdated it will show the previous/outdated functionality. Without seeing what you’re having trouble with here it’s hard to debug.

                    Hello Jared,

                    Thanks for your suggestions.
                    I will double check all these options and get back to you.

                    Regards
                    louis.h

                    Terms and Conditions | Privacy Policy