dvbs-s2 using software defined radio

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
701
Reaction score
422
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
Today I managed to suiccessfully receive the complete 11480H mux at 5.0W without a receiver and
without a satellite card. Well, the latter is not strictly trough, because I needed it to fake some missing hardware. Read on....

The hardware setup is as follows:
  1. I use a software defined radio called USRP B200. Given that this particular mux has a relatively low bandwidth, something cheaper like hackrf or rtlsdr would also work.
  2. Because the usrp cannot power the lnb and because it cannot cope with the DC voltage on the line, I use a splitter and a DC blocker. The T splitter connects the LNB cable to two cables.
  3. One of the cables is connected to a tbs 6909x cards, only to provide the required voltages, 22kHz and diseqc commands to the LNB
  4. The other cable is connected to a DC blocker, which feeds into am F-to-SMA-connecter converter and then into the USRP
  5. And I use a new laptop to run the software. The laptop connects to the USRP B200
On the software side it works using the gr-dvbs2rx software, which I installed on fedora 36 as follows:
First I installed the code and some dependencies
Bash:
sudo dnf install gnuradio-devel
sudo dnf install spdlog-devel
sudo dnf install -y pybind11-devel
sudo dnf install fftw3-devel
sudo dnf install -y libsndfile-devel
git clone --recursive https://github.com/igorauad/gr-dvbs2rx.git
Then I needed to fix a few compile problems:
In lib/CMakeLists.txt add +add_compile_options ( -fPIC )
In cpu_features/CMakeLists.txt add +add_compile_options ( -fPIC )

And I compiled and installed:
Bash:
cd gr-dvbs2rx/
mkdir build
cd build
edit two file
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j `nproc`
sudo make install
sudo ldconfig

At this point I activate the LNB (using the tbs6909x card). In essence this amounts to provide the right voltage, diseqc
and 22khz signals by tuning to a mux in the proper band. It would not be too difficult to make this hardware yourself.
I have seen other threads on this forum, which come close....

I then picked a narrow band mux, to not load the system too much and made sure the linux power management profile was set to "performance"
to run the cpu's at full speeds

Then after some experimentation, I found that the following command produces a correct transport stream:

Bash:
dvbs2-rx -f 1729.75e6 -s  3215e3 --usrp-gain=40 --frame-size normal  --source usrp --debug 1 --usrp-args "serial=XXXXXX,num_recv_frames=320"    --log-stats --log-period 3 --mon-server -m 8psk3/4 --sink file  --out-file /tmp/test.ts

I removed the serial number (I do not want it on this forum). The options ask to tune to 9750 + 1729.75 Mhz, with a symbol rate of 3125 kS/s, PSK8 modulation, with a
fec of 3/4. Important is also to set the proper gain of the signal

This can be played with vlc:
Bash:
vlc /tmp/test.ts

And out came the music: BeeGee's Saturday Night fever on Europe 1. CPU usage was about 130%. Stream played fine.

It is also possible to observe the inner workings of the software (see screenshot below). As it is all software, it can be modified in all kinds of ways.
The USRP B200 can tune from 70MHz to 6Ghz. So it can support wide band LNBs. It should be feasible to implement DVB-T and DVB-C as well (but good software may not yet be available).

Also possible is to make transmitters for all these standards. Two years ago I made my own DVB-T mux which featured 8 channels and I could
successfully watch those channels on a samsung TV. Transmitting is actually much much easier than receiving.



splitter.jpg




dc_blocker.jpglocked.png
 

Adam792

Specialist Contributor
Joined
Sep 5, 2009
Messages
1,266
Reaction score
1,158
Points
113
Age
31
My Satellite Setup
Dishes: 80cm (5°W), 80cm (30°W), 60cm Zone 2 (13°E/19.2°E/28.2°E)
Receivers: HTPC w/ TBS6905 4x DVB-S2 PCIe tuner card running TVHeadend, Octagon SF8008 mini.
My Location
Cheltenham
Great work, very interesting stuff. :)

