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.

  • 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

  • I was able to flash `thingy91_at_client_2022-06-02_880c82db.hex` to the board, but I still can't use LTE Link Monitor.  UART flashes from yellow to red.

    13:06:45.310	Modem port is opened
    13:06:49.538	Error: 'AT+CFUN=1 ' timed out
    13:06:56.718	Error: 'AT+CFUN? ' timed out
    13:07:11.476	Modem port is closed
    13:07:13.309	Modem port is opened
    13:07:17.914	Modem port is closed
    13:07:17.953	Modem port is opened
    13:07:22.014	Error: 'AT+CFUN=1 ' timed out
    13:08:44.003	Modem port is opened
    13:08:45.579	Modem port is closed
    13:08:45.621	Modem port is opened
    13:08:51.448	Error: 'AT+CFUN=1 ' timed out
    13:10:27.053	Network search failed: Error: 'AT+COPS=? ' timed out
    13:10:28.056	Error: 'CEREG? ' timed out
    13:10:29.060	Error: 'CEREG? ' timed out
    13:10:30.075	Error: 'CEREG? ' timed out
    13:10:31.079	Error: 'AT ' timed out
    13:10:32.091	Error: 'CEREG? ' timed out
    13:10:33.096	Error: 'AT+CEREG? ' timed out
    13:10:34.102	Error: 'AT+CEREG? ' timed out

  • Looks like I got the LTE Link Monitor working.  I must have still been in MCUBoot mode after I flashed the hex file.  I flashed it again and power cycled and I can run at commands now.  Still no network connection yet though.

  • Good to hear that you got to the AT commands!

    If you face issues related to the network connection, it would be nice if you create a new ticket on that, to keep DevZone tidy.

    Regards,
    Sigurd Hellesvik

Related