how can i watch digital tv with a sdrplay rsp1?

792 views
Skip to first unread message

Brutal Killer

unread,
May 25, 2022, 8:35:26 PM5/25/22
to SdrGlut Users
hello, what is the software to watch digital tv with sdrplay

Dale Ranta

unread,
May 26, 2022, 9:49:25 AM5/26/22
to SdrGlut Users
Lets start with the simplest option -

The two programs that you need are VLC and gnuradio.

Once you have them installed, you can download the .grc file -


it sometimes adds a .txt to the name - delete the ".txt"  so it is called "SdrplayTV39TS.grc"

then you run -

gnuradio-companion

open the .grc file and run - two windows should open showing the processed data.

(If nothing shows in the windows, you need to try another channel.)

you then start up VLC -

/Applications/VLC.app/Contents/MacOS/VLC -v udp://@:1234

and it should show one of the programs on the channel.


To change channels you enable the "freq" variable for the channel you want to view.

The "freq" is the center frequency of the channel.

The .grc has the frequencies for my local channels. You can use SdrGlut to search for channels.

Most channels are between 470 MHZ and 610 MHZ. 

Once you get this going, we can go on to more advanced options.

Arkadiusz Kozioł

unread,
Nov 9, 2022, 2:45:57 AM11/9/22
to SdrGlut Users
I have a rsp1a receiver and I don't know if this could be the reason why your way doesn't work, but the autogenerated osmo_nfm.py in line 173 has an error self.osmosdr_source_0 = osmosdr.source(
IndexError: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0
Am I doing something wrong? I just changed the frequency I want to receive and click execute. I am doing this on Linux with gnuradio 3.10.4 and python 3.10

Dale Ranta

unread,
Nov 9, 2022, 10:24:02 AM11/9/22
to SdrGlut Users
I suspect that you have not installed "SDRplay_RSP_API-Linux-3.07.1.run" you can get it from -


You can test things with the command -

SoapySDRUtil --find

SoapySDRUtil --info






Arkadiusz Kozioł

unread,
Nov 9, 2022, 2:24:09 PM11/9/22
to sdrglu...@googlegroups.com

I have libsdrplay version 3.0.7 and soapysdrplay installed from git, now gnuradio says there is no gnuradio.blocks.udp_sink

W dniu 9.11.2022 o 16:24, Dale Ranta pisze:
--
You received this message because you are subscribed to a topic in the Google Groups "SdrGlut Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sdrglut-users/IyxPXZXFpRk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sdrglut-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sdrglut-users/9b390647-f48f-4d18-baec-2303bad57430n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dale Ranta

unread,
Nov 9, 2022, 10:37:33 PM11/9/22
to SdrGlut Users
That is one of the dumb things about gnuradio - some versions require the udp stuff even if you do not want to use it, but it is normally include in the install. 
What version of Linux are you using and How did you do the install ? gnuradio 3.10.4 and python 3.10 work Ok on my MacBook M1 using Brew, but last time I tried I could not get them to work on Ubuntu. The .grc file that I posted works with several version of gnuradio, but some older .grc files do not work with gnuradio 3.10.4  - they get strange errors.
I did the default install of grnradio on Ubuntu 22.04 and everything works Ok with that.

 Doing a

sudo find / -name "*upd_sink*"

Should find the file "blocks_udp_sink.block.yml".

Arkadiusz Kozioł

unread,
Nov 10, 2022, 2:09:08 AM11/10/22
to sdrglu...@googlegroups.com

I solved the problem with the lack of udp_sink by reinstalling gnuradio. I am using archlinux.
Now, however, I have encountered a different problem. Due to the fact that it is not rspdx or rspduo I have no antenna selection. I receive an error:
[ERROR] error in activateStream() - Init() failed: sdrplay_api_Fail
It doesn't matter if the ant0 in the osmosdr_source_0 block if I remember the name correctly is set to Antenna A, to RX or to 0 and even if it is empty. I tried to find the name of the antenna in the rsptcp server, but for rsp1a there is simply no information about it. SoapySDRUtil --probe=sdrplay only shows the RX Antenna, but I still can't initiate the stream. Gqrs works perfectly with Soapysdrplay


W dniu 10.11.2022 o 04:37, Dale Ranta pisze:

Dale Ranta

unread,
Nov 10, 2022, 10:38:43 AM11/10/22
to SdrGlut Users


It is likely that you have two version of soapy installed -
see if -

sudo find / -name "*modules0*"

finds more that one occurrence. 

If that is the case,  setting SOAPY_SDR_ROOT environment variable before running gnuradio-companion could help -

setenv SOAPY_SDR_ROOT /usr/local

gnuradio-companion

(this is for tcsh or use the bash version to set SOAPY_SDR_ROOT).

In my version of gnuradio 3.10.4 there is a "soapy sink" that I use instead of osmosdr.

There is also a gr-soapy that can be used - if you can get it to install.

Since you reinstalled gnuradio, You may need to reinstall "SDRplay_RSP_API-Linux-3.07.1.run"

Arkadiusz Kozioł

unread,
Nov 10, 2022, 11:45:16 AM11/10/22
to sdrglu...@googlegroups.com

In the default arch distribution and in gnuradio-git I don't have udp_sink, I installed 3.9.8 and it works, but after activating the block using the .ts file, which I guess was supposed to save the stream there after setting on the frequency of the dvb-t2 transmitter, the file remains empty even after the stream ends, and udp_sink doesn't transmit anything, vlc says the playlist is empty, and the nc -l -u -p 1234 command remains empty, as if no stream is transmitted. Oh, and I had to change soapysdr_sink to sdrplay3_rsp1a, I have gr-sdrplay3 installed hence https://github.com/fventuri/gr-sdrplay3
Only then does anything seem to be receiving, or at least it doesn't throw an error about no soap devices or inability to initialize sdrplay_api
W dniu 10.11.2022 o 16:38, Dale Ranta pisze:

Dale Ranta

unread,
Nov 10, 2022, 12:27:53 PM11/10/22
to SdrGlut Users
After you issue the command -

/VLC -v udp://@:1234


vlc should come up with a screen like attached png file - vlc is waiting for udp to connect.


Attach the grc file that you are using - so I can see where you are at.






VLC.png

Arkadiusz Kozioł

unread,
Nov 10, 2022, 12:32:49 PM11/10/22
to SdrGlut Users
It is possible that I am using the wrong .grc file, I need anything that is received by Emitel in Poland, and in the example files germany1.grc are there are many more blocks, only that after adding sdrplay3_rsp1a throws errors, none of the blocks have output or input.
I reverted to gnuradio 3.10.4 and again I don't have udp_sink, but it doesn't matter, I'll recompile 3.9.8 for myself if I just know what's wrong that it's not working for me.
SdrplayTV39TS2.grc

Dale Ranta

unread,
Nov 10, 2022, 2:58:33 PM11/10/22
to SdrGlut Users
On Ubuntu  22.04 and gnuradio 3.10.1 udp_sink is there, but it has been renamed it is under "Networking Tools" -> "UDP Sink"
So - delete the udp_sink in the .grc and add the one from Networking Tools.

Arkadiusz Kozioł

unread,
Nov 10, 2022, 7:47:04 PM11/10/22
to SdrGlut Users
This is impossible with a screen reader, which I have to use because the gnuradio interface is not very accessible.

Dale Ranta

unread,
Nov 10, 2022, 9:47:20 PM11/10/22
to SdrGlut Users
What do you mean by a screen reader ?

What do you mean by the gnuradio interface is not very accessible ? 

If gqrx works Ok, then gnuradio-companion should work also - gqrx uses the gnuradio routines.

Are you running X-windows ? I had trouble on one system where I had to install a version of x-windows to get things going ?
 

Dale Ranta

unread,
Nov 10, 2022, 10:05:27 PM11/10/22
to SdrGlut Users
On most systems, Gnuradio opens a nearly full screen window that looks some thing like the attached png file.
This is from the macOS and its screen dump routines does not capture all of the colors - It actually looks much better than the png.

Gnuradio.png

Dale Ranta

unread,
Nov 11, 2022, 12:56:20 PM11/11/22
to SdrGlut Users
The only thing that it seems that may be causing you problems is the the screen size.
If it is too small, you stuck with it.
If screen is large and the gnuradio window is tiny - cut the screen resolution back to HD - 1920x1080.

Arkadiusz Kozioł

unread,
Nov 12, 2022, 6:47:42 AM11/12/22
to SdrGlut Users
I am a blind person, orca is a screen reader so I can use Linux.
But this file is probably wrong anyway, I need to decode hefc h265 dvb-t2 or h264 for dvb-t
I added network_udp_sink but now the size I think the network or something does not agree with what any block gives. I don't know, unfortunately I'm not familiar with it and due to the fact that I can't click a lot of things for myself I'm not likely to be able to do it.

Dale Ranta

unread,
Nov 12, 2022, 11:00:14 AM11/12/22
to SdrGlut Users
I tried orca with gnuradio-companion - gnurado-companion is not usable with orca - the graphical elements do not identify them selfs and only 1/3 of the elements in dialogs are active.

I tried VLC - it was actually usable with orca.

There are a lot of people working on gnuadio and they keep making major changes - you should post a request to make it compatible with orca.

Arkadiusz Kozioł

unread,
Nov 13, 2022, 12:56:48 PM11/13/22
to SdrGlut Users
It's not important now, the .ts file doesn't save for me either, which means the problem is somewhere deeper. In Poland there is no atsc as far as I know, in the file germany_g1.grc if I remember the name correctly there are definitely more blocks from decoding, only I can't get sdrplay to work with it, because simply neither dvb-t nor dvb-t2 works despite the close proximity to the transmitters that is 4 km

Dale Ranta

unread,
Nov 13, 2022, 3:34:26 PM11/13/22
to SdrGlut Users
As far a I can tell there is only one example of receiving dvb-t and that is the file "dvbt_rx_8k.grc"
I tried it with the test file and it worked. It has the use of a UDP SDR deactivated, but it could switch to use the sdrplay instead - Is that what you tried ?

Arkadiusz Kozioł

unread,
Nov 14, 2022, 2:05:52 AM11/14/22
to SdrGlut Users
So even though the signal source should come in from sdrplay I still need a test file?

Dale Ranta

unread,
Nov 14, 2022, 10:24:02 AM11/14/22
to SdrGlut Users
I down loaded the the example file from -


and I ran the example "dvbt_rx_8k.grc" to generate the .ts file "advdvbt.ts"

I then opened the ts file "advdvbt.ts" with VLC and it played Ok.

You should do the same thing to make sure that it all works on your system.


Then, you will need to Disable The "File Source" and "Throttle" 

(At that point you no longer need the example file) 

and add a "source" for the sdrplay copying the parameters from the disabled "USRP Source"

If you run it with the frequency of a near by station it should generate the advdvbt.ts file.

You can add a UDP sink to send the output directly to VLC.


Arkadiusz Kozioł

unread,
Nov 14, 2022, 3:20:35 PM11/14/22
to SdrGlut Users
I threw out the file_source and the other one you wrote earlier, for a while something happens, while due to lack of eyesight I can't even see on the graph if anything at all any signal detects, while after a while everything crashes anyway, and of course the .ts file remains empty. I'm attaching the error logs and the .grc file I've redone

buffer_double_mapped :warning: allocate_buffer: tried to allocate   10 items of size 6048. Due to alignment requirements   128 were allocated.  If this isn't OK, consider padding   your structure to a power-of-two bytes.   On this platform, our allocation granularity is 4096 bytes.
buffer_double_mapped :warning: allocate_buffer: tried to allocate   43 items of size 1504. Due to alignment requirements   128 were allocated.  If this isn't OK, consider padding   your structure to a power-of-two bytes.   On this platform, our allocation granularity is 4096 bytes.
buffer_double_mapped :warning: allocate_buffer: tried to allocate   4 items of size 48384. Due to alignment requirements   16 were allocated.  If this isn't OK, consider padding   your structure to a power-of-two bytes.   On this platform
, our allocation granularity is 4096 bytes.
buffer_double_mapped :warning: allocate_buffer: tried to allocate   10 items of size 6048. Due to alignment requirements   128 were allocated.  If this isn't OK, consider padding   your structure to a power-of-two bytes.   On this platform, our allocation granularity is 4096 bytes.
buffer_double_mapped :warning: allocate_buffer: tried to allocate   40 items of size 1632. Due to alignment requirements   128 were allocated.  If this isn't OK, consider padding   your structure to a power-of-two bytes.   On this platform, our allocation granularity is 4096 bytes.
buffer_double_mapped :warning: allocate_buffer: tried to allocate   10 items of size 6048. Due to alignment requirements   128 were allocated.  If this isn't OK, consider padding   your structure to a power-of-two bytes.   On this platform, our allocation granularity is 4096 bytes.
/usr/include/c++/12.2.0/bits/stl_vector.h:1123: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = void*; _Alloc = std::allocator<void*>; reference = void*&; size_type = long unsigned int]: Ass
ertion '__n < this->size()' failed.
sigsegv
dvbt_rx_8k.grc

Dale Ranta

unread,
Nov 14, 2022, 10:40:00 PM11/14/22
to SdrGlut Users
Your .grc file looks good. I ,also, get all of the buffer_double_mapped warnings and they do not seem to hurt anything.
It is crashing on a memory allocation - At one of the websites it says that on some linux versions you need to up the
memory allocated to the kernel - I cannot find the site again, I remember that they upped to something between 1 and 2 GB.
You can do it with a command line command, but I do not remember what the command is. I look some more maybe I can 
find it again.

Arkadiusz Kozioł

unread,
Nov 15, 2022, 2:37:54 AM11/15/22
to SdrGlut Users
It can't be the shared memory's fault, because it's so big that I can't even name such a number of bytes that are allocated to the kernel.shmall and kernel.shmmax parameter
It is 18446744073692774399 bytes for kernel.shmmax and kernel.shmall

Dale Ranta

unread,
Nov 15, 2022, 9:37:11 AM11/15/22
to SdrGlut Users
That takes care of the kernel memory problem - how much memory does you system have ?
Perhaps, you are actually running out of memory - some systems reserve quite a bit 
that applications cannot use. 

Did the test example work ? - that would rule out a lot of problems.

 I just checked - my system is using 9 GB while running the modified version of dvbt_rx_8k.grc.

Arkadiusz Kozioł

unread,
Nov 15, 2022, 9:39:19 AM11/15/22
to SdrGlut Users
I have 16 giga of ram and at all the used ram memory does not increase after running the .grc file, I mean after clicking execute in gnuradio.
The .cfile test file also failed to decode correctly into a .ts file, also sigsegv

Dale Ranta

unread,
Nov 15, 2022, 11:22:41 AM11/15/22
to SdrGlut Users
When I get to the point that you are at and still want to move forward, I wipe my hard drive and reinstall the system and gnuradio. 
If that fails, I switch systems - that is how I ended up using uBuntu 22.04. If that fails and I am still interested, I wait for a new version.
Reply all
Reply to author
Forward
0 new messages