I imagine this set up would also allow the decoding of very low bandwidth transponders below the hardware capabilities of most regular tuners, like the Irish radio stations on 27.5°W, e.g. -

11684.77 V 166 8/9 DVB-S2 QPSK (Classic Hits)
11689.05 V 83 8/9 DVB-S2 QPSK (Spin South West)

Unfortunately I think these just have the PID carrying AAC audio inside them and no MPEG-TS tables, so they don't play as easily in VLC (you'd have to use another tool to demux them to an audio file first)
 

astra19

Member
Joined
Apr 11, 2019
Messages
367
Reaction score
198
Points
43
My Satellite Setup
98cm motorised technomate. 50e to 34.5w
My Location
Europe
Keen to hear more about your DVB-T mux :)
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
701
Reaction score
422
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
Great work, very interesting stuff. :)

I imagine this set up would also allow the decoding of very low bandwidth transponders below the hardware capabilities of most regular tuners, like the Irish radio stations on 27.5°W, e.g. -

11684.77 V 166 8/9 DVB-S2 QPSK (Classic Hits)
11689.05 V 83 8/9 DVB-S2 QPSK (Spin South West)

Unfortunately I think these just have the PID carrying AAC audio inside them and no MPEG-TS tables, so they don't play as easily in VLC (you'd have to use another tool to demux them to an audio file first)
As I wrote in another thread: CLassic hits can be tuned with tbs6903X or tbs6909x. The stream can then be captured with dvbsnoop
and played with mpv (and perhaps vlc). As mpv is based on ffmpeg, the audio can probably be played with that as well. It is possible
to automate this by adding some code in e.g., neumoDVB but it is probably not worth the effort for one or two stations
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
701
Reaction score
422
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
Keen to hear more about your DVB-T mux :)
What I did was to prepare the transmission before hand (nothing live for this experiment).
For this I used 7 music videos.

Using ffmpeg I converted those to mpreg program streams.
Then, again using fmpeg, I merged the streams into a fixed bit rate transport stream of about 22MBit/s

Then a gnuradio flowgraph called dvbt_tx_8k, I put it on the air at 492.25 Mhz and a bandwith of 9Mhz
(probably a bit on the marge side) and at very low power.
I could scan this mux on a TV and watch the videos each as a seperate TV program. Some videos ended
earlier than others. The corresponding TV channels disappeared when video's ended. The stream played as
a loop.
 

zorrin

Specialised contributor
Joined
Nov 12, 2008
Messages
444
Reaction score
434
Points
63
Age
51
Location
France
Website
www.facebook.com
My Satellite Setup
CM 1m20 Ku 52°E to 45°O GTMEDIA V9 Prime
CM 1m20 Ku 50°E to 45°O OCTAGON SF8008
My Location
france
Today I managed to suiccessfully receive the complete 11480H mux at 5.0W without a receiver and
without a satellite card. Well, the latter is not strictly trough, because I needed it to fake some missing hardware. Read on....

The hardware setup is as follows:
  1. I use a software defined radio called USRP B200. Given that this particular mux has a relatively low bandwidth, something cheaper like hackrf or rtlsdr would also work.
  2. Because the usrp cannot power the lnb and because it cannot cope with the DC voltage on the line, I use a splitter and a DC blocker. The T splitter connects the LNB cable to two cables.
  3. One of the cables is connected to a tbs 6909x cards, only to provide the required voltages, 22kHz and diseqc commands to the LNB
  4. The other cable is connected to a DC blocker, which feeds into am F-to-SMA-connecter converter and then into the USRP
  5. And I use a new laptop to run the software. The laptop connects to the USRP B200
On the software side it works using the gr-dvbs2rx software, which I installed on fedora 36 as follows:
First I installed the code and some dependencies
Bash:
sudo dnf install gnuradio-devel
sudo dnf install spdlog-devel
sudo dnf install -y pybind11-devel
sudo dnf install fftw3-devel
sudo dnf install -y libsndfile-devel
git clone --recursive https://github.com/igorauad/gr-dvbs2rx.git
Then I needed to fix a few compile problems:
In lib/CMakeLists.txt add +add_compile_options ( -fPIC )
In cpu_features/CMakeLists.txt add +add_compile_options ( -fPIC )

