Giter Club home page Giter Club logo

gr-dvbs2rx's Introduction

gr-dvbs2rx

Formatting Tests

Overview

gr-dvbs2rx is a GNU Radio out-of-tree (OOT) module with full DVB-S2 transmitter and receiver implementations for software-defined radio (SDR).

For the receiver side, this project includes a shared library with the essential signal processing blocks to process input IQ samples and recover an MPEG transport stream (TS) on the output. The processing blocks include:

  • The physical layer (PL) synchronization stages (frame timing, symbol timing, carrier frequency, and phase recovery).
  • Forward error correction (FEC) blocks.
  • Baseband frame (BBFRAME) processing.

These blocks are wired together in the dvbs2-rx application and within the example GNU Radio flowgraphs.

Additionally, the project provides the dvbs2-tx transmitter application. While this OOT module focuses on the Rx signal processing blocks, the Tx blocks are taken directly from the gr-dtv in-tree GNU Radio module for digital TV. Like the Rx application, the dvbs2-tx application wires the Tx processing blocks together while offering a flexible user interface.

The Tx and Rx applications are highly customizable through the command-line options detailed in the usage section. For instance, they include customization of the input/output interface and parameters like MODCOD, frame size, PL pilots, and roll-off factor. Also, they support using SDR devices (RTL-SDR, USRP, PlutoSDR, and BladeRF) as input/output interfaces.

This repository is a fork of drmpeg's gr-dvbs2rx original project, including the SIMD-accelerated LDPC decoder from xdsopl/LDPC. Among a variety of improvements, this fork adds:

  • The physical layer blocks required for a fully-fledged receiver.
  • The flexible dvbs2-tx and dvbs2-rx command-line applications.
  • A new BCH decoder implementation that is approximately 2.5x faster than the original (introduced in version 1.3.0)

License

The project is licensed under GPLv3 and was developed primarily for non-commercial research, experimentation, and education. Please feel free to contribute or get in touch to request features or report any problems.

User Guide

Main Authors

Further Information

gr-dvbs2rx's People

Contributors

asrifox avatar daniestevez avatar drmpeg avatar edgwouter avatar hennichodernich avatar igorauad avatar marcusmueller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gr-dvbs2rx's Issues

Feature Request: Documentation on how to use with Blockstream Satellite

I'm new to blockstream satellite but not new to GNURadio and SDR. I understand that this is just the receiver, but the Blockstream Satellite project references leandvb as the software it uses. Are there any 'Hello World' tutorials on how to receive a blockstream message with gr-dvbs2rx as the receiver software?

Check SYNCD size before filling partial MPEG-TS packet

