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
  • Ivo, I can inform that we have started work on supplying Linux ARM binaries as part of the regular nrfjprog delivery.

    Also, looking at the linux fail log I see that a complete package is not returned from the device when it goes into timeout. All packages should end with an RX of 0x0a (newline), so it might be that the default timeouts (400ms) are too low. Maybe it's related to running as a VM. We can try to bump this timeout for testing purposes.

    The mac OSX fail log is harder to understand. There is corrupt/garbled data coming back from the device, and in the next upload from the host the device returns bad state for modem. This one requires more thorough debug.

    Could I inquire how you are going about implementing the host side of the modem dfu?


Children
Related