SDR help

I'm just getting started with SDR although I bought my RTL-SDR V4 dongle some time ago without knowing how to try it out.

After a recent post I managed to install various pkgs with varying degrees of success with their usage.

The only thing which has proved successful is rtl_fm from comms/rtl-sdr with which I have stumbled upon a frequency where I can actually listen to a radio station.

Can anyone suggest what else I should try? sdrpp says that it failed to detect any supported platform which is strange since rtl_fm uses the same device and works.

I have recently bought a dipole antenna but it doesn't seem to help reception. Maybe it isn't set up correctly.
 
I found comms/gqrx to be very friendly for casual listening, try to make this one work.
you might need to fiddle with File -> IO devices -> Device to locate the intermediary HAL for your particular sdr and also might need to decrease Bandwidth in the same window if your CPU is not great (if you're on an older laptop as I am).
 
I found comms/gqrx to be very friendly for casual listening, try to make this one work.
you might need to fiddle with File -> IO devices -> Device to locate the intermediary HAL for your particular sdr

I 'could not connect to display :0'


and also might need to decrease Bandwidth in the same window if your CPU is not great (if you're on an older laptop as I am).
This is always relative :)

I still think my ThinkPad X1 Carbon Gen 1 is new. It's newer than all the others.
 
I 'could not connect to display :0'

well, it's an xorg application. your shell should have a variable called 'DISPLAY' set when you run under xorg.

~ $ echo $DISPLAY
:0

are you running gqrx as the same user as the one that started X in the first place or did you 'su' to someone else in order to allow access to the usb device nodes? if you did, you have to allow that user to connect to X via xhost, something like

~ $ id
uid=1000 [..]
~ # echo $DISPLAY
:0
~ $ xhost +
access control disabled, clients can connect from any host
~ $ su -
~ # export DISPLAY=':0'
~ # gqrx

but it would be better to change permissions to the usb device via devd rules instead of su/sudo-ing.

I still think my ThinkPad X1 Carbon Gen 1 is new. It's newer than all the others.

X1 Gen3 here. and it's a slug, had to set input rate below 2M even if default was 8M for my HackRFOne sdr, otherwise demodulation becomes very choppy and the resulting audio is almost unintelligible.
 
I tried on a different laptop and got the following output when running gqrx:-


gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.12.0
built-in source types: file rtl rtl_tcp rfspace soapy redpitaya
rx_nb_cc :info: set_min_output_buffer on block 10 to 32768
Resampling audio 96000 -> 48000
PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 (version 1246720)
Number of audio devices: 2
0: /dev/dsp I:8 O:8
1: /dev/dsp0 I:8 O:8
Using default audio device
BandPlanFile is /root/.config/gqrx/bandplan.csv
BookmarksFile is /root/.config/gqrx/bookmarks.csv
ls: -1: No such file or directory
ls: -d: No such file or directory
Found Rafael Micro R828D tuner
RTL-SDR Blog V4 Detected
PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 (version 1246720)
Number of audio devices: 2
0: /dev/dsp I:8 O:8
1: /dev/dsp0 I:8 O:8
Using default audio device
PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 (version 1246720)
Number of audio devices: 2
0: /dev/dsp I:8 O:8
1: /dev/dsp0 I:8 O:8
qt.qpa.theme.gnome: dbus reply error: [ "org.freedesktop.DBus.Error.ServiceUnknown" ] "The name org.freedesktop.portal.Desktop was not provided by any .service files"
qt.qpa.theme.gnome: dbus reply error: [ "org.freedesktop.DBus.Error.ServiceUnknown" ] "The name org.freedesktop.portal.Desktop was not provided by any .service files"
 
and no gqrx window popped up?
did you enable dbus?

# grep dbus /etc/rc.conf
dbus_enable="YES"

also, running xorg or xorg components as root is one of the cardinal sins. again, if you're doing this due to insufficient permissions to reach the usb devices, use devd rules instead as described below.

I'm using the following devd rule to allow any user in the operator group access to the usb device (you'll have to tweak the vendor and product id to match your device):

/usr/local/etc/devd/hackrf_one_sdr.conf
notify 10 {
match "system" "USB";
match "subsystem" "INTERFACE";
match "type" "ATTACH";
match "intclass" "0xff";
match "vendor" "0x1d50";
match "product" "0x6089";
action "chgrp operator /dev/$cdev; chmod 660 /dev/$cdev";
};

if you also have webcamd.conf in the same directory remove it's second rule since it out-matches the sdr rule above - even if it shouldn't. or remove webcamd.conf completely.

restart devd, plug out-in the sdr, as normal user do a lsusb and you should see it. also gqrx executed as a mere mortal should see it.
 
and no gqrx window popped up?

1782581337058.png

did you enable dbus?

I just checked and it isn't. I normally do. Do I need to reboot after adding this?
 
<dbus> I just checked and it isn't. I normally do. Do I need to reboot after adding this?

well, I was asking if the dbus daemon is started on not based on your error. how do you check if a process exists or not? how do you start a service without restarting? google these questions by also adding 'freebsd' to them and follow what the oracle is telling you.

