Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module sdrplay3 not found #17

Closed
edgomezg opened this issue Nov 16, 2021 · 4 comments
Closed

Module sdrplay3 not found #17

edgomezg opened this issue Nov 16, 2021 · 4 comments
Assignees

Comments

@edgomezg
Copy link

Hi everyone,
I've already installed gr-sdrplay3 and the API without any problem. However, when trying to execute gr-sdrplay3/examples/FM-Receiver-SDRplay with an RSPduo I get a ModuleNotFoundError: No module named 'sdrplay3'.
I'm using Ubuntu20.04 & GNURadio 3.9.3.

Can anyone help me with this?

The gnuradio console response:

Generating: '/home/user/Dev/gr-sdrplay3/examples/top_block.py'

Executing: /usr/bin/python3 -u /home/user/Dev/gr-sdrplay3/examples/top_block.py

Traceback (most recent call last):
  File "/home/user/Dev/gr-sdrplay3/examples/top_block.py", line 38, in <module>
    import sdrplay3
ModuleNotFoundError: No module named 'sdrplay3'

@fventuri fventuri self-assigned this Nov 17, 2021
@fventuri
Copy link
Owner

The first thing I would try is just:

sudo ldconfig

since on some Linux distributions the ld cache needs to be refreshed when a new shared library is installed.

If that doesn't help, please try to run this simple Python script:

#!/usr/bin/env python3
import sys
print(sys.path)

it should print a list of directories (your Python 'path'); please go through them and make sure one of them contains a directory called sdrplay3 (in my case, on Fedora 35, the directory is /usr/local/lib64/python3.10/site-packages, but yours on Ubuntu 20.04 will likely be different).

If you do find that sdrplay3 directory in your Python path, please make sure it contains a shared library called sdrplay3_python.cpython-310-x86_64-linux-gnu.so (or something very similar, depending on the exact version of Python you are running there).

Finally, run the command ldd -r on that shared library; in my case here the full command would be:

ldd -r /usr/local/lib64/python3.10/site-packages/sdrplay3/sdrplay3_python.cpython-310-x86_64-linux-gnu.so

(but yours is going to be slightly different), and make sure it doesn't show any dependent library as 'not found' or other messages about 'undefined symbol'.

Hope this helps,
Franco

@edgomezg
Copy link
Author

edgomezg commented Dec 2, 2021

Solved, thank you!

Now, I'm having another issue when trying to use my RSPDuo.

When I first connect it I can find it by typyng lsusb as:
Bus 001 Device 008: ID 1df7:3020

However, when executing a flowgraph in gnuradio, my devide suddenly gets disconected and I receive this error:

gr::log :ERROR: rspduo0 - SDRplay device not found: 
Traceback (most recent call last):
  File "/home/radio/Dev/gr-radio_astro/examples/DSPIRA/DSPIRA_Spectrometer.py", line 754, in <module>
    main()
  File "/home/radio/Dev/gr-radio_astro/examples/DSPIRA/DSPIRA_Spectrometer.py", line 732, in main
    tb = top_block_cls()
  File "/home/radio/Dev/gr-radio_astro/examples/DSPIRA/DSPIRA_Spectrometer.py", line 236, in __init__
    self.sdrplay3_rspduo_1 = sdrplay3.rspduo(
RuntimeError: sdrplay device not found or invalid mode/antenna selection

And after that, lsusb doesn't find the devide.

I would appreciate your help, thank you so much

@fventuri
Copy link
Owner

fventuri commented Dec 3, 2021

@gom-4 This is very strange; I've seen a few cases where the service sdrplay_api crashes, but I've never seen a case where the USB device disappears altogether like you have.

I would like to see if there's any error message from the SDRplay API in the logs.
These are the steps to look for possible error messages:

  • in the RSPduo block in GRC, under 'Properties -> Other Options', enable the property called SDRplay API debug mode (DEBUG)
  • save and run the GRC flowgraph until it gives you that error
  • run these commands to search for messages from the service sdrplay_apiService in the logs:
grep sdrplay_ /var/log/messages
journalctl -b | grep sdrplay_

I hope that the messages in those logs will give us a better idea of the reason for this problem.

Franco

@edgomezg
Copy link
Author

edgomezg commented Dec 8, 2021

Hi Franco,

The problem was caused by my virtual machine USB configuration. Finally managed to solve it changing the controller.

Thank you for your help and congratulations on your great work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants