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

nRF9160-DK and lwm2m sample

Hi,

I'm just getting started and tried to run the lwm2m_client sample from the v1.2.0 release of the nRF Connect SDK  which I assume is the latest stable version? However lte_lc_init fails with error code  -5 which can be traced to the zephyr message queue:

w_lte_lc_init()

at_cmd_write(nw_mode_preferred, NULL, 0, NULL)

at_write(cmd, state)

k_msgq_get(&return_code_msq, &ret, K_FOREVER);

which sets ret.code to -8 (Exec format error?)
It looks like a low level zephyr issue. Should I switch to another release? Thanks.
Parents
  • Upgraded the modem firmware and I now pass lte_lc_init:

    #!/usr/bin/env python3
    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
    
    
    from pynrfjprog import HighLevel
    import wget
    import sys
    
    def bar_progress(current, total, width=80):
      progress_message = "Downloading: %d%% [%d / %d] bytes" % (current / total * 100, current, total)
      sys.stdout.write("\r" + progress_message)
      sys.stdout.flush()
    
    LATEST_FIRMWARE = "mfwnrf9160120.zip"
    wget.download("https://www.nordicsemi.com/-/media/Software-and-other-downloads/Dev-Kits/nRF9160-DK/nRF9160-modem-FW/" + LATEST_FIRMWARE, bar=bar_progress, out="/tmp/"+LATEST_FIRMWARE)
    
    api = HighLevel.API()
    api.open()
    snr = api.get_connected_probes()
    for s in snr:
        probe = HighLevel.IPCDFUProbe(api, s, HighLevel.CoProcessor.CP_MODEM)
        print("\nProgramming the new firmware...")
        probe.program("/tmp/"+LATEST_FIRMWARE)
        print("Verifying the new firmware...")
        probe.verify("/tmp/"+LATEST_FIRMWARE)
        print("Done")
     
    api.close()

Reply
  • Upgraded the modem firmware and I now pass lte_lc_init:

    #!/usr/bin/env python3
    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
    
    
    from pynrfjprog import HighLevel
    import wget
    import sys
    
    def bar_progress(current, total, width=80):
      progress_message = "Downloading: %d%% [%d / %d] bytes" % (current / total * 100, current, total)
      sys.stdout.write("\r" + progress_message)
      sys.stdout.flush()
    
    LATEST_FIRMWARE = "mfwnrf9160120.zip"
    wget.download("https://www.nordicsemi.com/-/media/Software-and-other-downloads/Dev-Kits/nRF9160-DK/nRF9160-modem-FW/" + LATEST_FIRMWARE, bar=bar_progress, out="/tmp/"+LATEST_FIRMWARE)
    
    api = HighLevel.API()
    api.open()
    snr = api.get_connected_probes()
    for s in snr:
        probe = HighLevel.IPCDFUProbe(api, s, HighLevel.CoProcessor.CP_MODEM)
        print("\nProgramming the new firmware...")
        probe.program("/tmp/"+LATEST_FIRMWARE)
        print("Verifying the new firmware...")
        probe.verify("/tmp/"+LATEST_FIRMWARE)
        print("Done")
     
    api.close()

Children
No Data
Related