- Edited
Hi cchoi22915, yup the mfw_update
sample is for standalone upgrades. (No programmer or dev kit necessary)
Hi cchoi22915, yup the mfw_update
sample is for standalone upgrades. (No programmer or dev kit necessary)
@cchoi22915 I assume you’re following the directions from here? https://docs.jaredwolff.com/nrf9160-managing-mfw.html
jaredwolff Yes that is correct. I am able to run other code successfully (such as AT_Client) Here is the full error log:
PS C:\Users\Chris\OneDrive\Desktop\Test\nfed\samples\mfw_update> python3 update_modem.py mfw_nrf9160_1.2.7.zip COM5 1000000
# modem firmware upgrade over serial port example started.
[HighLevel] Creating new probe
[HighLevel] Initialize new probe.
[Probes.COM5] [ModemUARTDFUProbe] Dll directory is C:\Users\Chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynrfjprog\lib_x64.
[Probes.COM5] [ModemUARTDFUProbe] Find and connect to dfu dll
[Probes.COM5] [ModemUARTDFUProbe] Using DFU dll at C:\Users\Chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.
[Probes.COM5] [ModemUARTDFUProbe] Load library at C:\Users\Chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.
[Probes.COM5] [ModemUARTDFUProbe] GetErrorInfo failed.
[Probes.COM5] [ModemUARTDFUProbe] Failed to load dll at C:\Users\Chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.
[HighLevel] Failed while initializing probe.
[Probes.COM5] b'An error was reported by NRFJPROG DLL: -151 NRFJPROG_SUB_DLL_COULD_NOT_BE_OPENED. \n[Probes.COM5] [ModemUARTDFUProbe] GetErrorInfo failed.\n\textra: [Probes.COM5] [ModemUARTDFUProbe] Failed to load dll at C:\\Users\\Chris\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\pynrfjprog\\lib_x64\\NRFDFU.dll.\n\textra: [HighLevel] Failed while initializing probe.'
[HighLevel] Closing and freeing sub dlls.
Traceback (most recent call last):
File "C:\Users\Chris\OneDrive\Desktop\Test\nfed\samples\mfw_update\update_modem.py", line 43, in <module>
run(args.uart, args.firmware, args.baudrate)
File "C:\Users\Chris\OneDrive\Desktop\Test\nfed\samples\mfw_update\update_modem.py", line 25, in run
with HighLevel.ModemUARTDFUProbe(api, uart, baudrate) as modem_dfu_probe:
File "C:\Users\Chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynrfjprog\HighLevel.py", line 591, in __init__
raise APIError(result, error_data=self.get_errors(), log=self._logger.error)
pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -151 NRFJPROG_SUB_DLL_COULD_NOT_BE_OPENED.
[Probes.COM5] [ModemUARTDFUProbe] GetErrorInfo failed.
extra: [Probes.COM5] [ModemUARTDFUProbe] Failed to load dll at C:\Users\Chris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynrfjprog\lib_x64\NRFDFU.dll.
extra: [HighLevel] Failed while initializing probe.
PS C:\Users\Chris\OneDrive\Desktop\Test\nfed\samples\mfw_update>
I have uninstalled and installed practically everything (even restarting my computer in between). I wonder if there is a way for me to download NRFDFU.dll separately? Although there appears to be a bigger issue at hand
.
cchoi22915 can you install the CLI tools from Nordic and try again?
https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools/download
I think originally that DLL was packaged with the Python module but that may have changed recently. I know other people in the community are having similar problems.
https://community.jaredwolff.com/d/308-updating-modem-firmware-with-python-cant-parse-digest-file
jaredwolff no joy, the same thing occurs
jaredwolff Hmm, I wonder if I can go to a really old version
cchoi22915 looks like you’re using power shell. Can you try from cmd.exe instead?
jaredwolff Ran the same command in cmd.exe with admin rights and the same issue occurs
What version of python
do you have installed?
jaredwolff 3.10.4
What type of system are you running on cchoi22915 ? (OS and Architecture)
jaredwolff I am running Windows 11 ×64
Hmmmmm. I have a feeling it may have something to do with the Python install. Hard to say. There’s nothing on the repo that states you can’t use the latest/3.10.
https://github.com/NordicSemiconductor/pynrfjprog
Have you tried downgrading and using something like Python 3.7?
That is one thing I have not tried downgrading yet. I am currently creating an Ubuntu VM to see if it is an OS related issue. I will try to downgrade python and also try Linux to see how this fairs.
cchoi22915 sounds good. Sorry this is a pain.
jaredwolff no worries, thank you for helping. I will update on how it goes
jaredwolff Whoops, forgot to update this thread, but the issue continued to occur when I tried this in Linux. I was, however, able to follow the steps in LINK TO FORUM PAGE and successfully update the modem firmware.
That’s awesome! Thanks for letting me know cchoi22915