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

Bluetooth NUS shell transport: Error on execution of 'bt_nus_shell.py' test script

Hi,

I followed the instructions to test Bluetooth NUS shell transport sample from nRF Connect SDK v1.5.0-rc1.

After installation of the dependent script packages using 'pip' (in nRF Connect SDK v1.5.0-rc1 BASH), the execution of
test script 'bt_nus_shell.py' throws following error:

-----------------------------------------------------------------
Sanjiv Navghare@DESKTOP-3BD5AV1 MINGW64 /c/Sanju/swpath/ncs/v1.5.0-rc1/nrf/scripts/shell ((v1.5.0-rc1))
$ python bt_nus_shell.py --name BT_NUS_shell --com COM5 --family NRF52833 --snr 685782019
Traceback (most recent call last):
File "bt_nus_shell.py", line 17, in <module>
from nordicsemi.dfu.dfu_transport_ble import DFUAdapter
File "C:\Users\Sanju\AppData\Roaming\Python\Python38\site-packages\nordicsemi\dfu\dfu_transport_ble.py", line 43, in <module>
import Queue
ModuleNotFoundError: No module named 'Queue'
-----------------------------------------------------------------

So clearly the 'dfu_transport_ble.py' doesn't seem to be compatible with Python v3.


FYI, the nRF Connect SDK v1.5.0-rc1 BASH uses 'Python v3.8.2' and 'pip3 v21.0.1' and following are the versions of the installed dependent packages/scripts:
- pc-ble-driver-py-0.15.0
- nrfutil-5.0.0

Before going for test, the aforementioned script dependencies were installed with nRF Connect (v1.5.0-rc1) BASH as follows:
$ pip install --user -r scripts/shell/requirements.txt

The 'requirements.txt' did have restriction for 'nrfutil' version (i.e. nrfutil>=6.0.0) but as its installation resulted in the following error, and as described in "fixing-conflicting-dependencies" (pip.pypa.io), had to remove the version specifier for 'nrfutil', in 'requirements.txt' file, to let pip automatically find and install a version of 'nrfutil': 

--------------------------------------------------------------------------------------------------------------
ERROR: Cannot install -r scripts/shell/requirements.txt (line 2) because these package versions have conflicting dependencies.

The conflict is caused by:
nrfutil 6.1.0 depends on antlib>=1.1b0
nrfutil 6.0.1 depends on antlib>=1.1b0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit pip.pypa.io/.../
--------------------------------------------------------------------------------------------------------------

Please advice how to go about testing Bluetooth NUS Shell Transport with nRF Connect (v1.5.0-rc1) BASH (on Windows 10 system.)

Regards,

Sanju

Parents
  • Hi Sanjiv, 
    I would suggest to focus on install in nrfutil , either v6.0 or v6.1 

    Could you try to uninstall nrfutil using pip and then run the install -r requirement again ? 
    After you have nrfutil running you shouldn't have any problem with the dfu library. dfu_transport_ble.py should be able to run with Python 3. 
    I just tested here and can run the shell with no problem. 

Reply
  • Hi Sanjiv, 
    I would suggest to focus on install in nrfutil , either v6.0 or v6.1 

    Could you try to uninstall nrfutil using pip and then run the install -r requirement again ? 
    After you have nrfutil running you shouldn't have any problem with the dfu library. dfu_transport_ble.py should be able to run with Python 3. 
    I just tested here and can run the shell with no problem. 

Children
Related