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. 

  • I did uninstall nrfutil from 'nRF Connect SDK v1.5.0-rc1' BASH (Windows 10) and then tried to install nrfutil v6.1.0/ v6.0.1.again. But in either case, the installation fails with the following error:

    -------------------------------------------------------------------------------------------
    Collecting antlib>=1.1b0
    Using cached antlib-1.1b0.post0-py2.py3-none-any.whl (283 kB)
    WARNING: Discarding files.pythonhosted.org/.../antlib-1.1b0.post0-py2.py3-none-any.whl (from pypi.org/.../). Requested antlib>=1.1b0 from files.pythonhosted.org/.../antlib-1.1b0.post0-py2.py3-none-any.whl has inconsistent version: filename has '1.1b0.post0', but metadata has '1.1b0'
    ERROR: Could not find a version that satisfies the requirement antlib>=1.1b0 (from nrfutil)
    ERROR: No matching distribution found for antlib>=1.1b0
    -------------------------------------------------------------------------------------------

    FYI, I used 'nRF Connect SDK v1.5.0-rc1' BASH (on Windows10.) The said BASH uses "Python 3.8.2" and "pip 21.0.1"
    For details, please refer the screenshots, of nrfutil v6.1.0 and v6.0.1 installation, attached herewith.


    Please advise how to resolve the said issue!

    .nrfutil v6.1.0 installationnrfutil v6.0.1 installation

Reply
  • I did uninstall nrfutil from 'nRF Connect SDK v1.5.0-rc1' BASH (Windows 10) and then tried to install nrfutil v6.1.0/ v6.0.1.again. But in either case, the installation fails with the following error:

    -------------------------------------------------------------------------------------------
    Collecting antlib>=1.1b0
    Using cached antlib-1.1b0.post0-py2.py3-none-any.whl (283 kB)
    WARNING: Discarding files.pythonhosted.org/.../antlib-1.1b0.post0-py2.py3-none-any.whl (from pypi.org/.../). Requested antlib>=1.1b0 from files.pythonhosted.org/.../antlib-1.1b0.post0-py2.py3-none-any.whl has inconsistent version: filename has '1.1b0.post0', but metadata has '1.1b0'
    ERROR: Could not find a version that satisfies the requirement antlib>=1.1b0 (from nrfutil)
    ERROR: No matching distribution found for antlib>=1.1b0
    -------------------------------------------------------------------------------------------

    FYI, I used 'nRF Connect SDK v1.5.0-rc1' BASH (on Windows10.) The said BASH uses "Python 3.8.2" and "pip 21.0.1"
    For details, please refer the screenshots, of nrfutil v6.1.0 and v6.0.1 installation, attached herewith.


    Please advise how to resolve the said issue!

    .nrfutil v6.1.0 installationnrfutil v6.0.1 installation

Children
Related