An open API service indexing awesome lists of open source software.

https://github.com/drmpeg/gr-ule

An RFC 4326 interface for GNU Radio
https://github.com/drmpeg/gr-ule

Last synced: 6 months ago
JSON representation

An RFC 4326 interface for GNU Radio

Awesome Lists containing this project

README

          

# Copyright 2016,2017,2022 Ron Economos
#
# This file is part of gr-ule
#
# gr-ule is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# gr-ule is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with gr-ule; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.

gr-ule
======

Author: Ron Economos
Email:

The goal of this project is to build a GNU Radio block that implements
the Unidirectional Lightweight Encapsulation (ULE) for Transmission of
IP Datagrams over an MPEG-2 Transport Stream (TS) protocol described in
RFC 4326.

https://tools.ietf.org/html/rfc4326

A gnuradio-companion flowgraph (vv009-4kfft.grc) for an Ettus Research
B2X0 SDR is included to provide a lower latency DVB-T2 configuration.

Requirements:

A DVB-T2 receiver that is supported by the DVB media drivers in Linux.
This module was tested with a PCTV 292e USB receiver. The DVB-T2 receiver
is connected to the DVB-T2 transmitter with a coaxial cable and 30 dB
attenuator for loopback testing.

Usage:

Because the Pcap library is used to capture raw packets, the capabilities
of the Python interpreter need to be increased. This only needs to be
done once.

sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/python3.x

CAUTION: This allows any Python program to open network interfaces.

First, a network interface is created with dvbnet. This program can be
installed with sudo apt-get install dvb-apps.

sudo dvbnet -p 53 -U

This creates the interface dvb0_0 and listens for ULE packets on the
MPEG-2 Transport Stream PID 53 (0x35).

sudo ip link set dev dvb0_0 address 02:00:48:55:4c:4b

This assigns a MAC address to the dvb0_0 interface. This MAC address
must match the MAC address used in the flow graph (if you chose to
use a different address).

sudo ip link set dvb0_0 up

sudo ip addr add 44.0.0.1/24 broadcast 44.0.0.255 dev dvb0_0

This assigns an IP address to the dvb0_0 interface and starts it.

To prevent Network Manager on Ubuntu from interfering with the dvb0_0
interface, add these lines to /etc/NetworkManager/NetworkManager.conf.

[keyfile]
unmanaged-devices=interface-name:dvb0_0

Testing features:

In order to test this block with just a single transmitter and
receiver, two optional testing modes are available.

The first is a ping reply feature. In this mode, the block modifies
incoming ping requests into ping replies and swaps the source
and destination IP addresses. This allows a normal ping command
to complete. Ping packets are very useful for testing since the
size and rate can be adjusted. Also, packet latency can be easily
measured.

The second feature is IP address spoofing for UDP packets. In this
mode the block modifies the source and destination IP address of
UDP packets to selected values. This allows for a loopback test
of video/audio over RTP using VLC. The destination IP address is
set to the host that the VLC RTP decoder is running on. Video is
useful for testing since dropped packets will cause bit-stream
errors (that VLC will report if you start it on the command line).

Here's what my video loopback flow looks like:

VLC RTP streaming to 44.0.0.3 -> dvb0_0 interface -> ULE Source block ->
GNU Radio DVB-T2 transmitter -> Ettus B210 -> 30 dB attenuator ->
PCTV 292e receiver -> dvb0_0 -> VLC RTP decoder from 44.0.0.1.

Both of the features should be shut off for normal full-duplex
operation.

Dependencies:

libpcap-dev
libdvbv5-dev

Build instructions:

mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig

Contributions are welcome!