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

Issue in nrfutil to execute thread DFU on raspberry Pi3

Hello,

I am using "nRF5_SDK_for_Thread_and_Zigbee_v3.1.0_c7c4730" for NCP as well as other thread devices.
nrfutil version: 5.2.0
RPI3 image: RaspPi_OT_Border_Router_Demo_v3.1.0-1.alpha.img

I am using nRF52840 dongle for NCP device  which i attach with my RPI3.

I want to perform the DFU keeping the existing thread network working.

I have tried to do the thread DFU using nRF util in raspberry PI.

I get following output:

$ sudo python2.7 nordicsemi/__main__.py dfu thread -pkg ../../app_dfu_package.zip -p /dev/ttyACM1 --channel 24 --panid 4396
Address not specified. Using ff03::1 (all Thread nodes)
Using connectivity board at serial port: /dev/ttyACM1
2019-12-09 15:14:01,632 Failed to reset NCP. Please flash connectivity firmware.
Traceback (most recent call last):
  File "nordicsemi/__main__.py", line 1375, in thread
    transport.open()
  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/thread/tncp.py", line 224, in open
    raise Exception('Failed to reset NCP. Please flash connectivity firmware.')
Exception: Failed to reset NCP. Please flash connectivity firmware.

Meanwhile i have tried adding one more USB dongle and the same process but the result is same.

Note: NCP firmware is correct as well as i have double checked the Com port for USB dongles.

Do you have any documentation explaining the Thread DFU process using nrfutil also the implementation notes on thread COAP server will be very helpul.

Parents Reply Children
  • Hello Marjeris,

    Thanks for the response.

    Yes i am using unmodified NCP hex (Path/To/SDK/examples/thread/ncp/ftd/usb/hex/nrf52840_xxaa_mbr_pca10059.hex) 

    for nRF52840 Dongle PCA10059 (NCP device) with RPI to act as NCP host.

    Question: is it necessary to use only devkit as a NCP for the OTA?

    I do not require to do the OTA in the NCP itself. I just wanted to perform the OTA of other nodes in the network. 

    Question: Do i still need to integrate DFU code in NCP ?

    I have taken exactly the same example Thread Secure OTA DFU example you are talking about for the Thread DFU client.

    Just for a note I faced many issues installing pc-ble-driver on RPI3 which i resolved somehow but it was very tricky. Any set-up guide will be helpful for future set-up.

  • Hi Jadeja,

    Yes, you need to use the nRF52840 DK for using 'nrfutil dfu thread', because the nrfutil needs to flash the connectivity software to the IC (which is not the same code as the NCP example under SDK/examples/thread/ncp/ftd/usb/hex) and it does this using the JLink onboard debugger.

    Best regards,

    Marjeris

  • Hello Marjeris

    Thanks for the reply.

    I have replaced my set-up with nRF52840 devkit, but now i am getting pc-ble-driver error while using with Raspberry-pi. 

    I am able to start the ota from my linux PC. I guess now issue is PC-BLE-DRIVER version and it is proper installation.

    Please see the log :

    pi@raspberrypi:~ $ nrfutil dfu thread -pkg app_dfu_package.zip -p /dev/ttyACM1 --channel 24 --panid 4396
    Traceback (most recent call last):
      File "/usr/local/bin/nrfutil", line 6, in <module>
        from pkg_resources import load_entry_point
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3251, in <module>
        @_call_aside
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3235, in _call_aside
        f(*args, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 585, in _build_master
        return cls._build_from_requirements(__requires__)
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
        dists = ws.resolve(reqs, Environment())
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 786, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'pc_ble_driver_py>=0.14.0' distribution was not found and is required by nrfutil
    

    Can you share the steps to install the PC-BLE-Driver into raspberry pi. I have asked it in my first post.

Related