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

nrfutil for Border Router

I am working with Thread on the nRF52840 and have setup a few nodes and a Border Router 1.0.0 as described in the documentation using Raspberry Pi 3B+.

My sdk is nRF5_SDK_for_Thread_and_Zigbee_v1.0.0

Is it possible to run nrfutil on the Raspberry Pi?

I tried the following on Rasp Pi:

sudo apt-get update

sudo apt-get install python-pip

sudo pip install nrf util

It seemed to successfully install, but I'm thinking it's intended for a PC, not ARM.

I followed the Thread Secure DFU example using my PC successfully, and then prepared another package (appdfu_package_3.zip) with a minor change to the client code.

I ran nrfutil as before, only this time on the Raspberry Pi within the Border Router.  I left off the -f option, since the Border Router is already connected to a DK board running NCP.

nrfutil dfu thread -pkg appdfu_package_3.zip --channel 11 --panid 43981 -r 8 -rs 5000 -a FF03::1
Traceback (most recent call last):
  File "/usr/local/bin/nrfutil", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/__main__.py", line 901, in thread
    ble_driver_init('NRF52')
  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/__main__.py", line 65, in ble_driver_init
    from pc_ble_driver_py.ble_driver    import BLEDriver, Flasher
  File "/usr/local/lib/python2.7/dist-packages/pc_ble_driver_py/ble_driver.py", line 105, in <module>
    raise RuntimeError("Could not load shared library {} : '{}'.".format(shlib_path, error))
RuntimeError: Could not load shared library /usr/local/lib/python2.7/dist-packages/pc_ble_driver_py/lib/linux/x86_32/libpc_ble_driver_shared_sd_api_v3.so : '/usr/local/lib/python2.7/dist-packages/pc_ble_driver_py/lib/linux/x86_32/libpc_ble_driver_shared_sd_api_v3.so: cannot open shared object file: No such file or directory'.

The libraries is said it couldn't find are in fact there.  But I suspect they are compiled for x86 and not ARM, given the path name.

I saw an older post https://devzone.nordicsemi.com/f/nordic-q-a/15509/trying-to-use-a-nrfutil-command-on-raspbian-os describing how to compile nrfutil from source, but it's a bit old and doesn't mention these libraries.

Is this possible?  Any plans to provide nrfutil for ARM?

Mary

Parents
  • Hi,

    You are correct that the library is compiled for x86 Linux and not ARM Linux. The pc-ble-driver library seems to only be used for checking/flashing the NCP firmware when doing Thread DFU. Even though you do not include the -f argument, you will get an error anyway when the application is trying to import the library, and it is not found.

    You can try to remove the import of the library in the __main__.py file (/usr/local/lib/python2.7/dist-packages/nordicsemi/__main__.py), and everything calling functions from this library. 

    The flasher library in pc-ble-driver is dependent on the J-Link ARM dll file for performing firmware flashing and memory operations. The J-Link SDK have not been available for ARM Linux architecture before. According to this post it should now be available, but without any support for the ARM version. I do not think we will add support for this until it is available in stable release, with support from Segger.

    Best regards,
    Jørgen

  • Is there an example showing how to perform DFU using a remote server? 

    How is this expected to be done in the field at a customer site?

    Is there a way to set the master key as well as the panid and channel?

    Mary

Reply Children
No Data
Related