Yes, mfw_update is programmed to the device. Using LTE Link Monitor, all AT commands fail – not sure if that’s expected for mfw_update. Pressing the RST button doesn’t cause any messages to appear there either. Before attempting the upload, I’ve made sure to close down anything that could have an open connection to COM3. The blue light is unlit, so not in bootloader mode.

    Are you able to run at_client on that board? (And try again with AT commands?) The mfw_update firmware will not respond to AT commands.

      Sorry, where do I find that?

      I’ve run plenty of things on this board to know it works properly–most recently Blinky, which I installed just before the mfw_update.

        The biggest thing is to confirm bidirectional comms over that USB to UART chip. You can find at_client in nfed/samples/at_client

          Built and installed the at_client, then opened up LTE Monitor, pressed RST button and the terminal showed this:

          2022-03-03T02:48:48.515Z DEBUG modem << õýÕ÷¯ÿõ÷õÕUý÷·Uÿõ÷÷ýßõõõõõõ÷õõ÷ÿõ½×õõý÷µÿÿõ÷·ÿßÿõýwõ÷õÿuõõÿõUuW÷uõõUu_UuõõWu]UõýUuWUuõõUuýõÝõWw}õuýWuÿõýõUw]UõõUwÿõßõUõýUõýWw}õõõýõ÷õ]ÝõUõõUõýWuõUõýUwõUõýUuõUõýWuÿ]]ÕõW÷õõÝõWw_uõõõýuWuõõõUuWuõõõýõõõõÝõWõ÷õõýõWWÿÕwuõwß__õU»uuu}õU÷WýUõõU÷õõ_}Uý}ÝõýõõõõýõÿuõõU*** Booting Zephyr OS build v2.6.99-ncs1-1 ***
          2022-03-03T02:48:48.520Z DEBUG modem << The AT host sample started

          Kind of gives me mixed messages there – looks like the at_client is working, but what’s the garbage before that? Is it maybe some random data that’s been sent as a test?

            It’s the SPM image running at 1M baud. Change your BAUD to 1M to see what it says. 😉

            If you hit AT and press enter, does it respond?

              jaredwolff If you hit AT and press enter, does it respond?

              It responds to AT with OK.

              jaredwolff Change your BAUD to 1M…

              I thought it already was at 1M

                For monitoring its 115200

                For transferring its 1000000

                  How do I change the baud rate to 1M, and is that a potential fix for the problem of updating the modem firmware?

                    If you wanted to view that gibberish you’d have to use a different program to view the output. If you’re using VSCode Zephyr Tools you can invoke zephyr-tools-monitor to monitor a different BAUD:

                    ❯ zephyr-tools-monitor --port COM3 --baud 1000000

                    Nevertheless, the update_mfw sample runs by default at 1000000 BAUD. You don’t need to change anything.

                    How old is the board you’re working with?

                      jaredwolff How old is the board you’re working with?

                      Purchased within the last year.

                      jaredwolff If you’re using VSCode Zephyr Tools you can invoke zephyr-tools-monitor to monitor a different BAUD

                      Ah ha!

                      > zephyr-tools-monitor --port COM3 --baud 1000000
                      Connecting..
                      Connected to COM3!
                      *** Booting Zephyr OS build v2.6.99-ncs1-1  ***
                      Flash regions           Domain          Permissions
                      00 03 0x00000 0x20000   Secure          rwxl
                      04 31 0x20000 0x100000  Non-Secure      rwxl
                      
                      Non-secure callable region 0 placed in flash region 3 with size 32.
                      
                      SRAM region             Domain          Permissions
                      00 07 0x00000 0x10000   Secure          rwxl
                      08 31 0x10000 0x40000   Non-Secure      rwxl
                      
                      Peripheral              Domain          Status
                      00 NRF_P0               Non-Secure      OK
                      01 NRF_CLOCK            Non-Secure      OK
                      02 NRF_RTC0             Non-Secure      OK
                      03 NRF_RTC1             Non-Secure      OK
                      04 NRF_NVMC             Non-Secure      OK
                      05 NRF_UARTE1           Non-Secure      OK
                      06 NRF_UARTE2           Secure          SKIP
                      07 NRF_TWIM2            Non-Secure      OK
                      08 NRF_SPIM3            Non-Secure      OK
                      09 NRF_TIMER0           Non-Secure      OK
                      10 NRF_TIMER1           Non-Secure      OK
                      11 NRF_TIMER2           Non-Secure      OK
                      12 NRF_SAADC            Non-Secure      OK
                      13 NRF_PWM0             Non-Secure      OK
                      14 NRF_PWM1             Non-Secure      OK
                      15 NRF_PWM2             Non-Secure      OK
                      16 NRF_PWM3             Non-Secure      OK
                      17 NRF_WDT              Non-Secure      OK
                      18 NRF_IPC              Non-Secure      OK
                      19 NRF_VMC              Non-Secure      OK
                      20 NRF_FPU              Non-Secure      OK
                      21 NRF_EGU1             Non-Secure      OK
                      22 NRF_EGU2             Non-Secure      OK
                      23 NRF_DPPIC            Non-Secure      OK
                      24 NRF_REGULATORS       Non-Secure      OK
                      25 NRF_PDM              Non-Secure      OK
                      26 NRF_I2S              Non-Secure      OK
                      27 NRF_GPIOTE1          Non-Secure      OK
                      
                      SPM: NS image at 0x20200
                      SPM: NS MSP at 0x20020760
                      SPM: NS reset vector at 0x225c9
                      SPM: prepare to jump to Non-Secure image.

                      Just restarted my system and tried again with the mfw_update. Still fails to program the device.

                      > python3 update_modem.py mfw_nrf9160_1.3.1.zip com3 1000000
                      # modem firmware upgrade over serial port example started.
                      [HighLevel] Creating new probe
                      [HighLevel] Initialize new probe.
                      [Probes.com3] [ModemUARTDFUProbe] Dll directory is C:\Users\barli\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynrfjprog\lib_x64.
                      [Probes.com3] [ModemUARTDFUProbe] Find and connect to dfu dll
                      [Probes.com3] [ModemUARTDFUProbe] Using DFU dll at C:\Users\barli\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.
                      [Probes.com3] [ModemUARTDFUProbe] Load library at C:\Users\barli\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.
                      [Probes.com3] [ModemUARTDFUProbe] Library loaded, loading member functions.
                      [Probes.com3] [ModemUARTDFUProbe] Member functions succesfully loaded.
                      [Probes.com3] [ModemUARTDFU-com3] Initialize new probe.
                      [Probes.com3] [ModemUARTDFU-com3] Successfully opened port: com3@1000000,flow_control:none,parity:none.
                      [Probes.com3] [ModemUARTDFU-com3] {
                          "duration": 891,
                          "error_code": "Ok",
                          "operation": "open_uart",
                          "outcome": "success",
                          "progress_percentage": 100
                      }
                      [HighLevel] Probe initialization complete!
                      [Probes.com3] [ModemUARTDFU-com3] Check if provided file exists
                      [Probes.com3] [ModemUARTDFU-com3] Check if provided file can be read
                      [Probes.com3] [ModemUARTDFU-com3] Programming bootloader
                      [Probes.com3] [ModemUARTDFU-com3] Programming modem bootloader 72B3D7C.ipc_dfu.signed_1.1.0.ihex.
                      [Probes.com3] [ModemUARTDFU-com3] Extracting 13416 bytes from 72B3D7C.ipc_dfu.signed_1.1.0.ihex.
                      [Probes.com3] [ModemUARTDFU-com3] {
                          "duration": 0,
                          "message": "Calculating image size",
                          "operation": "upload_image",
                          "progress_percentage": 5
                      }
                      [Probes.com3] [ModemUARTDFU-com3] {
                          "duration": 1,
                          "message": "Uploading image to device",
                          "operation": "upload_image",
                          "progress_percentage": 10
                      }
                      [Probes.com3] [ModemUARTDFU-com3] {
                          "duration": 30004,
                          "error_code": "Timeout",
                          "message": "Image upload failed. Bad response from device",
                          "operation": "upload_image",
                          "outcome": "fail",
                          "progress_percentage": 100
                      }
                      [Probes.com3] [ModemUARTDFU-com3] Error during image file upload. Upload returned an error.
                      [Probes.com3] [ModemUARTDFU-com3] Failed to program bootloader file
                      [Probes.com3] [ModemUARTDFUProbe] Failed to program DFU package
                      [HighLevel] Failed programming the device.
                      [Probes.com3] b'An error was reported by NRFJPROG DLL: -220 TIME_OUT. \n[Probes.com3] [ModemUARTDFU-com3] Error during image file upload. Upload returned an error.\n\textra: [Probes.com3] [ModemUARTDFU-com3] Failed to program bootloader file\n\textra: [Probes.com3] [ModemUARTDFUProbe] Failed to program DFU package\n\textra: [HighLevel] Failed programming the device.' 
                      [Probes.com3] [ModemUARTDFUProbe] Uninitializing ModemUARTDFU probe at serial port com3.
                      [Probes.com3] [ModemUARTDFU-com3] Sending device reset request
                      [Probes.com3] [ModemUARTDFU-com3] Sending reset request to device.
                      [Probes.com3] [ModemUARTDFU-com3] Closing connection to mcuboot device
                      [Probes.com3] [ModemUARTDFU-com3] serial port com3 closed.
                      [Probes.com3] [ModemUARTDFU-com3] {
                          "duration": 1,
                          "error_code": "Ok",
                          "operation": "close_uart",
                          "outcome": "success",
                          "progress_percentage": 100
                      }
                      [HighLevel] Done.
                      [HighLevel] Closing and freeing sub dlls.
                      Traceback (most recent call last):
                        File "D:\David\Wildlife\DeterGents\ZephyrToolsRepo\nfed\samples\mfw_update\update_modem.py", line 43, in <module>
                          run(args.uart, args.firmware, args.baudrate)
                        File "D:\David\Wildlife\DeterGents\ZephyrToolsRepo\nfed\samples\mfw_update\update_modem.py", line 26, in run
                          modem_dfu_probe.program(modem_firmware_zip)
                        File "C:\Users\barli\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynrfjprog\HighLevel.py", line 388, in program
                          raise APIError(result, error_data=self.get_errors(), log=self._logger.error)
                      pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -220 TIME_OUT. 
                      [Probes.com3] [ModemUARTDFU-com3] Error during image file upload. Upload returned an error.
                              extra: [Probes.com3] [ModemUARTDFU-com3] Failed to program bootloader file
                              extra: [Probes.com3] [ModemUARTDFUProbe] Failed to program DFU package
                              extra: [HighLevel] Failed programming the device.

                        Since you’re able to communicate with the device it’s probably not a USB issue. Just to confirm, you can flip the orientation of your USB connector (turn it 180 degrees from the way you were using it) to see if that makes an improvement.

                        Do you only have one board to try this on Barliesque ?

                          jaredwolff Just to confirm, you can flip the orientation of your USB connector

                          With this device and USB cable I was able to install the Blinky and client_at projects, as well as upload the mfw_update app itself. Flipping the USB connector had no effect.

                          jaredwolff Do you only have one board to try this on

                          I have several devices on hand. I’ve just switched over to one of those and hit the same problem. This device is on COM11, so I used Zephyr Tools: Setup Newtmgr to switch to COM11, bauderate 1M. I installed the mfw_update app. Then used python3 update_modem.py mfw_nrf9160_1.3.1.zip com11 1000000 to attempt the upgrade. Same thing happens.

                          I now have a second computer I’m in the process of getting set up for modem firmware updates. I’ve run into some problems getting computer #2 setup properly: The nfed folder doesn’t appear in VS Code, giving me no way of switching over to the mfw_update project.

                          I’ve got one computer with which I can install the mfw_update. So I thought maybe I could use the other to perform the update. Here’s what happened there:

                          > python3 update_modem.py mfw_nrf9160_1.3.1.zip com9 1000000
                          # modem firmware upgrade over serial port example started.
                          [HighLevel] Creating new probe
                          [HighLevel] Initialize new probe.
                          [Probes.com9] [ModemUARTDFUProbe] Dll directory is C:\Users\usaf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pynrfjprog\lib_x64.
                          [Probes.com9] [ModemUARTDFUProbe] Find and connect to dfu dll
                          [Probes.com9] [ModemUARTDFUProbe] Using DFU dll at C:\Users\usaf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.
                          [Probes.com9] [ModemUARTDFUProbe] Load library at C:\Users\usaf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.
                          [Probes.com9] [ModemUARTDFUProbe] GetErrorInfo failed.
                          [Probes.com9] [ModemUARTDFUProbe] Failed to load dll at C:\Users\usaf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.
                          [HighLevel] Failed while initializing probe.
                          [Probes.com9] b'An error was reported by NRFJPROG DLL: -151 NRFJPROG_SUB_DLL_COULD_NOT_BE_OPENED. \n[Probes.com9] [ModemUARTDFUProbe] GetErrorInfo failed.\n\textra: [Probes.com9] [ModemUARTDFUProbe] Failed to load dll at C:\\Users\\usaf\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\pynrfjprog\\lib_x64\\NRFDFU.dll.\n\textra: [HighLevel] Failed while initializing probe.'
                          [HighLevel] Closing and freeing sub dlls.
                          Traceback (most recent call last):
                            File "C:\Users\usaf\ncs\v1.7.1\nfed\samples\mfw_update\update_modem.py", line 43, in <module>
                              run(args.uart, args.firmware, args.baudrate)
                            File "C:\Users\usaf\ncs\v1.7.1\nfed\samples\mfw_update\update_modem.py", line 25, in run
                              with HighLevel.ModemUARTDFUProbe(api, uart, baudrate) as modem_dfu_probe:
                            File "C:\Users\usaf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pynrfjprog\HighLevel.py", line 591, in __init__
                              raise APIError(result, error_data=self.get_errors(), log=self._logger.error)
                          pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -151 NRFJPROG_SUB_DLL_COULD_NOT_BE_OPENED.
                          [Probes.com9] [ModemUARTDFUProbe] GetErrorInfo failed.
                                  extra: [Probes.com9] [ModemUARTDFUProbe] Failed to load dll at C:\Users\usaf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.
                                  extra: [HighLevel] Failed while initializing probe.

                            Barliesque if you got another machine to work, I expect to think it’s some type of issue with the Python library. In the case of the above, it looks like maybe you didn’t install the library?

                            **Failed to load dll** at C:\Users\usaf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.

                              I have installed python 3.9 from WIndows Store – on both machines.

                                I’ve tried downgrading both machines with: pip install "pynrfjprog<10.14"
                                Neither was able to complete the update.

                                An error was reported by NRFJPROG DLL: -220 TIME_OUT.

                                  Terms and Conditions | Privacy Policy