mcumgr hangs during image upload

I have a thingy91 that has been flashed over JLINK which has wiped out the MCUBoot.  I'm attempting to get it back using mcumgr.  I have mcumgr all setup, but when I run

mcumgr --conntype=serial --connstring="/dev/ttyACM4,baud=115200" image upload thingy91_asset_tracker_v2_ltem_2022-06-02_880c82db.bin 

nothing happens after the progress bar appears.  It just stays at zero percent.  I check to make sure I have correct ACM port each time.  I'm running on Ubuntu 20.04.4 LTS.  Any ideas what I'm doing wrong?

When I try to connect to LTE Link Monitor v2.0.1, the ttyACM port shows up and the logs shows Modem port is opened.  If I try to run an AT command, I get a timed out message.

Parents
  • I don't think that is the problem, as I am not building with Zephyr, I'm trying to flash a pre-compiled binary from Nordic.  When I run 

    mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" echo hello

    I do not get "hello" back, just an empty line.  ttyACM0 has the correct privileges and I don't see anything else wrong.  The uart connection just doesn't seem to work. 

Reply
  • I don't think that is the problem, as I am not building with Zephyr, I'm trying to flash a pre-compiled binary from Nordic.  When I run 

    mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" echo hello

    I do not get "hello" back, just an empty line.  ttyACM0 has the correct privileges and I don't see anything else wrong.  The uart connection just doesn't seem to work. 

Children
  • Hi

    After reading your original question again, I see that you say:

    I have a thingy91 that has been flashed over JLINK which has wiped out the MCUBoot.

    Can you explain how you know MCUBoot has been wiped out?

    Can you include details on how you flashed over JLINK?

    dkhayes117 said:
    I don't think that is the problem,

    I agree. Here is what I think is wrong:

    Mcumgr is a tool to send an image compatible with MCUBoot.
    This requires that your application has both MCUBoot activated and functionality as either a Serial Recovery or SMP Server.
    If you wiped your application using a programmer/debugger, you can no longer use Mcumgr, since you have no such application.

    Fix: You need to flash the application to your Thingy using an external debugger(nRF9160 Developement Kit or a JLINK debugger/programmer).
    I recommend you use our nRF Programmer app in nRF Connect for Desktop for the software side. Get the prcompiled firmware from the Nordic Thingy:91 product page.

    Regards,
    Sigurd Hellesvik

  • I misunderstood then, I thought mcumgr could be used without MCUBoot.  I think MCUBoot is gone, because I am using Rust Programming not Zephyr.  When I flashed it last, the Rust Firmware only has a secure partition manager linked in, that's it. 

    The only reason I want the MCUBoot back, is so I can use it to debug my cellular connection with LTE Link Monitor.  It times out when I try to send AT commands, so I thought it must be the missing MCUBoot that is causing it to fail.  So far, I can't get an LTE link.  It stays in CEREG 0,4 (unknown) and never finds a link. 

    Thanks,

    Daniel 

  • Hi Daniel,

    MCUBoot is a bootloader, which main job is to boot your application, making it possible to upgrade the application using what is known as Device Firmware Update.

    The LTE Link Monitor is an UART monitor with some extra functionality.
    For the LTE Link Monitor to work, you need your application to expose the AT command functionality on the UART connected to the PC.
    See our AT Client for a simple example this.

    In other words, MCUBoot is not needed for the LTE Link Monitor.

    Regards,
    Sigurd Hellesvik

Related