pynrfjprog cannot update modem of nrf9160

Hi Nordic

   I had used pynrfjprog to update modem of nrf9160 for a long time. Everything ran well and smoothly.

But, yesterday, I found it failed to update modem. I have no idea what I happened. The python script was same. The hardware was same.

What I did between was to upgrade pynrfjprog and nrf command line. 

Please help me. Thanks.

1. my software

python: v3.8

pynrfjprog: v10.24.0

nrf command line: lates 10.24.0. 

2.

LOG after run "python update_modem.py .\mfw_nrf9160_1.3.4.zip". It logged NOT_AVAILABLE_BECAUSE_PROTECTION

3. update_modem.py

#!/usr/bin/env python3
#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic

import argparse
from pynrfjprog import HighLevel

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("modem_pkg", default=None, help="Path to nrf9160 modem firmware zip folder")
    args = parser.parse_args()
    print("Modem firmware upgrade")
    api = HighLevel.API()
    api.open()
    snr = api.get_connected_probes()
    for s in snr:
      print("snr:%s",s)
      probe = HighLevel.IPCDFUProbe(api, s, HighLevel.CoProcessor.CP_MODEM)
      print("programming...")
      probe.program(args.modem_pkg)
      print("verifying...")
      probe.verify(args.modem_pkg)
      print("Done")
    api.close()

if __name__ == '__main__':
    main()

Parents Reply
  • Hi Dejans

    1.

    Since this issue found after upgrading tools, I forgot the previous versions both.

    I also tried to downgrade pynrfjprog and nrf command line. However, it was no use.

    It still failed to update modem at same reason. It was weird.

    2. Could you try my "up_modem.py" at your side?

        Or, if you saw some error at this python script. Please tell me how to correct it.

    Jeff

Children
Related