if (d_partial_ts_bytes > 0) {

The logic inside this scope assumes sequential BB frames.
It will break and synchronization will be lost if a BB frame has been dropped.

I would propose including the following to check whether the SYNCD size corresponds to the remaining size of the partial TS packet.

        if (d_partial_ts_bytes && ((d_bbheader.syncd / 8) != TS_PACKET_LENGTH - 1 - d_partial_ts_bytes)) {
            GR_LOG_DEBUG_LEVEL(3, "Not enough bytes to complete the partial TS packet.");
            d_packet_drop_cnt++;
            d_synched = false;
        }

This would be added before evaluating the d_synched in:

if (!d_synched) {

Code refuses to link on Fedora 36

With the default compile flags, a linker error occurs on fedora 36 (linux, x86-64) because that code is compiled without -fPIC, which is necessary for shared libraries:
ldpc_decoder/libldpc_decoder_avx2.a(ldpc_decoder_avx2.cc.o): relocation R_X86_64_32 against hidden symbol '_ZN9ldpc_avx211LdpcDecoderE' can not be used when making a shared object

I succeeded in making it link and run by adding, in
lib/CMakeLists.txt:
+add_compile_options ( -fPIC )

A second such change has to be made in
in cpu_features/CMakeLists.txt but that is a git submodule.
So my workaround is probably not the best solution.

GRC example freezes (unbalanced streams)

When using dvbs2_fec_ber.grc to simulate the protocol, I have discovered that only MODCOD=QPSK1/4 works. Any other variant makes the simulation stuck.

This seems to be an issue with multiple-input blocks, like BER and QT GUI Time Sink; if the streams have unbalanced rates, it locks up. Adding a buffer on the faster stream seems to solve the problem:
Flowgraph with the throttle buffer on the input stream
On this flowgraph, the Throttle block is set to have an extended output buffer:
Throttle Properties Advanced Minoutbuf=64800*32

With the addition of the buffer block, the flowgraph is confirmed to work with all supported MODCODs.

dvbs2_tx_rx.grc example gives "plsync" error

For some reason I am unable to run the provided examples/dvbs2_tx_rx.grc flowgraph. Regardless of the .ts file I provide it, I always receive the error:

thread_body_wrapper :error: ERROR thread[thread-per-block[16]: <block plsync_cc(8)>]: pmt_cdr: wrong_type 0.00299287

Steps to replicate:

The command line tools dvbs2tx and dvbs2rx work as expected. The example for dvbs2_pl_sync.grc gives the same error. Using a larger .ts file doesn't seem to fix anything as the flowgraph still crashes on the first error.

I've can also replicate this issue from grc within the provided Docker container:
docker run -it --volume "/tmp/.X11-unix:/tmp/.X11-unix:rw" --env="DISPLAY" --env="QT_X11_NO_MITSHM=1" -v $HOME/:/home/<myhomedir>/ gr-dvbs2rx gnuradio-companion

Build process fails on MacOS

Host OS: macOS Ventura 13.4
Compiler: AppleClang 14.0.3

The build process fails at pi2_bpsk.cc due to

error: implicit conversion from '_Complex double' to 'float' is not permitted in C++

Regarding the following lines:

Line 26: (SQRT2_2 + SQRT2_2i), // bit 0
Line 27: (-SQRT2_2 - SQRT2_2i) // bit 1
Line 32: (-SQRT2_2 + SQRT2_2i), // bit 0
Line 33: (SQRT2_2 - SQRT2_2i) // bit 1
Line 58: (SQRT2_2 - SQRT2_2i), // rotation factor for even indexes
Line 59: (-SQRT2_2 - SQRT2_2i) // rotation factor for odd indexes
Line 185: (SQRT2_2 - SQRT2_2i), // rotation factor for even indexes
Line 186: (-SQRT2_2 - SQRT2_2i) // rotation factor for odd indexes

QO100 beacon

Hi,
I try to use it to receive QO100 beacon (Es Heil 2) without success until now.
I can get a MER of about 10.2 using Polyphase Clock Sync & Costas Loop.
But no constellation is archived after DVBS2 PL Sync.
I suspect that I have to set ACM/VCM mode to False but I do not know what values must entered at PLS filter entries.

Any help is welcome !!!

dvbs_tx_rx example frozen DVB-S2 PL Sync

Hey,

I am experimenting with your example flow graphs in the gnuradio companion. Since the example .ts file download link is broken (for me anyway), I created my own one by calculating the required TS bitrate for the given settings (QPSK, 0.20 rolloff, 1/4 code rate, pilots on at a 1 MBaud/s rate): https://www.satbroadcasts.com/DVB-S_Bitrate_and_Bandwidth_Calculator.html

and then using ffmpeg to convert a random mp4 video to an MPEG TS file
ffmpeg -i input.mp4 -c:v copy -b:v 0.4795M -c:a copy output.ts

When I run the example in grc the output of pl_sync_out is completely frozen (after half a second) and stuck on the following:
image

I'd expect the constellation diagram to converge to a noisy QPSK modulation scheme, however it seems that it instantly stops. I don't get any error anywhere. Am I doing something wrong?

installation errors

Hi,
In a fresh 22.04 installation I have to add: sudo apt-get install libsndfile1-dev
Also
13/13 Testing: qa_symbol_sync_cc
13/13 Test: qa_symbol_sync_cc
Command: "/usr/bin/sh" "qa_symbol_sync_cc_test.sh"
Directory: /home/sv1bds/gr-dvbs2rx/build/python/dvbs2rx
"qa_symbol_sync_cc" start time: Jun 23 08:27 EEST
Output:

/usr/lib/python3/dist-packages/gnuradio/gr/top_block.py:48: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
self.setDaemon(1)
.F..

FAIL: test_open_loop (main.qa_plsync_cc)
Test open-loop mode

Traceback (most recent call last):
File "/home/sv1bds/gr-dvbs2rx/python/dvbs2rx/qa_symbol_sync_cc.py", line 99, in test_open_loop
self.assertListEqual(x_syms[1:], self.sink.data())
AssertionError: Lists differ: [(-1+0j), (3+0j), (-2+0j), (2+0j), (-2.5+0j), (1.5+0j)] != [(-1+0j), (3+0j), (-2+0j), (2+0j), (-2.5+0j)]

First list contains 1 additional elements.
First extra element 5:
(1.5+0j)

  • [(-1+0j), (3+0j), (-2+0j), (2+0j), (-2.5+0j), (1.5+0j)]
    ? ----------
  • [(-1+0j), (3+0j), (-2+0j), (2+0j), (-2.5+0j)]

--gui option in dvbs2-rx application segmentation fault

Hi there, i was hoping to use your application to receive a blockstream satellite message, but when I run dvbs2-rx --gui I get the following error:

log :info: Starting DVB-S2 Rx
Traceback (most recent call last):
  File "/usr/local/bin/dvbs2-rx", line 1364, in <module>
    main()
  File "/usr/local/bin/dvbs2-rx", line 1321, in main
    tb = DVBS2RxTopBlock(options)
  File "/usr/local/bin/dvbs2-rx", line 130, in __init__
    self.setup_gui()
  File "/usr/local/bin/dvbs2-rx", line 435, in setup_gui
    self._add_gui_block(
  File "/usr/local/bin/dvbs2-rx", line 387, in _add_gui_block
    gui_obj_win = sip.wrapinstance(gui_obj.qwidget(), Qt.QWidget)
TypeError: wrapinstance() argument 2 must be sip.wrappertype, not sip.wrappertype
Segmentation fault (core dumped)

I can see here that you've added accomodations for QT compatibility with GNURadio 3.9/3.10, but it doesn't seem to be work.

I am running Ubuntu 21.04 with GNURadio 3.10.2
Do you have any thoughts on how to fix this?

Benchmarks and comparison

Hi @igorauad,

First, thank you and @drmpeg for this open source project.

I am currently writing a long paper on a different approach of a DVB-S2 transceiver (https://github.com/aff3ct/dvbs2). This transceiver is based on the AFF3CT DSEL. A short paper has been published on this DVB-S2 transceiver last year (https://hal.archives-ouvertes.fr/hal-03336450/file/article.pdf).

To the best of my knowledge, the gr-dvbs2rxis the most complete and open source DVB-S2 RX implem. In our solution we focus on achieving highest possible throughput by combining efficient/portable SIMD implementations and multi-threaded system (pipeline + fork/join parallelism). However we support less DVB-S2 configurations than this project, it is assumed :-). We are focusing on the method.

In the previously published paper, we said that gr-dvbs2rx was not designed for high throughput (is it really true?) but I think it is too easy and I would like to really compare the efficiency of your implementation to be as fair as possible :-).

So, here are my questions:

  • how can I bench the throughput and the latency of the Rx? Do you have some advise? I guess I don't care to use real radio for this comparison, I just want to bench the digital receiver part, so preregistered samples should be ok.
  • it has been some time I follow GNU radio but I'm still a newbie and I don't really understand if GNU Radio uses multi-threading (I think so) and if yes, how it performs multi-threading? For instance, is the granularity of the GNU Radio multi-threading can be inside the DVB-S2 Rx Hierarchical Block or not? (if not, the AFF3CT approach could be complementary to GNU Radio)
  • For now I'm playing with this type of command line (at this time, I only succeeded to run the code by running it on the Docker image you proposed) :
cat example.ts | dvbs2-tx --modcod qpsk8/9 --frame short | dvbs2-rx --modcod qpsk8/9 --frame short --out-fd 3 3> /dev/null

Do you have some advice to compile the best version (in term of highest possible throughput) of the gr-dvbs2rx? On which platform do you think it performs better (AMD AVX2 or Intel AVX-512 servers)?

I guess it is a lot of questions but I think it could be a good time to merge some things between AFF3CT and GNU Radio. But, it is still unclear what to merge for me :-). At the beginning AFF3CT has been designed to be an ECC toolbox (with fast decoder implementations). After that it grows and the need to make SDR systems arrived... At the end we don't want to make a clone of GNU Radio : it will be a non-sense.

Any help would be very appreciated!

Thank you in advance.

Syndrome calculation

(More of a comment than an actual issue). I'm looking at the new BCH decoder code to get an idea of where the performance improvements come from.

I saw that the following trick is used to evaluate syndromes: If $r(x)$ is the received polynomial (which in DVB-S2 has very large degree, on the order of 10000), instead of evaluating $r(x)$ at the $2t$ elements $\alpha, \alpha^2, \ldots, \alpha^{2t} \in GF(2^{16})$ to obtain the syndromes, we observe that $r(\alpha^j) = q_j(\alpha^j)$, where $q_j(x)$ is the quotient obtained by dividing $r(x)$ by the minimal polynomial of $\alpha^j$ in $GF(2)[x]$. It is also observed that some of the $\alpha^j$, $j = 1,\ldots,2t$ have the same minimal polynomial (i.e., they are conjugates), so the calculation of $q_j(x)$ can be re-used for several $\alpha^j$.

However, my understanding is that within the set of the $\alpha^j$, $j = 1, \ldots, 2t$, the conjugates come in pairs. In other words, there are $t$ distinct $q_j(x)$ polynomials to compute. These are the quotients obtained when dividing $r(x)$ by the first $t$ polynomials $g_k(x)$ in either Table 6a or Table 6b in the DVB-S2 standard.

An alternative idea is to divide $r(x)$ instead by the product $g(x) = g_1(x) g_2(x) \cdots g_t(x)$. This polynomial $g(x)$ is the code generator polynomial and has degree $16 t$. Since $g(\alpha^j) = 0$ for $j = 1,\ldots,2t$, if we denote the remainder of the division of $r(x)$ by $g(x)$ as $p(x)$, then the syndromes can be calculated by evaluating $p(x)$ at $\alpha^j$ for $j = 1,\ldots, 2t$.

Comparing both methods, the current method requires $t$ polynomial divisions on $GF(2)[x]$ of a polynomial of very large degree by a polynomial of degree 16, plus $2t$ evaluations of different polynomials of degree 15 in $GF(2)[x]$ at elements of $GF(2^{16})$. The method I propose requires one polynomial division on $GF(2)[x]$ of a polynomial of very large degree by a polynomial of degree $16t$, plus $2t$ evaluations of a single polynomial of degree $16t - 1$ at elements of $GF(2^{16})$. Since these elements are consecutive powers of $\alpha$, they can be calculated with a variant of the algorithm in gf2m_poly<T>::search_roots_in_exp_range (which is basically Chien's search).

I was wondering if you have given some thought to the performance of these two approaches or have done some benchmarks. To me it is not immediately obvious which one would be faster.

More SDR devices for dvbs2-tx and dvbs2-rx?

Hello,

Great project, I like the idea of using command line options with no GUI, very useful for SBC, so is there a chance to update your project to work with hackrf or pluto sdr?

Tks

Jacinto

AttributeError

Hi,

I opened dvbs2_tx_rx.grc simulation file to run in gnuradio. But I got the error in terminal.

Generating: '/home/demo/workarea/gr-dvbs2rx/examples/dvbs2_tx_rx.py

Executing: /usr/bin/python3 -u /home/demo/workarea/gr-dvbs2rx/examples/dvbs2_tx_rx.py

Traceback (most recent call last):
File "/home/demo/workarea/gr-dvbs2rx/examples/dvbs2_tx_rx.py", line 751, in
main()
File "/home/demo/workarea/gr-dvbs2rx/examples/dvbs2_tx_rx.py", line 729, in main
tb = top_block_cls(agc_gain=options.agc_gain, agc_rate=options.agc_rate, agc_ref=options.agc_ref, debug=options.debug, frame_size=options.frame_size, freq_offset=options.freq_offset, gold_code=options.gold_code, in_file=options.in_file, modcod=options.modcod, pl_freq_est_period=options.pl_freq_est_period, rolloff=options.rolloff, rrc_delay=options.rrc_delay, rrc_nfilts=options.rrc_nfilts, snr=options.snr, sps=options.sps, sym_rate=options.sym_rate, sym_sync_damping=options.sym_sync_damping, sym_sync_loop_bw=options.sym_sync_loop_bw)
File "/home/demo/workarea/gr-dvbs2rx/examples/dvbs2_tx_rx.py", line 343, in init
self.dvbs2rx_rx_hier_0 = dvbs2rx_rx_hier(
File "/home/demo/.grc_gnuradio/dvbs2rx_rx_hier.py", line 89, in init
*dvbs2rx.params.translate('DVB-S2',
File "/usr/local/lib/python3.8/dist-packages/gnuradio/dvbs2rx/params.py", line 148, in translate
standard, frame_size, constellation = _adjust_case(standard, frame_size,
File "/usr/local/lib/python3.8/dist-packages/gnuradio/dvbs2rx/params.py", line 19, in _adjust_case
constellation = constellation.upper()
AttributeError: 'int' object has no attribute 'upper'

Done (return code 1)

I'm using gnuradio 3.10.5.1, ubuntu 20.04 and python 3.8.10

Fails to build due to illegal conversion between _Complex double and float

using F34, cmake 3.20.5, clang 12.0.1 to build 878c4f7 against GNU Radio v3.9.4.0-40-g823f73013 :

FAILED: lib/CMakeFiles/gnuradio-dvbs2rx.dir/pl_freq_sync.cc.o
ccache /usr/bin/clang++ -DGR_MPLIB_GMP -Dgnuradio_dvbs2rx_EXPORTS -I../lib/../include -isystem /home/marcus/usrlocal-3.9/include -isystem /usr/include/python3.9 -march=native -Wall -O2 -g -DNDEBUG -fPIC   -fvisibility=hidden -std=gnu++17 -MD -MT lib/CMakeFiles/gnuradio-dvbs2rx.dir/pl_freq_sync.cc.o -MF lib/CMakeFiles/gnuradio-dvbs2rx.dir/pl_freq_sync.cc.o.d -o lib/CMakeFiles/gnuradio-dvbs2rx.dir/pl_freq_sync.cc.o -c ../lib/pl_freq_sync.cc
../lib/pl_freq_sync.cc:88:37: error: implicit conversion from '_Complex double' to 'float' is not permitted in C++
        unmod_pilots[i] = (+SQRT2_2 - SQRT2_2i);
                        ~  ~~~~~~~~~^~~~~~~~~~
1 error generated.

Segmentation Fault

Hi,

I opened dvbs2_tx_rx.grc simulation file, choose a ts file for the file source and ran it successfully.
I then split the flow into two separate files: one for transmitting and one for receiving, as I wanted to test it by actually transmitting over the air using two bladeRF 2.0 boards.

For the transmitter, I fed the virtual sink directly to the bladeRF sink (and removed the throttle block), and deleted all the other blocks. I setup the RF parameters, etc.

On another machine running Ubuntu 20.04, I setup the receiver by removing the transmitting blocks and connecting the bladeRF source to the DVB-S2 Rx Hier block. The RF parameters were also set up to match the frequency on the Tx side.

Both bladeRF boards are equipment with suitable antennas and bias tees and are located within 30 cm of each other.

I ran the receiver and I can see the frequency spectrum normally. Once I start the transmitter, after a few seconds the gnuradio on the Rx side just stops. I tried to run the gnuradio python file from the command line and I found that a segmentation fault is returned possibly once the receiver detects a specific signal coming from the transmitter. I ran the python file from gdb and got the following output:

hread 21 "symbol_sync_cc8" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd48e9700 (LWP 3933)]
0x00007ffff1454da0 in ?? () from /lib/x86_64-linux-gnu/libvolk.so.2.4
(gdb) backtrace
#0 0x00007ffff1454da0 in () at /lib/x86_64-linux-gnu/libvolk.so.2.4
#1 0x00007fffe7b8a65e in gr::dvbs2rx::symbol_sync_cc_impl::loop(std::complex const*, std::complex, int, int) ()
at /usr/local/lib/x86_64-linux-gnu/libgnuradio-dvbs2rx.so.1.0.0
#2 0x00007fffe7b8b0a1 in gr::dvbs2rx::symbol_sync_cc_impl::general_work(int, std::vector<int, std::allocator >&, std::vector<void const
, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) ()
at /usr/local/lib/x86_64-linux-gnu/libgnuradio-dvbs2rx.so.1.0.0
#3 0x00007ffff18188cd in gr::block_executor::run_one_iteration() ()
at /lib/x86_64-linux-gnu/libgnuradio-runtime.so.3.10.5
#4 0x00007ffff18879b7 in gr::tpb_thread_body::tpb_thread_body(std::shared_ptrgr::block, std::shared_ptrboost::barrier, int) ()
at /lib/x86_64-linux-gnu/libgnuradio-runtime.so.3.10.5
#5 0x00007ffff186ec7d in ()
at /lib/x86_64-linux-gnu/libgnuradio-runtime.so.3.10.5
#6 0x00007ffff186fa57 in ()
at /lib/x86_64-linux-gnu/libgnuradio-runtime.so.3.10.5
#7 0x00007ffff10da43b in ()
at /lib/x86_64-linux-gnu/libboost_thread.so.1.71.0
#8 0x00007ffff7d97609 in start_thread (arg=)
at pthread_create.c:477
#9 0x00007ffff7ed1133 in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

tx_
rx

Test 11 (qa_plsync_cc) Failed

Hi,

I'm running Ubuntu 20 as a Parallels VM guest on MacOS Monterey 12.3.1 (Apple Silicon M1 Macbook Pro).

The build went pretty smoothly after I installed libsndfile-dev but CTest showed one test failure.

11/12 Test #11: qa_plsync_cc .....................***Failed    2.78 sec
      Start 12: qa_symbol_sync_cc
12/12 Test #12: qa_symbol_sync_cc ................   Passed    0.18 sec

92% tests passed, 1 tests failed out of 12

Total Test time (real) =   3.68 sec

The following tests FAILED:
	 11 - qa_plsync_cc (Failed)

Building 3.10

I decided to forego the Docker image and build on Ubuntu 20.04. The latest version for Linux is 3.9.5 in terms of using apt-get. Is there a way to build against this or will I have to build GNU Radio from source to get 3.10? I tried to build against maint-3.9 but there were build errors of some kind.

$ cmake ..
-- Build type not specified: defaulting to release.
CMake Error at CMakeLists.txt:77 (find_package):
  Could not find a configuration file for package "Gnuradio" that is
  compatible with requested version "3.10".

  The following configuration files were considered but not accepted:

    /usr/lib/x86_64-linux-gnu/cmake/gnuradio/GnuradioConfig.cmake, version: 3.9.5.0
    /lib/x86_64-linux-gnu/cmake/gnuradio/GnuradioConfig.cmake, version: 3.9.5.0

CUDA Compatibity

Hi, regarding getting a DVBS2 signal at a symbol rate of 30MSPS. Assuming your design blocks were CUDA optimized for jetson Tx2. Do you think your design would work for receiving a wide bandwidth signal?

Trying to use on Windows

Hello,

I am currently working on a senior design project that involves streaming video from a cubesat and I was hoping to use your project for this. I currently have issues getting my bootleg pluto + working on Linux but I have it working on Windows and was hoping to get this working on it. My current issue involves missing python modules as shown below.

Traceback (most recent call last):
File "C:\Users\Logan\radioconda\Lib\site-packages\gnuradio\dvbs2rx_init_.py", line 17, in
from .bindings.dvbs2rx_python import * # noqa: F401,F403
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'gnuradio.dvbs2rx.bindings'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\gr-dvbs2rx\examples\dvbs2_rx.py", line 18, in
from dvbs2rx_rx_hier import dvbs2rx_rx_hier # grc-generated hier_block
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Logan/.grc_gnuradio\dvbs2rx_rx_hier.py", line 12, in
from gnuradio import dvbs2rx
File "C:\Users\Logan\radioconda\Lib\site-packages\gnuradio\dvbs2rx_init_.py", line 19, in
from .dvbs2rx_python import * # noqa: F401,F403
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'gnuradio.dvbs2rx.dvbs2rx_python'

Done (return code 1)

Is there any way for me to add these manually?

Thank you for your time!

Hardware suggestion

I decided to use the GNU flowgraph because I want data in and out of the signal processing modules in real-time and/or offline decoding of DVBS2 signals from satellites in India using an SDR (I want to connect to INSAT-4A or 4B satellite with a freely available broadcast channel in freq range 10-12Ghz). The local DTH operates in Ku band so I am planning to use the antenna and LNB (universal LNB's sold by local vendors in kit) should the universal LNB be a concern?
In order to give the downconverted signal to the SDR should I be concerned about using bias-T or SWM power inserter with respect to overall performance or quality of signal. Are they both the same?
Also, assuming SWM, should I be concerned about input voltage readings of it? If yes then how to find to desired power to feed the LNB?

the plutosdr integer check is errorneous

Problem

Passing 2e5 as sampling rate does not convert the float to an int, thus failing to initialize the plutosdr source:

$ dvbs2-rx --samp-rate 2e5 --source plutosdr --plutosdr-addr 192.168.2.1 
log :info: Starting DVB-S2 Rx 
Traceback (most recent call last): 
  File "/nix/store/ndymc3sszvcnsps8p1skmj7ww88izg17-gr-dvbs2rx-1.4.0/bin/.dvbs2-rx-wrapped", line 1631, in <module> 
    main() 
  File "/nix/store/ndymc3sszvcnsps8p1skmj7ww88izg17-gr-dvbs2rx-1.4.0/bin/.dvbs2-rx-wrapped", line 1587, in main 
    tb = DVBS2RxTopBlock(options) 
         ^^^^^^^^^^^^^^^^^^^^^^^^ 
  File "/nix/store/ndymc3sszvcnsps8p1skmj7ww88izg17-gr-dvbs2rx-1.4.0/bin/.dvbs2-rx-wrapped", line 156, in __init__ 
    source_block = self.connect_source() 
                   ^^^^^^^^^^^^^^^^^^^^^ 
  File "/nix/store/ndymc3sszvcnsps8p1skmj7ww88izg17-gr-dvbs2rx-1.4.0/bin/.dvbs2-rx-wrapped", line 755, in connect_source 
    source = self.setup_plutosdr_source() 
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
  File "/nix/store/ndymc3sszvcnsps8p1skmj7ww88izg17-gr-dvbs2rx-1.4.0/bin/.dvbs2-rx-wrapped", line 665, in setup_plutosdr_source 
    iio_pluto_source.set_samplerate(self.samp_rate) 
TypeError: set_samplerate(): incompatible function arguments. The following argument types are supported: 
    1. (self: gnuradio.iio.iio_python.fmcomms2_source_fc32, samplerate: int) -> None 

Invoked with: <gnuradio.iio.iio_python.fmcomms2_source_fc32 object at 0x7f1abfe218f0>, 200000.0

However, using an actual floating point value as sampling rate does trigger the plutosdr float to integer magic:

$ dvbs2-rx --samp-rate 200000.5 --source plutosdr --plutosdr-addr 192.168.2.1 
log :info: Starting DVB-S2 Rx 
log :warning: An integer sample rate is required by the PlutoSDR. Setting rate to 200000 samples/sec. 
log :warning: The OOT symbol synchronizer requires an even integer sps >= 2 (current sps=0.2000005) 
log :info: Switching to the in-tree symbol synchronizer 
Traceback (most recent call last): 
  File "/nix/store/ndymc3sszvcnsps8p1skmj7ww88izg17-gr-dvbs2rx-1.4.0/bin/.dvbs2-rx-wrapped", line 1631, in <module> 
    main() 
  File "/nix/store/ndymc3sszvcnsps8p1skmj7ww88izg17-gr-dvbs2rx-1.4.0/bin/.dvbs2-rx-wrapped", line 1587, in main 
    tb = DVBS2RxTopBlock(options) 
         ^^^^^^^^^^^^^^^^^^^^^^^^ 
  File "/nix/store/ndymc3sszvcnsps8p1skmj7ww88izg17-gr-dvbs2rx-1.4.0/bin/.dvbs2-rx-wrapped", line 160, in __init__ 
    self.connect_dvbs2rx(source_block, sink_block) 
  File "/nix/store/ndymc3sszvcnsps8p1skmj7ww88izg17-gr-dvbs2rx-1.4.0/bin/.dvbs2-rx-wrapped", line 912, in connect_dvbs2rx 
    symbol_sync = digital.symbol_sync_cc( 
                  ^^^^^^^^^^^^^^^^^^^^^^^ 
IndexError: nominal samples per symbol must be > 1

(Ignore the following crash, this is likely related to having a weird sampling rate)

Cause

The reason for this is an error in the business logic. The conditional responsible for the conversion

if self.source == 'plutosdr' and not self.samp_rate.is_integer():

uses pythons float.is_integer() method to check, if the sampling rate is already and integer value, and only converts if it is not integer. However, aforementioned function does not check the value type, but rather if the float has no digits other than 0 behind the decimal:

Return True if the float instance is finite with integral value, and False otherwise:

Therefore, the float 2e5 will not be converted to an integer type, because it already is re-presentable as an integer type (having no relevant decimal digits). However, the plutosdr checks the actual data type to be int.

Solutions

Solution one: fix conditional to check value type

Actually check the type: http://docs.python.org/library/functions.html#isinstance

if self.source == 'plutosdr' and isinstance(self.samp_rate, float):
    # ...

Solution two: just omit the type check

Let's be real; converting one float to an integer when running on the plutosdr is not such a costly operation that one should make it conditional/on demand. Doing such micro-optimizations is prone to introduce bugs, like, it just did! So ditch the secondary check, always convert to int if running on plutosdr:

if self.source == 'plutosdr':
    # ...

Thanks

Thanks to @C4H6O6U for helping me discover and understand this bug!

X11 Server, Thread Priority, and No PPS

I'm running from the docker image on Ubuntu 20.04 and have a few questions. My output is provided below.

I seem to have an error trying to connect to an X11 server. I don't happen to need this and I'm logged in remotely via SSH. Can this be run without X11?

Per the USRP general application notes I attempted to modify /etc/security/limits.conf to allow the changing of thread priorities. I understand that this warning can be ignored per the manual but I'd prefer not to see the warning if I can avoid it. I tried using my "username" group and the docker group but I continue to get the error. @igorauad I'm wondering if you have configured this when you run on Linux.

I keep get this error about not having a PPS signal. Is this required? I'm certainly not feeding my USRP a PPS signal. As you can see I tried setting --usrp-clock-source internal as a guess.

I specify --log-file but I don't see a log file created.

--freq 2250.0M --sym-rate 1.0M --sink file --out-file test.out.dat --frame-size normal --modcod QPSK1/4 --pilots off --rolloff 0.2 --log-file test.log.txt --source usrp --usrp-args addr=192.168.10.2 --usrp-clock-source internal
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused

(dvbs2-rx:15): Gdk-CRITICAL **: 20:51:44.646: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
log :info: Starting DVB-S2 Rx
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [USRP2] Opening a USRP2/N-Series device...
[INFO] [USRP2] Current recv frame size: 1472 bytes
[INFO] [USRP2] Current send frame size: 1472 bytes
[WARNING] [UHD] Unable to set the thread priority. Performance may be negatively affected.
Please see the general application notes in the manual for instructions.
EnvironmentError: OSError: error in pthread_setschedparam
[INFO] [MULTI_USRP]     1) catch time transition at pps edge
Traceback (most recent call last):
  File "/usr/local/bin/dvbs2-rx", line 1290, in <module>
    main()
  File "/usr/local/bin/dvbs2-rx", line 1247, in main
    tb = DVBS2RxTopBlock(options)
  File "/usr/local/bin/dvbs2-rx", line 129, in __init__
    source_block = self.connect_source()
  File "/usr/local/bin/dvbs2-rx", line 591, in connect_source
    usrp_source.set_time_unknown_pps(uhd.time_spec(0))
RuntimeError: RuntimeError: Board 0 may not be getting a PPS signal!
No PPS detected within the time interval.
See the application notes for your device.

Feature request: implementing 16- and 32-APSK for DVB-S2

Thanks for your work on this project! I'd be interested in using a DVB-S2 receiver in 16-APSK and 32-APSK modes, which are currently not supported.

I've taken a look through the codebase but need some guidance. Would you mind outlining what needs to be done and the key files that need to be changed to get a working implementation?

Fails to link with a custom install prefix.

The correct way to link with gr_filter is as follows:

  1. In the top level CMakeLists,txt, add the line:

find_package(Gnuradio COMPONENTS fft filter blocks)

after the line:

find_package(Gnuradio "3.9.2" REQUIRED)

  1. In lib/CMakeLists.txt, change gnuradio-filter to gnuradio::gnuradio-filter

Option to switch between multiple video channels (as in a regular TV)

I think data (ts packets) from multiple telecasters ((like news, sports channels, etc..) on a single satellite is broadcasted all at once. In regular TV, we have the option to switch between various telecasters. But I don't understand how to switch in the case of GNU Radio design.
Sorry if this was a very basic lack of understanding on my part.

I also want to know what changes could help dvbs2-rx work with a higher sampling rate, like 30MSPS on CPU/GPU. Would it allow a higher sampling rate if I use Jetson TX2 GPU and implement decoders and synchronization?
If this is not possible, do you suggest an FPGA implementation?

bladeRF does not work

Hi,
I am trying to run:
dvbs2-tx --source file --in-file ~/Videos/1min_timer_mpegts.ts --sink bladeRF --freq 1316.9e6 --sym-rate 1e6 --usrp-args "serial=9e4"
and my error is:

Traceback (most recent call last):
  File "/usr/local/bin/dvbs2-tx", line 1055, in <module>
    main()
  File "/usr/local/bin/dvbs2-tx", line 1027, in main
    tb = dvbs2_tx(options)
  File "/usr/local/bin/dvbs2-tx", line 178, in __init__
    sink_block = self.connect_sink()
  File "/usr/local/bin/dvbs2-tx", line 576, in connect_sink
    sink = self.setup_blade_rf_sink()
  File "/usr/local/bin/dvbs2-tx", line 461, in setup_blade_rf_sink
    import bladeRF
ModuleNotFoundError: No module named 'bladeRF'

I have bladeRF library compiled and installed from sources. And next commands works:

python3
import bladerf

Please help me understand what is "import bladeRF" and how can I get it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.