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

No ping response after opening COM port

Hi,

I am currently doing a uart dfu over 2 nrf 52840 dks on a Windows PC. I have been using the example found in ...\examples\dfu\secure_bootloader\pca10056_uart_debug supplied in the SDK 15.3.0. I have been able to successfully do a dfu to both devices when they are not connected to each other. I have been using nrfutil version 6.1.0. However, I am now trying to do a dfu to one of the dks being connected via uart to the other dk which is then connected to the PC. I have it connected as shown in the picture below:

Both devices are flashed with a secure_bootloader and are entering DFU mode, however when I perform a dfu, I get the output shown below:

$ nrfutil dfu serial -pkg app.zip -p COM3
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\Scripts\nrfutil-script.py", line 11, in <module>
    load_entry_point('nrfutil==6.1.0', 'console_scripts', 'nrfutil')()
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\__main__.py", line 1056, in serial
    timeout)
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\__main__.py", line 970, in do_serial
    dfu.dfu_send_images()
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\dfu\dfu.py", line 127, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\dfu\dfu.py", line 88, in _dfu_send_image
    self.dfu_transport.open()
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 214, in open
    raise NordicSemiException("No ping response after opening COM port")
pc_ble_driver_py.exceptions.NordicSemiException: No ping response after opening COM port

This is what is outputted without any change to the code. If I change the baud rate and/or disable HWFC I still get the same error for the most part. 

If I connect both nrf devices to the PC and do a dfu through one of the devices, I get this error:

$ nrfutil dfu serial -pkg app.zip -p COM3
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\Scripts\nrfutil-script.py", line 11, in <module>
    load_entry_point('nrfutil==6.1.0', 'console_scripts', 'nrfutil')()
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\__main__.py", line 1056, in serial
    timeout)
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\__main__.py", line 970, in do_serial
    dfu.dfu_send_images()
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\dfu\dfu.py", line 127, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\dfu\dfu.py", line 88, in _dfu_send_image
    self.dfu_transport.open()
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 216, in open
    self.__set_prn()
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 360, in __set_prn
    self.__get_response(DfuTransportSerial.OP_CODE['SetPRN'])
  File "c:\program files (x86)\python37-32\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 492, in __get_response
    + 'Expected: 0x{:02X} Received: 0x{:02X}'.format(operation, resp[1]))
pc_ble_driver_py.exceptions.NordicSemiException: Unexpected Executed OP_CODE.
Expected: 0x02 Received: 0x60

Without reprogramming the boards, if I disconnect the UART connection between the nrf devices and do a dfu, it works on the device connected to the PC. If anyone has any ideas as to what I am missing and how to resolve this error, I would greatly appreciate it!!!

Related