ok, so finally an xorg process has started up. did you set up devd as advised?
what is the output of 'lsusb' run as root and how does it look when run as the non-root user that logged into X? you have to make sure that your non-root user (which is in the operator group) can see the sdr hardware (via lsusb) just like root can.

report back with more details of what you run and what feedback you get, I can't imagine every scenario you can get into.
 
well, I was asking if the dbus daemon is started on not based on your error. how do you check if a process exists or not? how do you start a service without restarting?

I misunderstood something about dbus. I have started it now.


google these questions by also adding 'freebsd' to them and follow what the oracle is telling you.

ok, so finally an xorg process has started up. did you set up devd as advised?
what is the output of 'lsusb' run as root and how does it look when run as the non-root user that logged into X? you have to make sure that your non-root user (which is in the operator group) can see the sdr hardware (via lsusb) just like root can.

report back with more details of what you run and what feedback you get, I can't imagine every scenario you can get into.


My RTL-SDR v4 dongle is detected and I can run rtl_fm and listen to a radio station.

With dbus started I get:-

Code:
W520# gqrx                
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.12.0
built-in source types: file rtl rtl_tcp rfspace soapy redpitaya
rx_nb_cc :info: set_min_output_buffer on block 10 to 32768
Resampling audio 96000 -> 48000
PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 (version 1246720)
Number of audio devices: 2
  0:  /dev/dsp  I:8  O:8
  1:  /dev/dsp0  I:8  O:8
Using default audio device
BandPlanFile is /root/.config/gqrx/bandplan.csv
BookmarksFile is /root/.config/gqrx/bookmarks.csv
ls: -1: No such file or directory
ls: -d: No such file or directory
Found Rafael Micro R828D tuner
RTL-SDR Blog V4 Detected
PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 (version 1246720)
Number of audio devices: 2
  0:  /dev/dsp  I:8  O:8
  1:  /dev/dsp0  I:8  O:8
Using default audio device
PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 (version 1246720)
Number of audio devices: 2
  0:  /dev/dsp  I:8  O:8
  1:  /dev/dsp0  I:8  O:8
qt.qpa.theme.gnome: dbus reply error: [ "org.freedesktop.DBus.Error.ServiceUnknown" ] "The name org.freedesktop.portal.Desktop was not provided by any .service files"
qt.qpa.theme.gnome: dbus reply error: [ "org.freedesktop.DBus.Error.ServiceUnknown" ] "The name org.freedesktop.portal.Desktop was not provided by any .service files"

I have no idea what this means:-

org.freedesktop.DBus.Error.ServiceUnknown
 
I thought we established that we do NOT want to run anything X as root
I been trying for years to crack that nut.
User literally couldn't gives 2 fscks yet asking financial advice about stolen funds.
I try to mentally block it. I though user was a bot but I have discounted that idea.
 
Me and user astyle had a head bump years ago. He sorta accused me of lying about a browser reaching back into ports tree and running Build Components.
I got all huffy and said are you calling me a liar. Pretty crappy words but it was not false.

What I neglected to mention was I was running X11/SeaMonkey as root user and indeed Internet Components can access stuff you never imagined from the ports build directory when running as root.

Totally my fault and I am sorry I did not tell astyle all the facts. But I like to think I have reformed. Learned a valuable lesson.
 
I think one of the best places to learn why X11 root is bad is look at the log on exit on ttyv0.

That was where I learned that build components had been ran from the ports directory. Shown right onscreen. It may sound innocuous but it was the wack I needed.
How could browser reach back to ports? Run it as root. That is how.
And who knows how many other vulnerabilities it causes. That was just one -in your face- example for me. I could not ignore.
Xfe and VLC have built in root restrictions. PulseAudio too.
I don't care for nanny state and guarding but....
You have to know when it is OK to su into root and when it is not.
 
In another thread we were discussing what to do with a scan with rtl-power. It outputs scan results as cvs file. Afterwords I could not find any program to import a cvs.
I will look into gqrx and import bookmarks via cvs file.

CubicSDR seems to create its application settings directory in the wrong place. For xdg spec /user/.config/CubicSDR should be the location. Instead it resides at /user/.CubicSDR
 
In another thread we were discussing what to do with a scan with rtl-power. It outputs scan results as cvs file. Afterwords I could not find any program to import a cvs.
I will look into gqrx and import bookmarks via cvs file.

I'm not familiar with rtl-power. if you send a snippet of it's csv output we might be able to create an awk oneliner to convert it to the gqrx csv format.

CubicSDR seems to create its application settings directory in the wrong place. For xdg spec /user/.config/CubicSDR should be the location. Instead it resides at /user/.CubicSDR
you could open a PR on the upsteam project if you feel like it, the application could check both places and this won't break compatibility with older installs.
 
I have never run PulseAudio.

What does it give me?
Going a bit off topic briefly. Ubuntu adopted PA back around 2010 which broke all of my audio apps because they could no longer directly access the audio hardware. All apps had to link to the PA library and share the hardware through the PA daemon. FreeBSD's OSS style sound API did not have this problem. I could have accepted adopting PA were it not for the less than permissive license. PA is LGPL which I personally did not want for my projects.

In short, PA does offer some tools for mixing audio from different apps. It might make managing ports that have come to depend upon PA - a bit easier. Beyond that, I see no advantage on FreeBSD.
 
Back
Top