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

Modem DFU fails on nRF9160 using nRF Connect

Hi,

I'm trying to update the modem firmware on my nRF9160. I believe the current firmware is mfw-m1_nrf9160_0.6.8-30.alpha. I followed Martin's suggestions here, but nRF Connect fails with a DLL error. Below if the output:

2019-10-06T13:09:59.819Z INFO Application data folder: /home/fredrik/.config/nrfconnect/pc-nrfconnect-programmer
2019-10-06T13:09:59.891Z DEBUG App pc-nrfconnect-programmer v1.2.3 official
2019-10-06T13:09:59.891Z DEBUG App path: /home/fredrik/.nrfconnect-apps/node_modules/pc-nrfconnect-programmer
2019-10-06T13:09:59.892Z DEBUG nRFConnect 3.2.0 is supported by the app (^3.2.0)
2019-10-06T13:09:59.892Z DEBUG nRFConnect path: /tmp/.mount_nrfcon8ZSu9x/resources/app.asar
2019-10-06T13:09:59.892Z DEBUG HomeDir: /home/fredrik
2019-10-06T13:09:59.892Z DEBUG TmpDir: /tmp
2019-10-06T13:09:59.907Z INFO Using nrfjprog library 10.3.0, pc-nrfjprog-js 1.5.8
2019-10-06T13:10:03.194Z INFO Using nrfjprog to communicate with target
2019-10-06T13:10:06.405Z INFO Using J-Link Software version 6.44
2019-10-06T13:10:08.555Z INFO Segger serial:  960010299
2019-10-06T13:10:08.555Z INFO Segger speed:  2000  kHz
2019-10-06T13:10:08.555Z INFO Segger version:  J-Link OB-K22-NordicSemi compiled Feb 14 2019 14:03:18
2019-10-06T13:10:08.559Z INFO Probed: 960010299.
2019-10-06T13:10:08.559Z INFO Model: Unknown model.
2019-10-06T13:10:08.559Z INFO RAM: 256KiB.
2019-10-06T13:10:08.559Z INFO Flash: 1024KiB in pages of 4KiB.
2019-10-06T13:10:09.294Z INFO Device type is unknown. It may be a new version of product from Nordic Semiconductor.
2019-10-06T13:10:09.294Z INFO Please check device list supported by nrfjprog.
2019-10-06T13:10:11.386Z INFO Reading device non-volatile memory. This may take a few seconds.
2019-10-06T13:10:21.416Z INFO Modem DFU starts to write...
2019-10-06T13:10:21.416Z INFO Writing to device with serial number: 960010299
2019-10-06T13:10:21.416Z INFO Writing to device with file: /home/fredrik/Downloads/mfw_nrf9160_1.0.0.zip
2019-10-06T13:10:22.872Z ERROR Modem DFU failed with error: Error: Error occured when program. Errorcode: CouldNotOpenDevice (0x4)
Lowlevel error: NRFJPROG_SUB_DLL_COULD_NOT_BE_OPENED (ffffff69)

This is my environment:

  • Ubuntu 16.04
  • nRF Connect v3.2.0
  • Programmer app v1.2.3
  • nrfjprog version: 10.3.0
  • JLinkARM.dll version: 6.44e
  • SiP marking: nRF9160-SICA BAA-E2.1.5 11S7V

Any ideas?

