#
#
#
#
Author: Ron Economos Email: w6rz@comcast.net
The goal of this project is to build a GNU Radio block that implements the Multiprotocol encapsulation portion of ETSI EN 301 192 V1.6.1 DVB specification for data broadcasting standard:
http://www.etsi.org/deliver/etsi_en/301100_301199/301192/01.06.01_60/en_301192v010601p.pdf
Requirements:
A DVB-S2 receiver that supports the MPE protocol. This module was tested with an Ayecka SR1 DVB-S2 receiver. The DVB-S2 receiver is connected to the DVB-S2 transmitter with a coaxial cable and 40 dB attenuator for loopback testing.
http://www.ayecka.com/products-SR1.php
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/python2.7
CAUTION: This allows any Python program to open network interfaces.
The current implementation of the block uses a TAP network interface named tap0.
To add a TAP interface (with ip(8) commands):
sudo ip tuntap add dev tap0 mode tap
sudo ip link set dev tap0 address 02:00:48:55:4c:4b
sudo ip addr add 44.0.0.1/24 broadcast 44.0.0.255 dev tap0
sudo ip link set tap0 up
sudo ip link set tap0 arp off
The MAC address must match the MAC address used in the flow graph (if you chose to use a different address).
To forward packets received in the tap0 IP address range to the default network interface (replace eth0 with your default device name):
sudo sysctl -w net.ipv4.conf.all.rp_filter=0
sudo sysctl -w net.ipv4.conf.eth0.rp_filter=0
Note: This is required for the ping reply test feature described below:
To delete the TAP interface:
sudo ip tuntap del dev tap0 mode tap
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 -> tap0 interface -> MPE Source block -> GNU Radio DVB-S2 transmitter -> Ettus B210 -> 40 dB attenuator -> Ayecka SR1 receiver -> eth0 -> VLC RTP decoder from host address.
Both of the features should be shut off for normal full-duplex operation.
Dependencies:
libpcap-dev
Build instructions:
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig
Contributions are welcome!