SDRPlay Independent Community Forum › Forums › General › How to use my RSPduo w/ Rpi-3 & command line?
Tagged: sdrTest
- This topic has 34 replies, 3 voices, and was last updated by .
-
AuthorPosts
-
February 2, 2021 at 6:36 pm #1671alanmalkParticipant
Just asking for some general pointers:
I have a RSPduo that works well on Mac OS and CubicSDR. I would like to use it with my Raspberry Pi 3 python-based application to receive commercial FM broadcast radio. For that I would need to be able to control the RSPduo through a command line. Currently I am using an inexpensive dongle and rtl_fm piped to ‘play’ or ‘aplay’, but the audio and sensitivity leave much to be desired. So far everything I have looked at wants to start a GUI. My last attempt was gnuradio, and I have tried others over the past weeks.A suggestion or two would be most appreciated be it just a name or a pointer. Thanks!
February 14, 2021 at 3:05 pm #1693AnonymousSdrTest can drive the RSPduo and it can be controlled by the control utility. Any program can use the control utility by piping it commands to control the RSPduo. Here is a video showing the usage –
SdrTest being remotely controlled by the control utility.
February 15, 2021 at 4:51 pm #1696alanmalkParticipantFirst – a hearty thank you for all the work you have done with regards to the SDR universe.
I – apparently successfully – installed rtAudio, SdrGlut, sdrTest.
Unfortunately, running the following command (via SSH) gives me an error:
%./sdrTest -fc 1e6 -f 0.76e6 -am -gain 1
Detached kernel driver
Found Rafael Micro R820T tuner
Reattached kernel driver
[INFO] [UHD] linux; GNU C++ version 8.2.0; Boost_106700; UHD_3.13.1.0-3
Number of Devices Found: 2
SDR device = 0 label = PulseAudio
SDR device = 1 label = Generic RTL2832U OEM :: 00000001device = 0 selected
default_input = True default_output = True device_id = 0 driver = audio label = PulseAudiodriver = Audio
hardware = Audio
device_id = 0 origin = https://github.com/pothosware/SoapyAudioRx antennas:
RXSetting Info:
Segmentation fault
It appears sdrTest is finding and trying to use my inexpensive dongle: Bus 001 Device 005: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
My SdrPlay RSPduo is attached – (from lsusb) : Bus 001 Device 004: ID 1df7:3020
but I have no way of specifying that sdrTest is to use it.
The dongle is somewhat difficult to remove since it is inside my pi radio box, whereas the RSPduo is external.Any possibility of a workaround that will allow me to leave the dongle attached?
Thank you!
February 15, 2021 at 9:27 pm #1697AnonymousIf you look at the output your Generic RTL2832U is device 1 – so you need to specify that on the command line –
./sdrTest -fc 1e6 -f 0.76e6 -am -gain 1 -device 1
February 15, 2021 at 9:38 pm #1698AnonymousFor FM you need –
./sdrTest -fc 101.1e6 -f 101.5e6 -fm -gain 1 -device 1
For nbfm –
./sdrTest -fc 162.0e6 -f 162.4e6 -nbfm -gain 1 -device 1
For AM you need –
./sdrTest -fc 1e6 -f 0.76e6 -gain 1 -device 1 -set direct_samp 2
February 15, 2021 at 9:52 pm #1699AnonymousThe above should make the RTL stick work.
Best guess, you have two version of soapy installed. Uninstall one of them –
sudo apt-get remove libsoapysdr0.6
sudo apt-get remove libsoapysdr-devand rebuild sdrglut, sdrTest – That should get the SdrPlay RSPduo going.
February 15, 2021 at 9:59 pm #1700alanmalkParticipantYet again – I am grateful that you are able to provide me with support.
No luck yet with finding the correct device.
Perhaps there are some clues in the following:
<My comment on the following command: It seems my RSPduo is available.>
pi@macpi:~ $ SoapySDRUtil –probe=’\”driver=sdrplay’
######################################################
## Soapy SDR — the SDR abstraction library ##
######################################################Probe device \driver=sdrplay
[INFO] devIdx: 0
[INFO] hwVer: 3
[INFO] rspDuoMode: 1
[INFO] tuner: 1
[INFO] rspDuoSampleFreq: 0.000000—————————————————-
— Device identification
—————————————————-
driver=SDRplay
hardware=1806037A32 – Single Tuner
sdrplay_api_api_version=3.070000
sdrplay_api_hw_version=3
————– remainder truncated ———<My comment on the following command: I am certain the RSPduo is device 006>
pi@macpi:~ $ lsusb
Bus 001 Device 005: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 001 Device 006: ID 1df7:3020
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<My comment on the following command: Using “-device 6” looks quite odd to me. I don’t want to use the dongle.>
pi@macpi:~ $ ./Downloads/SdrGlut/sdrTest/sdrTest -fc 1e6 -f 0.76e6 -am -gain 1 -device 6
Detached kernel driver
Found Rafael Micro R820T tuner
Reattached kernel driver
[INFO] [UHD] linux; GNU C++ version 8.2.0; Boost_106700; UHD_3.13.1.0-3
Number of Devices Found: 2
SDR device = 0 label = PulseAudio
SDR device = 1 label = Generic RTL2832U OEM :: 00000001Error Opening SDR
<My comment on the command(s) below: Getting nothing for 1-1.6 is very worrisome. Tried 1-1.3 for proof that something was logged – but both device 4 & 6??!.>
pi@macpi:~ $ dmesg | grep 1-1.6
pi@macpi:~ $ dmesg | grep 1-1.3
[ 4.194408] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
[ 4.325106] usb 1-1.3: New USB device found, idVendor=1df7, idProduct=3020, bcdDevice= 2.00
[ 4.325133] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 472.000252] usb 1-1.3: USB disconnect, device number 4
[ 472.309740] usb 1-1.3: new high-speed USB device number 6 using dwc_otg
[ 472.440220] usb 1-1.3: New USB device found, idVendor=1df7, idProduct=3020, bcdDevice= 2.08
[ 472.440233] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=1
[ 472.440241] usb 1-1.3: SerialNumber: 1806037A32
pi@macpi:~ $Does anything stand out as “user error” to you?
February 15, 2021 at 10:08 pm #1701alanmalkParticipantJust saw your suggestion to rebuild. I’ll do that asap.
February 15, 2021 at 10:14 pm #1702AnonymousFirst of all
./Downloads/SdrGlut/sdrTest/sdrTest -fc 1e6 -f 0.76e6 -am -gain 1 -device 1 -set direct_samp 2
should be to get the RTL-STICK going.
Lets see the output of
SoapySDRUtil –info
that should tell where the RSPduo is.
February 15, 2021 at 11:15 pm #1703alanmalkParticipantRebuilt SdrGlut, sdrTest and for good measure, rtaudio.
Ran the requested –info. Also ran –find for additional details.
pi@macpi:~ $ SoapySDRUtil –info
######################################################
## Soapy SDR — the SDR abstraction library ##
######################################################Lib Version: v0.8.0-g351896d3
API Version: v0.8.0
ABI Version: v0.8
Install root: /usr/local
Search path: /usr/local/lib/SoapySDR/modules0.8
Module found: /usr/local/lib/SoapySDR/modules0.8/libsdrPlaySupport.so (0.3.0-208f95d)
Available factories… sdrplay
Available converters…
– CF32 -> [CF32, CS16, CS8, CU16, CU8]
– CS16 -> [CF32, CS16, CS8, CU16, CU8]
– CS32 -> [CS32]
– CS8 -> [CF32, CS16, CS8, CU16, CU8]
– CU16 -> [CF32, CS16, CS8]
– CU8 -> [CF32, CS16, CS8]
– F32 -> [F32, S16, S8, U16, U8]
– S16 -> [F32, S16, S8, U16, U8]
– S32 -> [S32]
– S8 -> [F32, S16, S8, U16, U8]
– U16 -> [F32, S16, S8]
– U8 -> [F32, S16, S8]pi@macpi:~ $ SoapySDRUtil –find
######################################################
## Soapy SDR — the SDR abstraction library ##
######################################################Found device 0
driver = sdrplay
label = SDRplay Dev0 RSPduo 1806037A32 – Single Tuner
rspduo_mode = 1Found device 1
driver = sdrplay
label = SDRplay Dev1 RSPduo 1806037A32 – Dual Tuner
rspduo_mode = 2Found device 2
driver = sdrplay
label = SDRplay Dev2 RSPduo 1806037A32 – Master
rspduo_mode = 4Found device 3
driver = sdrplay
label = SDRplay Dev3 RSPduo 1806037A32 – Master (RSPduo sample rate=8Mhz)
rspduo_mode = 4
rspduo_sample_freq = 8February 15, 2021 at 11:18 pm #1704alanmalkParticipantBut no joy with everything rebuilt…
pi@macpi:~/Downloads/SdrGlut/sdrTest $ ./sdrTest -fc 1e6 -f 0.76e6 -am -gain 1 -device 1 -set direct_samp 2
Detached kernel driver
Found Rafael Micro R820T tuner
Reattached kernel driver
[INFO] [UHD] linux; GNU C++ version 8.2.0; Boost_106700; UHD_3.13.1.0-3
Number of Devices Found: 2
SDR device = 0 label = PulseAudio
SDR device = 1 label = Generic RTL2832U OEM :: 00000001device = 1 selected
available = Yes driver = rtlsdr label = Generic RTL2832U OEM :: 00000001 manufacturer = Realtek product = RTL2838UHIDIR rtl = 0 serial = 00000001 tuner = Rafael Micro R820TDetached kernel driver
Found Rafael Micro R820T tuner
driver = RTLSDR
hardware = RTLSDR
origin = https://github.com/pothosware/SoapyRTLSDR rtl = 0Rx antennas:
RXSetting Info:
setcount 1
direct_samp 2
Segmentation faultFebruary 16, 2021 at 3:02 am #1705AnonymousIt looks like the old soapysdr is still around.
Did you do the ? –
sudo apt-get remove libsoapysdr0.6
sudo apt-get remove libsoapysdr-devWhat does –
sudo find / -name “*rtlsdrSupport*”
find.
February 16, 2021 at 4:47 am #1706alanmalkParticipantI did sudo apt-get remove libsoapysdr0.6 first.
Then did an install “sudo apt-get- install
libsoapysdr-dev” expecting to see “libsoapysdr-dev is already the newest version (0.6.1-4+b4).”, but it in fact did an install.
So that tells me only one version of soapysdr was around at the beginning of my efforts.pi@macpi:~ $ sudo find / -name “*rtlsdrSupport*”
/usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.6/librtlsdrSupport.soHmmm, should this have been removed?
This is wierd…
Ran “sudo apt-get remove libsoapysdr0.6” again (just now). Then
Ran sudo find / -name “*rtlsdrSupport*” again. But this time – nothing found!I’m about burnt out for the day. Will try again tomorrow. Meanwhile, please accept my thanks for all your efforts.
Something-somehow is installing libsoapysdr0.6 !!!
As I mentioned, earlier today I rebuilt SdrGlut, sdrTest and rtaudio. Could one of these be installing libsoapysdr0.6? Logic says no, but I didn’t install anything else today.February 16, 2021 at 4:55 am #1707alanmalkParticipantWell, as fried as my brain is now, I couldn’t resist one more try.
pi@macpi:~ $ ./Downloads/SdrGlut/sdrTest//sdrTest -fc 1e6 -f 0.76e6 -am -gain 1 -device 1 -set direct_samp 2
./Downloads/SdrGlut/sdrTest//sdrTest: error while loading shared libraries: libSoapySDR.so.0.6: cannot open shared object file: No such file or directorySeems I moved from the frying pan into the fire.
Time to run away screaming…
February 16, 2021 at 5:18 am #1708AnonymousThat is what it should do –
./Downloads/SdrGlut/sdrTest//sdrTest: error while loading shared libraries: libSoapySDR.so.0.6: cannot open shared object file: No such file or directory
Now when you rebuild the sdrglut and sdrTest you should get the correct routines from /usr/local/lib.
You can check for the correct routines with a
ldd ./sdrglut.x
ldd ./sdrTest
It should have a –
/usr/local/lib/libSoapySDR…
linked to it.
To get the RTL stick going – you will need to download and install –
librtlsdr and SoapyRTLSDR using cmake.
-
AuthorPosts
- You must be logged in to reply to this topic.