Parents
  • Hi Fredrik, 

    Is it a custom board or a DK?

    If it's a DK, what version of the DK are you using?

    You could try to erase the chip (nrfjprog -e) before programming modem fw 1.0.1.

    -Amanda H.

  • Hi Amanda,

    It's a DK. This is the information from the back of the DK:

    PCA10090
    0.8.2
    2018.49
    960010299

    I tried erasing the chip, but the problem persists.

  • Try installing nrfjprog v10.4.0, see this link, and see if that helps.

    If that does not work either, you might need to update to another version first, before then updating to v1.0.0 / v1.0.1

    E.g. try to update to 0.6.8-131.alpha , or 0.7.0-29.alpha first, and then v1.0.0 / v1.0.1

    Older versions can also be found here: https://www.nordicsemi.com/Products/Low-power-cellular-IoT/nRF9160/Download#infotabs. Note that the pre-v1.0.0 versions need to use the mdm_dfu tool (included in the zip) for the update.

  • Hi Sigurd,

    There seems to be an issue with nrfjprog v10.4.0 on Linux64. After unpacking the tar archive, I run

    $ sudo dpkg -i nRF-Command-Line-Tools_10_4_0_Linux-amd64.deb

    And then to check that the installation worked, I run

    $ cd ~
    $ nrfjprog --version
    ERROR: nrfjprog.ini not found. Please reinstall nrfjprog.

    I'm not sure what's wrong here, as nrfjprog.ini is present in /opt/nrfjprog:

    $ ls /opt/nrfjprog/
    DllCommonDefinitions.h          libhighlevelnrfjprog.so             libnrfjprogdll.so  nrfjprog.ini
    highlevelnrfjprogdll.h          libjlinkarm_nrf51_nrfjprogdll.so    LICENSE.txt        nrfjprog_release_notes.txt
    jlinkarm_nrf51_nrfjprogdll.h    libjlinkarm_nrf52_nrfjprogdll.so    nrfdfu.h           QspiDefault.ini
    jlinkarm_nrf52_nrfjprogdll.h    libjlinkarm_nrf91_nrfjprogdll.so    nrfjprog
    jlinkarm_nrf91_nrfjprogdll.h    libjlinkarm_unknown_nrfjprogdll.so  nrfjprogdll.h
    jlinkarm_unknown_nrfjprogdll.h  libnrfdfudll.so                     nrfjprog.h
    

    And running nrfjprog from inside /opt/nrfjprog works fine. Can you confirm that installing v10.4.0 works on Ubuntu?

    Anyway, I reverted to nrfjprog v10.3.0 (which installs without issues using dpkg as decsribed above) and updated successfully to 0.7.0-29.alpha using the included mdm_dfu tool. However, I am still unable to update to either v1.0.0 or v1.0.1 using the Programmer application.

    2019-10-10T11:30:01.121Z ERROR Modem DFU failed with error: Error: Error occured when program. Errorcode: CouldNotOpenDevice (0x4)
    Lowlevel error: NRFJPROG_SUB_DLL_COULD_NOT_BE_OPENED (ffffff69)

    Are there any CLI tools I can use instead? Anything I can do to understand what the Programmer application is having trouble with?

  • Hi,

    Does it work if you run nRF-Connect for Desktop as sudo ?

    Fredrik said:
    Are there any CLI tools I can use instead?

    You could try to do the modem DFU using this python script

    from pynrfjprog import HighLevelapi = HighLevel.API()
    api.open()
    snr = api.get_connected_probes()
    for s in snr:
        probe = HighLevel.IPCDFUProbe(api, s, HighLevel.CoProcessor.CP_MODEM)
        probe.program("mfw-nrf_9160-1.0.0.zip")
        probe.verify("mfw-nrf_9160-1.0.0.zip")
     
    api.close()

     

  • I am unable to run the latest nRF Connect AppImage as root. It returns immediately with exit code 0 without launching anything. I can run version <= 3.0.0 as root, but the Programmer application does not launch from these versions of nRF Connect.

    Your python script fails with the same error (even when running it as sudo):

    Traceback (most recent call last):
      File "dfu.py", line 6, in <module>
        probe = HighLevel.IPCDFUProbe(api, s, HighLevel.CoProcessor.CP_MODEM)
      File "/home/fredrik/.local/lib/python3.7/site-packages/pynrfjprog/HighLevel.py", line 558, in __init__
        raise APIError(result, log=self._logger.error)
    pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -151 NRFJPROG_SUB_DLL_COULD_NOT_BE_OPENED.

    I tried downgrading pynrfjprog to version 10.3.0 (the same as my current nrfjprog installation) and running the script again. This time it fails here:

    Traceback (most recent call last):
      File "dfu.py", line 13, in <module>
        probe.program("mfw-nrf_9160-1.0.1.zip")
      File "/home/fredrik/miniconda3/lib/python3.7/site-packages/pynrfjprog/HighLevel.py", line 307, in program
        raise APIError(result, log=self._logger.error)
    pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -3 INVALID_PARAMETER.
    

    I can see the LED blinking on the nRF91 DK just before it crashes though, so there is at least some communication.

    For the record, I am using Python 3.7.3.

Reply
  • I am unable to run the latest nRF Connect AppImage as root. It returns immediately with exit code 0 without launching anything. I can run version <= 3.0.0 as root, but the Programmer application does not launch from these versions of nRF Connect.

    Your python script fails with the same error (even when running it as sudo):

    Traceback (most recent call last):
      File "dfu.py", line 6, in <module>
        probe = HighLevel.IPCDFUProbe(api, s, HighLevel.CoProcessor.CP_MODEM)
      File "/home/fredrik/.local/lib/python3.7/site-packages/pynrfjprog/HighLevel.py", line 558, in __init__
        raise APIError(result, log=self._logger.error)
    pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -151 NRFJPROG_SUB_DLL_COULD_NOT_BE_OPENED.

    I tried downgrading pynrfjprog to version 10.3.0 (the same as my current nrfjprog installation) and running the script again. This time it fails here:

    Traceback (most recent call last):
      File "dfu.py", line 13, in <module>
        probe.program("mfw-nrf_9160-1.0.1.zip")
      File "/home/fredrik/miniconda3/lib/python3.7/site-packages/pynrfjprog/HighLevel.py", line 307, in program
        raise APIError(result, log=self._logger.error)
    pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -3 INVALID_PARAMETER.
    

    I can see the LED blinking on the nRF91 DK just before it crashes though, so there is at least some communication.

    For the record, I am using Python 3.7.3.

Children
Related