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

Updating firmware with dfu bootloader

Hi,

i would like to program my module nRF52840 via uart.

I generated private then public key using nrfutil.exe tool

i could programm softdevice and bootloader and flash them on my nRF52840.

I use : https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v11.0.0%2Fbledfu_example_serial.html

now i want to update firmware, first i'm testing an existing package : softdevice_s140.zip (nRF5_SDK_15.0.0_a53641a\examples\dfu\secure_dfu_test_images\uart\nrf52840)

so i try to execute this cmd : 

D:\Work\nRF5_SDK_15.0.0 ble_telechargement_uart\examples\dfu\secure_dfu_test_images>nrfutil.exe dfu serial --package softdevice_s140.zip --port 4 -fc 1 : here is the result : 

D:\Work\nRF5_SDK_15.0.0 ble_telechargement_uart\examples\dfu\secure_dfu_test_images>nrfutil.exe dfu serial --package softdevice_s140.zip --port 4 -fc 1
  [------------------------------------]    0%
Traceback (most recent call last):
  File "nordicsemi\__main__.py", line 987, in <module>
  File "site-packages\click\core.py", line 722, in __call__
  File "site-packages\click\core.py", line 697, in main
  File "site-packages\click\core.py", line 1066, in invoke
  File "site-packages\click\core.py", line 1066, in invoke
  File "site-packages\click\core.py", line 895, in invoke
  File "site-packages\click\core.py", line 535, in invoke
  File "nordicsemi\__main__.py", line 745, in serial
  File "nordicsemi\__main__.py", line 680, in do_serial
  File "nordicsemi\dfu\dfu.py", line 121, in dfu_send_images
  File "nordicsemi\dfu\dfu.py", line 90, in _dfu_send_image
  File "nordicsemi\dfu\dfu_transport_serial.py", line 200, in open
pc_ble_driver_py.exceptions.NordicSemiException: Serial port could not be opened on {0}. Reason: could not open port '4': WindowsError(2, 'Le fichier sp\xe9cifi\xe9 est introuvable.')
Failed to execute script __main__

on windows device manager , i have  : Jlink CDC UART Port (COM4) and USB Serial Port (COM5), i also tryed with com 5.

what is th correct arg pls ?

Parents
  • D:\Work\nRF5_SDK_15.0.0 ble_telechargement_uart\examples\dfu\secure_dfu_test_images>nrfutil.exe dfu serial --package softdevice_s140.zip --port COM4 -fc 1
      [------------------------------------]    0%
    Traceback (most recent call last):
      File "nordicsemi\__main__.py", line 987, in <module>
      File "site-packages\click\core.py", line 722, in __call__
      File "site-packages\click\core.py", line 697, in main
      File "site-packages\click\core.py", line 1066, in invoke
      File "site-packages\click\core.py", line 1066, in invoke
      File "site-packages\click\core.py", line 895, in invoke
      File "site-packages\click\core.py", line 535, in invoke
      File "nordicsemi\__main__.py", line 745, in serial
      File "nordicsemi\__main__.py", line 680, in do_serial
      File "nordicsemi\dfu\dfu.py", line 121, in dfu_send_images
      File "nordicsemi\dfu\dfu.py", line 90, in _dfu_send_image
      File "nordicsemi\dfu\dfu_transport_serial.py", line 211, in open
    pc_ble_driver_py.exceptions.NordicSemiException: No ping response after opening COM port
    Failed to execute script __main__

Reply
  • D:\Work\nRF5_SDK_15.0.0 ble_telechargement_uart\examples\dfu\secure_dfu_test_images>nrfutil.exe dfu serial --package softdevice_s140.zip --port COM4 -fc 1
      [------------------------------------]    0%
    Traceback (most recent call last):
      File "nordicsemi\__main__.py", line 987, in <module>
      File "site-packages\click\core.py", line 722, in __call__
      File "site-packages\click\core.py", line 697, in main
      File "site-packages\click\core.py", line 1066, in invoke
      File "site-packages\click\core.py", line 1066, in invoke
      File "site-packages\click\core.py", line 895, in invoke
      File "site-packages\click\core.py", line 535, in invoke
      File "nordicsemi\__main__.py", line 745, in serial
      File "nordicsemi\__main__.py", line 680, in do_serial
      File "nordicsemi\dfu\dfu.py", line 121, in dfu_send_images
      File "nordicsemi\dfu\dfu.py", line 90, in _dfu_send_image
      File "nordicsemi\dfu\dfu_transport_serial.py", line 211, in open
    pc_ble_driver_py.exceptions.NordicSemiException: No ping response after opening COM port
    Failed to execute script __main__

Children
  • D:\Work\nRF5_SDK_15.0.0 ble_telechargement_uart\examples\dfu\secure_dfu_test_images>nrfutil.exe dfu serial --package softdevice_s140.zip --port COM5 -fc 1
      [------------------------------------]    0%
    Traceback (most recent call last):
      File "nordicsemi\__main__.py", line 987, in <module>
      File "site-packages\click\core.py", line 722, in __call__
      File "site-packages\click\core.py", line 697, in main
      File "site-packages\click\core.py", line 1066, in invoke
      File "site-packages\click\core.py", line 1066, in invoke
      File "site-packages\click\core.py", line 895, in invoke
      File "site-packages\click\core.py", line 535, in invoke
      File "nordicsemi\__main__.py", line 745, in serial
      File "nordicsemi\__main__.py", line 680, in do_serial
      File "nordicsemi\dfu\dfu.py", line 121, in dfu_send_images
      File "nordicsemi\dfu\dfu.py", line 97, in _dfu_send_image
      File "nordicsemi\dfu\dfu_transport_serial.py", line 253, in send_init_packet
      File "nordicsemi\dfu\dfu_transport_serial.py", line 370, in __execute
      File "nordicsemi\dfu\dfu_transport_serial.py", line 454, in __get_response
    pc_ble_driver_py.exceptions.NordicSemiException: Response Code InvalidObject
    Failed to execute script __main__

    in this try, i don't see problem with COM port... but i don't understand this new problem ...

Related