Hi
I want to use nrfutil as a command line tool on a Raspberry Pi 4 box.
Out of the box, I could not install nrfutil (missing drivers?) compatible with Python3 so I tried Python 2.
I was able to install nrfutil but could not run it -- kept getting run time errors that pc-ble-driver libraries could not be loaded (or something similar to that sort of error).
Then I downloaded and build the pc-ble-driver from sources, as documented here. After a lot of struggles, I was finally able to get a build for Python3.
*** BUT ***
The build generated multiple shared libraries with filenames ending in _v2.so, _v3.so, _v4.so, _v4.so, _v6.so.
The nrfutil error message was saying that it could not find the shared library 'libpc_ble_driver_shared_sd_api_v3.so' but none of the files generated by the build match this name.
On a whim, I created a soft link from the generated file 'libnrf-ble-driver-sd_api_v3.so' to a file named 'libpc_ble_driver_shared_sd_api_v3.so' and added this folder to the environment variable LD_LIBRARY_PATH.
Now, the nrfutil loads this shared object but I get the error trace:
File "/usr/local/lib/python3.7/dist-packages/nordicsemi/__main__.py", line 67, in ble_driver_init
from pc_ble_driver_py.ble_driver import BLEDriver, Flasher
File "/usr/local/lib/python3.7/dist-packages/pc_ble_driver_py/ble_driver.py", line 112, in <module>
driver = importlib.import_module(SWIG_MODULE_NAME)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'pc_ble_driver_sd_api_v3'
My question(s) are:
1. What is the actual/correct version of the generated shared objects that should be pulled into the nrfutil?
2. Why is the error referring to version 3 of the API while all of the documentation I see for the nRF52 DK (with nRF52832) state that the BLE Driver API to use is v5.0?
3. How do I 'install' the compiled pc-ble-driver so that the nrfutil python installation can correctly and properly find my build from sources?
Cheers
RMV