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

How to set up minimal version of nrfutil, needed just for DFU package creation??

I am setting up a build server that will take care of building our app for the nRF52 and creating the DFU files. For DFU package, I need nrfutil.

Everything is working fine in my Windows PC, but I need to replicate the setup in Linux (Ubuntu 10.04). I'm running into some trouble when installing nrfutil on the build machine.

The problem is related to the pc_ble_driver_py module that cannot be automatically installed by the setup script. This seems to be a known issue and it is mentioned e.g. here:
https://github.com/NordicSemiconductor/pc-ble-driver-py/issues/148

Updating pip is supposed to resolve the issue, but it did not help in my case.

Here's the deal: I need only a very minimal subset of the nrfutil tool. What I need is the update file creation, i.e. "nrfutil pkg generate". 

Seems to me that nrfutil is some sort of swiss army knife that can do just about anything and therefore it also requires a bunch of modules, some of which seem unnecessary when I just want to be able to create the update zip package.

Any ideas how to configure the nrfutil so that the setup script installs just a minimal version of the tool? As said, all I need is "nrfutil pkg generate"?

I tried removing the pc_ble_driver_py manually from the requirements list. The setup script finishes, but the program won't run so it's a dead end.

Parents
  • UPDATE: I was able to get the nrfutil working on my linux box, but not sure what was the actual issue. Here's the details:

    Previously, the setup script failed and threw an error as follows:

    error: Could not find suitable distribution for Requirement.parse('pc_ble_driver_py>=0.14.1')

    Then I removed the pc_ble_driver_py line from the requirements.txt file and the setup completed, but program would not run. (Because the module could not be loaded at startup)

    Finally, I tried installing the module with command:

    pip install pc-ble-driver-py

    And now I can run the nrfutil just fine. Problem solved, but curious to find out why it wasn't working straight out of the box?

    One thing that caught my eye is the naming of the module: in the requirements.txt it is with underscores (pc_ble_driver_py) while the module that I installed manually uses hyphens (pc-ble-driver-py).

  • Hi Tyler,

    My guess is that the problem was related to the pip version, as pip needs to be >=19. When you updated pip which version did you update to?

    When you ran it manually afterwards you probably got an older pc-ble-driver-py version, which is not really compatible, but you will not notice until you use BLE DFU.

    BR,

    Marjeris

  • Hi Marjeris,

    pip version should be fresh enough, just checked:

    pip --version
    pip 20.0.2 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)

    This is not a big issue for me because I currently only need the tool only for DFU package generation. In any case, if it does not install out of the box on Ubuntu 10.04 then I guess there are many other customers that may be scratching their heads with this same problem.

  • Hi,

    Not sure what happened then... The Ubuntu version you are using is quite old so maybe that may have something to do with it... I will need to dig a bit deeper to be sure, but thanks for reporting, it's useful to know if we have other customers with the same issue Slight smile

Reply Children
No Data
Related