Hello,
I have been attempting to add a basic OTA facility to the the app we are developing. During development we have been simultaneously targeting a DK board and feather by using custom overlays using west build -b xxxx to generate appropriate build for each board. For OTA, I started by prototyping on the DK board. It works as expected the app can be triggered to download from a VPS using fota. When I attempt to program the feather board with resulting app_update.bin it will program but upon reset the app never loads. In order to generate the app_update.bin I have aded
Image manager
CONFIG_IMG_MANAGER=y
CONFIG_FLASH=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

To my prj.conf but I have already have a conf file specifically for the feather board in this project that was using
# Bootloader
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_IMG_MANAGER=y

In order to generate an app_update.bin file when we were targeting the feather. Is it possible that these two could conflict and result in a bin file that isn’t compatible with the feather? I have been banging my head against this for some hours.

    jaredwolff Hello Jared. Thank you so very much!
    Our board is marked BRD-0015-05. We have been using v2.3.0 of the SDK.

      The only entry you need to add to an application in NCS to generate app_update.bin is

      # Enable Zephyr application to be booted by MCUboot
      CONFIG_BOOTLOADER_MCUBOOT=y

      Are you able to load the file and run via the bootloader over USB? That’s the first place I would check. Seems like you’re modifying things. I would also try some NFED samples to make sure they load ok too before you make lots of changes.

        Hello Jared,
        thank you so very much for the help and advice so far. I have confirmed that I can build and flash the NFED samples. Just to provide some background I have used the sms and application_update samples from the sdk as starting points when adding the OTA functionality to our app. As a check after confirming with the NFED samples I went back and tried building each of these for the feather. Neither would load, they would flash and but neither of apps would start? In desperation I went through the prj file and found that by removing

        CONFIG_LTE_LINK_CONTROL=y

        and commenting out any of my code that is dependent on the LTE link control api, I could get the app to start. I was wondering if a process related to setting up the modem could be blocking? In a few cases if left it long enough I would see a console message that the setup had failed and the app would load in a failed state.

        Next I was going to try updating the modem firmware on the feather using the NFED sample, just in case?

        I am also going to order a j-link cable so that I can us the dk board as programmer and debugger and possibly try flashing the original nordic boot loader to the feather?
        https://www.tag-connect.com/product/tc2030-ctx-nl-6-pin-no-legs-cable-with-10-pin-micro-connector-for-cortex-processors

        My apologies I fear that I am overlooking something simple and making a fundamental error. I just wanted to update you on what I have tried in the hopes that it would allow you to see what I may be over looking or misunderstanding. Or suggestions on what I might try next. Thank you very much.

          CONFIG_LTE_LINK_CONTROL Is very critical for the operation of all nRF91 based code. It’s unlikely the cause of your issues.

          If you’re flashing over what was preloaded (including the bootloader) you will have problems. The bootloader was modified for higher transfer speeds. If you need the .hex to re-flash let me know.

            Thanks Jared!
            I only commented this out in desperation to get back to something that would boot. I understood it would impair functionality badly. Sorry, I was clutching at straws. The prj file for the previous version of our app relies on CONFIG_LTE_LINK_CONTROL and it runs perfectly on the both the DK and feather. However as soon as I attempt to make use of SMS or OTA in our app. Or building either of those samples individually. I get problems with the app loading on the feather. I can see that the bootloader starts but the app doesn’t load until I see:-
            <inf> let_lc: Network Connection attempt timed out
            I don’t know if it is significant but I noted today that the modem firmware on my dk board is mfw_nrf9160_1.3.3 and the version on my feather is mfw_nrf9160_1.3.2. I attempted to use mfw_update sample to load version 1.3.3 however I kept running into an error when attempting to execute
            python3 update_modem.py mfw_nrf9160_1.3.3.zip /dev/tty.SLAB_USBtoUART 1000000
            with an error that
            [Probes./dev/tty.SLAB_USBtoUART] [ModemUARTDFU-/dev/tty.SLAB_USBtoUART] Not able to open serial port, error is 2
            I suspect I have misconfigured something after a long day and will try and chase the problem tomorrow and upgrade the modem firmware.
            I have also switched out SIM cards to rule that out.

            When I get my tag-connect cable I can hopefully attach the debugger and get more information on what is happening.
            I am also going to get another feather board just to rule out a hardware issue with my board but this seems unlikely since the previous version of our app works.

            It occurs to me I should also clarify that I am using the sms and ota samples directly from the sdk as starting points for modifying our app. Not the sms from the NFED, incase that is significant. Sorry for the continuing posts.

            Thank You

              shadeshope [Probes./dev/tty.SLAB_USBtoUART] [ModemUARTDFU-/dev/tty.SLAB_USBtoUART] Not able to open serial port, error is 2

              What platform are you running?

              shadeshope It occurs to me I should also clarify that I am using the sms and ota samples directly from the sdk as starting points for modifying our app. Not the sms from the NFED, incase that is significant. Sorry for the continuing posts.

              Got it.

                Thanks Jared,
                I am using Ubuntu 22.04 as a development platform.
                Whilst my cable is on order. I tried doing some debugging with a build of the application_update sample built first for the DK board and then the Feather.

                In the case of the feather this method times out waiting on the modem to connect.
                static int connect_lte(bool blocking) in ncs/v2.3.0/nrf/lib/lte_link_control/lte_lc.c is blocking waiting on the semaphore to indicate that connection has been established.

                In the case of the DK board the at_monitor_task will ensure at_handler_creg method gets called with:-
                +CEREG notificaiton +CEREG: 2,“8651”,“07AEF16E”,7
                and
                +CEREG notificaiton +CEREG: 5,“8651”,“07AEF16E”,7,,,“11100000”,“11100000”

                I inserted some debug messages into these methods and in the case of feather the at_monitor_task doesn’t initially get invoked and when it does it is called with
                +CEREG notificaiton +CEREG: 4

                Sorry I am still trying to get an understanding of the architecture and code flow and very much feels like I am poking at black boxes at the moment. I am just putting this up in the hopes that it indicates to some one with understanding what I am doing wrong.

                I also tried building the AWS Fota sample and saw similar behaviour.
                I also repeated the process with a build of the sms app and got a similar issue with Network connection timing out

                #CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y
                I also attempted to get a modem trace but this caused issues when I tried to build it for the feather. I would get an error that there was an IRQ conflict

                  shadeshope one issue is that the serial port you’re trying to open is not valid. It should show up as ttyUSBX on Linux.

                  I recommend you take a step back and start with the fundamentals. If you haven’t already review the documentation at docs.jaredwolff.com

                    Terms and Conditions | Privacy Policy