And I compiled and installed:
Bash:
cd gr-dvbs2rx/
mkdir build
cd build
edit two file
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j `nproc`
sudo make install
sudo ldconfig

At this point I activate the LNB (using the tbs6909x card). In essence this amounts to provide the right voltage, diseqc
and 22khz signals by tuning to a mux in the proper band. It would not be too difficult to make this hardware yourself.
I have seen other threads on this forum, which come close....

I then picked a narrow band mux, to not load the system too much and made sure the linux power management profile was set to "performance"
to run the cpu's at full speeds

Then after some experimentation, I found that the following command produces a correct transport stream:

Bash:
dvbs2-rx -f 1729.75e6 -s  3215e3 --usrp-gain=40 --frame-size normal  --source usrp --debug 1 --usrp-args "serial=XXXXXX,num_recv_frames=320"    --log-stats --log-period 3 --mon-server -m 8psk3/4 --sink file  --out-file /tmp/test.ts

I removed the serial number (I do not want it on this forum). The options ask to tune to 9750 + 1729.75 Mhz, with a symbol rate of 3125 kS/s, PSK8 modulation, with a
fec of 3/4. Important is also to set the proper gain of the signal

This can be played with vlc:
Bash:
vlc /tmp/test.ts

And out came the music: BeeGee's Saturday Night fever on Europe 1. CPU usage was about 130%. Stream played fine.

It is also possible to observe the inner workings of the software (see screenshot below). As it is all software, it can be modified in all kinds of ways.
The USRP B200 can tune from 70MHz to 6Ghz. So it can support wide band LNBs. It should be feasible to implement DVB-T and DVB-C as well (but good software may not yet be available).

Also possible is to make transmitters for all these standards. Two years ago I made my own DVB-T mux which featured 8 channels and I could
successfully watch those channels on a samsung TV. Transmitting is actually much much easier than receiving.



View attachment 144114




View attachment 144115View attachment 144116

I'm just starting to play with my NooElec NESDR Smart XTR SDR based RTL2832U & E4000.
Do you think I can do the same with this one?
 

astra19

Member
Joined
Apr 11, 2019
Messages
367
Reaction score
198
Points
43
My Satellite Setup
98cm motorised technomate. 50e to 34.5w
My Location
Europe
What I did was to prepare the transmission before hand (nothing live for this experiment).
For this I used 7 music videos.

Using ffmpeg I converted those to mpreg program streams.
Then, again using fmpeg, I merged the streams into a fixed bit rate transport stream of about 22MBit/s
Very interesting, thank you! How much control do you have over the transport stream bit rate and encoding?
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
701
Reaction score
422
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
I'm just starting to play with my NooElec NESDR Smart XTR SDR based RTL2832U & E4000.
Do you think I can do the same with this one?
No idea. Why not try it? you can modulate an 8MHz wide signal and you pc is fast enough, it should work.
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
701
Reaction score
422
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
Very interesting, thank you! How much control do you have over the transport stream bit rate and encoding?
With ffmpeg you have full control. Just make sure that the sum of the bitrates is lower than the bitrate of the mux.
ffmpeg fills in null packets to ensure a constant rate bitstream
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
701
Reaction score
422
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
This is what it looks like after scanning the transmitted mux in tvheadend: 7 channels named after the music videos,
and all playing at once. When a video finishes, the channel goes off air. After all videos finish, all channels restart broadcasting

xxx.png
 

deeptho

Specialist Contributor
Joined
Apr 7, 2006
Messages
701
Reaction score
422
Points
63
Age
57
My Satellite Setup
Wavefrontier T90, Laminas 120cm, 2 other dishes; tbs 5927, tbs6904, tbs6909x, tbs6903x, tbs5990, tbs6981,tbs5927
My Location
Europe
And this is what it looks like in neumoDVB, after fixing a small bug in its DVB-T code.

2.png
 
Top