This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to perform nRF9160DK Full Modem Firmware Update using SMP Server

I am trying to use the `fmfu_smp_svr` sample project, as described in nRF9160: Full modem firmware update using SMP Server, to perform a full modem firmware update.

The target device is a nRF9160DK, PCA100090 0.9.0, using the built-in J-Link.

So far, all my attempts have failed, with the device returning an error part way through, and the update timing out. I have attempted the update under MacOS 10.15.7 and Ubuntu 20.04 LTS with the result. It appears that the bootloader is being transferred successfully, but the application portion is failing part way through.

I've built the `fmfu_smp_svr` sample from the v1.5.0 tag of the nRF Connect SDK. No changes to it or the `update_modem.py` script. I'm using the latest pynrfjprog.

I am able to update the Modem Firmware successfully using nRF Connect Desktop, and `fmfu_smp_svr` reports the expected version. However, we need to update nRF9160 devices in manufacturing under automation, and the desktop application is not viable. The new full modem firmware update feature via SMP looks like a solution for us, but so far it's not working.

Thanks for your support,

Jeremy Wood

See the attached file for the log of an attempted update:

(venv) jerwood@jerBookBCD ~/n/n/n/s/n/fmfu_smp_svr ((v1.5.0))> python update_modem.py ./mfwnrf9160110.zip /dev/cu.usbmodem0009600136971 115200
# modem firmware upgrade over serial port example started.
{
    "duration": 425, 
    "error_code": "Ok", 
    "operation": "open_uart", 
    "outcome": "success", 
    "progress_percentage": 100
}
Programming modem bootloader.
{
    "duration": 0, 
    "message": "Calculating image size", 
    "operation": "upload_image", 
    "progress_percentage": 5
}
{
    "duration": 0, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 10
}
{
    "duration": 51, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 15
}
{
    "duration": 104, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 21
}
{
    "duration": 157, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 27
}
{
    "duration": 210, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 33
}
{
    "duration": 263, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 40
}
{
    "duration": 316, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 46
}
{
    "duration": 369, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 52
}
{
    "duration": 422, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 58
}
{
    "duration": 475, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 64
}
{
    "duration": 528, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 71
}
{
    "duration": 581, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 77
}
{
    "duration": 634, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 83
}
{
    "duration": 687, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 89
}
{
    "duration": 740, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 95
}
{
    "duration": 833, 
    "operation": "upload_image", 
    "outcome": "success", 
    "progress_percentage": 100
}
Programming file 1 of 2 files.
{
    "duration": 0, 
    "message": "Calculating image size", 
    "operation": "upload_image", 
    "progress_percentage": 5
}
{
    "duration": 0, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 10
}
{
    "duration": 51, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 20
}
{
    "duration": 104, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 33
}
{
    "duration": 157, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 46
}
{
    "duration": 209, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 58
}
{
    "duration": 262, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 71
}
{
    "duration": 315, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 84
}
{
    "duration": 368, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 97
}
{
    "duration": 389, 
    "operation": "upload_image", 
    "outcome": "success", 
    "progress_percentage": 100
}
Finished with file.
Programming file 2 of 2 files.
{
    "duration": 0, 
    "message": "Calculating image size", 
    "operation": "upload_image", 
    "progress_percentage": 5
}
{
    "duration": 0, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 10
}
{
    "duration": 3899, 
    "message": "Uploading image to device", 
    "operation": "upload_image", 
    "progress_percentage": 11
}
{
    "duration": 6456, 
    "error_code": "BadState", 
    "message": "Image upload failed. Bad response from device", 
    "operation": "upload_image", 
    "outcome": "fail", 
    "progress_percentage": 100
}
b'An error was reported by NRFJPROG DLL: -2 INVALID_OPERATION.'
{
    "duration": 3, 
    "error_code": "Ok", 
    "operation": "close_uart", 
    "outcome": "success", 
    "progress_percentage": 100
}
Traceback (most recent call last):
  File "/Users/jerwood/nrf9160_lte_update/ncs/nrf/samples/nrf9160/fmfu_smp_svr/update_modem.py", line 43, in <module>
    run(args.uart, args.firmware, args.baudrate)
  File "/Users/jerwood/nrf9160_lte_update/ncs/nrf/samples/nrf9160/fmfu_smp_svr/update_modem.py", line 26, in run
    modem_dfu_probe.program(modem_firmware_zip)
  File "/Users/jerwood/nrf9160_lte_update/ncs/nrf/samples/nrf9160/fmfu_smp_svr/venv/lib/python3.9/site-packages/pynrfjprog/HighLevel.py", line 350, in program
    raise APIError(result, log=self._logger.error)
pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -2 INVALID_OPERATION.
 

Parents Reply
  • Hi Simon,

    I am also seeing similar errors with my baud rate at 115200. When at 1M baud, I didn't get an error but I only tried a few times. After each success, I connected to the COM port with TeraTerm, restarted the device, verified that the modem firmware version displayed was correct, and disconnected from the COM port.

    Here is what I tried:

    1. Build and program application for 1M baud and load mfw 1.1.4 using Programmer app
    2. 1M_Trial1.txt - success upgrading to mfw 1.2.3
    3. 1M_Trial2.txt - success upgrading to mfw 1.1.4
    4. Build and program application for 115200 baud, did not reprogram modem firmware here and kept mfw 1.1.4 from step 3
    5. 115200_Trial1.txt - failed in upgrading to mfw 1.2.3 - NRFJPROG DLL: -254 INTERNAL_ERROR
    6. Reprogrammed mfw v1.1.4 using Programmer app
    7. 115200_Trial2.txt - success upgrading to mfw 1.2.3
    8. 115200_Trial3.txt - failed in upgrading to mfw 1.1.4 - NRFJPROG DLL: -220 TIME_OUT

    All logs can be found here: /cfs-file/__key/communityserver-discussions-components-files/4/Trials.zip

    I have

    nrfjprog version: 10.12.1
    JLinkARM.dll version: 6.88a

    and pynrfjprog is also 10.12.1

    P.S. There was an error in the build option to build with 1M Baud so I submitted a PR for that here: https://github.com/nrfconnect/sdk-nrf/pull/4149

    Regards,

    Akash

Children
No Data
Related