(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.