Issue downloading the nrfutil software

Hello,

I am having an issue with trying to install the nrfutil program from this Nordic download page . When I click on the download for the Linux(x64) version of the nrfutil, I get the following pop up instead of downloading the nrfutil program:

I tried downloading nrfutil via pip3, but it appears that it may be an older version. I am following this Nordic tutorial which uses the command 

nrfutil dfu usb_serial -pkg package.zip -p COM_PORT
 

for USB transport. Using the pip3 nrfutil install I am unable to use the usb_serial command after the dfu, which indicates it is an outdated tool. Ultimately, I just want to be able to download the nrfutil tool, so if anyone has any idea on how I can get it, please let me know.

Parents
  • Hello Joseph,

    I am looking into it, and will get back to you.

    Regards,

    Elfving

  • Thank you. In the meantime I have a little bit more information regarding the pip3 installation of the nrfutil program:

    I figured out that the "usb_serial" is actually "usb-serial" and overlooked this at first. However, I am still running into an issue with the nrfutil command giving the following error (in the following example I tried using UART. A very similar thing occurs when I'm using USB):

    nrfutil dfu serial -pkg blinky_mbr.zip -p /dev/ttyACM0
      [------------------------------------]    0%
    Traceback (most recent call last):
      File "/home/jspear/.local/bin/nrfutil", line 8, in <module>
        sys.exit(cli())
      File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
        return self.main(*args, **kwargs)
      File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
        rv = self.invoke(ctx)
      File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
        return __callback(*args, **kwargs)
      File "/home/jspear/.local/lib/python3.10/site-packages/nordicsemi/__main__.py", line 1073, in serial
        do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, serial_number, True,
      File "/home/jspear/.local/lib/python3.10/site-packages/nordicsemi/__main__.py", line 988, in do_serial
        dfu.dfu_send_images()
      File "/home/jspear/.local/lib/python3.10/site-packages/nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
        self._dfu_send_image(self.manifest.application)
      File "/home/jspear/.local/lib/python3.10/site-packages/nordicsemi/dfu/dfu.py", line 95, in _dfu_send_image
        self.dfu_transport.send_init_packet(data)
      File "/home/jspear/.local/lib/python3.10/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 255, in send_init_packet
        self.__stream_data(data=init_packet)
      File "/home/jspear/.local/lib/python3.10/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 474, in __stream_data
        response = self.__calculate_checksum()
      File "/home/jspear/.local/lib/python3.10/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 409, in __calculate_checksum
        response = self.__get_response(DfuTransportSerial.OP_CODE['CalcChecSum'])
      File "/home/jspear/.local/lib/python3.10/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 491, in __get_response
        raise NordicSemiException('Unexpected Executed OP_CODE.\n' \
    pc_ble_driver_py.exceptions.NordicSemiException: Unexpected Executed OP_CODE.
    Expected: 0x03 Received: 0x55

    Not sure if this is something caused by me not using the official release which is on the aforementioned Nordic webpage download (side not, I'm not sure if that download is even different from the pip3 install) or if there is another issue going on.

    My overall goal is install a DFU bootloader and then an example application to test functionality. I am using an nRF52840-DK and some files from the dfu example in the nRF5 SDK v15. Here are the steps I am following to try and get them installed on the device:

    1. Erase the whole flash using the following command: 
      nrfjprog -e
    2. From /examples/dfu/secure_bootloader/pca10056_uart_debug/hex I install the secure_bootloader_uart_mbr_pca10056_debug.hex file onto the DK using the following command: 
      nrfjprog --reset --program secure_bootloader_uart_mbr_pca10056_debug.hex --verify
    3. From /examples/dfu/secure_dfu_test_images/uart/nrf52840 I install the blinky_mbr.zip file onto the DK using the following command: 
      nrfutil dfu serial -pkg blinky_mbr.zip -p /dev/ttyACM0
    4. At this point I get the error described above. 

    Is there any steps I am missing? I've been trying to follow various guides on how to program the bootloader and how to install FW using DFU over Serial, so if there are better/updated guides that I should follow, it would be wonderful to know.

    Thanks

  • Hello again,

    First of all, I believe there is some standard set in your browser that makes it open files without an extension as a text file in the browser instead of downloading them. I guess you'd want this fixed, but for now you can circumvent this by saving the text that is being opened by eg. pressing ctrl+s.

    Does this fix the version issues you ran into later on?

    Regards,

    Elfving

  • Hi Elfving,

    Apologies for the delay, yes I was able to get it saved with ctrl + s. I gave it executable permissions using 

    chmod +x nrfutil

    and it appears to be working as I am able to use the newer commands such as installing the nrf5sdk-tools command. I seem to be running into a new problem. Following the same procedures I used above, I change the last line where I use the nrfutil and insert the nrf5sdk-tools command (seen at the top of the following code) and now I get a new error as shown here: 

    ./nrfutil nrf5sdk-tools dfu serial -pkg blinky_mbr.zip -p /dev/ttyACM0
      [------------------------------------]    0%
    Traceback (most recent call last):
      File "nordicsemi/__main__.py", line 1555, in <module>
      File "click/core.py", line 1137, in __call__
      File "click/core.py", line 1062, in main
      File "click/core.py", line 1668, in invoke
      File "click/core.py", line 1668, in invoke
      File "click/core.py", line 1404, in invoke
      File "click/core.py", line 763, in invoke
      File "nordicsemi/__main__.py", line 1073, in serial
      File "nordicsemi/__main__.py", line 988, in do_serial
      File "nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
      File "nordicsemi/dfu/dfu.py", line 95, in _dfu_send_image
      File "nordicsemi/dfu/dfu_transport_serial.py", line 255, in send_init_packet
      File "nordicsemi/dfu/dfu_transport_serial.py", line 474, in __stream_data
      File "nordicsemi/dfu/dfu_transport_serial.py", line 409, in __calculate_checksum
      File "nordicsemi/dfu/dfu_transport_serial.py", line 491, in __get_response
    pc_ble_driver_py.exceptions.NordicSemiException: Unexpected Executed OP_CODE.
    Expected: 0x03 Received: 0x55
    [7195] Failed to execute script '__main__' due to unhandled exception!
    Before attempting this I did an nrfutil upgrade to make sure I had the latest version, and I freshly installed the nrf5sdk-tools.

    It seems I am using the correct, most updated program now, I am just running into this issue now.

    Thanks for all of the help!

  • Hi,

    Elfing is out of office now, so I will continue handling the case in the meantime.

    Can you list the steps you followed to create blinky_mbr.zip?

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd, thanks for getting with me.

    Can you list the steps you followed to create blinky_mbr.zip?

    The blinky_mbr.zip was a test package which came from the <NRF_SDK_15_0_ROOT>/examples/dfu/secure_dfu_images/uart/nrf52840/ directory. I have since been working with using the pkg generate command of the nrfutil program to create packages from the ble_app_blinky example, but I still get similar issues.

    Joseph

  • I think I have figured the issue. While trying to use the USB transport protocol, I was using the USB adapter on the short side of the nRF52840 Dev Kit, which apparently does not work. After attaching my USB cable to the long side, the 

    nrfutil nrf5sdk-tools dfu usb-serial -pkg dfu_img.zip -p /dev/ttyACM1
      [####################################]  100%          
    Device programmed.

    command actually worked to upload the firmware! So this is an interesting fact, which is that if using the USB DFU to upload new firmware, the device needs to be hooked up to the USB port connected to the nRF itself (port on the long side of the board), not the port connected to the interface MCU (port on the short side of the board). 

    I think from here, I should be able to close this ticket, as I have a solution to the original post problem, and the subsequent problem.

Reply
  • I think I have figured the issue. While trying to use the USB transport protocol, I was using the USB adapter on the short side of the nRF52840 Dev Kit, which apparently does not work. After attaching my USB cable to the long side, the 

    nrfutil nrf5sdk-tools dfu usb-serial -pkg dfu_img.zip -p /dev/ttyACM1
      [####################################]  100%          
    Device programmed.

    command actually worked to upload the firmware! So this is an interesting fact, which is that if using the USB DFU to upload new firmware, the device needs to be hooked up to the USB port connected to the nRF itself (port on the long side of the board), not the port connected to the interface MCU (port on the short side of the board). 

    I think from here, I should be able to close this ticket, as I have a solution to the original post problem, and the subsequent problem.

Children
No Data
Related