Installing Eumetcast on Linux

NOTE:This page is under construction; might contain errors!

Introduction.

This page describes installation of Eumetcast on Linux. Info is not complete yet. Locations may differ between distro's; here, Fedora is used.
As far as I know there are 2 scripts available for setting up the Eumetcast stuff: For more info see also:
  • website of Martin Bruchanov. and
  • website of Ernst Lobsiger

    My environment:


    Overview of all commands

    See for more details below.
    commandfunctionexample
    szaptune dvb-receiver; keep data stream activeszap -c /etc/chan_eumetcast.conf -n 1
    dvbnetroutingdvbnet -a 0 -p 100
    ifconfigPID routingifconfig dvb0_0 192.168.240.230
    multicast routingifconfig dummy0 192.168.238.238 multicast
    smcroutemulticast routingsmcroute -a dvb0_0 192.168.1.1 224.223.222.223

    Installing Opera.

    Opera is a USB DVB-receiver. It looks very much like DVBWorld; biggest difference: red led instead of blue led... (That doesn't mean that the hardware is the same!)

    1. Firmware

    firmware can be extarcted from the Windows drivers:
  • 2830SCap2.sys
  • 2830SLoad2.sys
    You can find them on the CD which comes with the receiver, in subdir. 'driver'. Copy them to your hdisk.
    For extracting there is a perl-script, so extracting could be done under any OS. See: get_dvb_firmware
    Now you have 2 new files: Copy these files into:
    /lib/firmware
    For more information see opera-firmware

    2. Activate and tune the receiver.

    Needed: First plug in the receiver. This will initialize:
  • /dev/dvb/adapter0/dvr0
  • /dev/dvb/adapter0/demux0
  • /dev/dvb/adapter0/net0
  • /dev/dvb/adapter0/frontend0

    Now start with: (note: this must keep running!)
    $ szap -c /etc/chan_eumetcast.conf -n 1 >> /dev/null &

    To show tune results:
    $ femon
    This will show next info (about 1 line per sec)
    
    status 1f | signal dd32 | snr a122 | ber 000000ca | unc 00000000 | FE_HAS_LOCK
    status 1f | signal dc11 | snr a2de | ber 0000008d | unc 00000000 | FE_HAS_LOCK
    status 1f | signal dad7 | snr a4c7 | ber 00000089 | unc 00000000 | FE_HAS_LOCK
    


    Some notes about szap/femin:
    szap does do several actions:
    1. Set frequency, high/low band, etc.
      • If only this is needed you can add a -x option to the command. szap will then exit; the receiver will stay tuned.
    2. Monitor signal strength etc., to stdout
      • Instead of using this output it's better to redirect szap's stdout to /dev/null, and use femon for monitoring.
        Advantage: you can stop femon if desired, change redirection of output etc. without interupting reception.
    3. Receive data from receiver
      • Important: For this it's necessary that szap keeps running. That's what it will do without the -x option.
        Stopping needs to be done by killing the process.
    Please note that numbers like signal strength and snr normally change all the time. If all numbers are stable then there is no connection to the receiver; output of femon is in that case invalid!

    Eumetsat script

    This script uses a config-file 'eumetcast-channels.cfg' for all IP addresses etc.

    3. Configure dvb interfaces

    Needed: For each PID both commands have to be executed:
    $ dvbnet -a 0 -p <pidnr>
    $ /sbin/ifconfig dvb0_<n> 192.168.240.<230+n>
    Example:

    $ dvbnet -a 0 -p 100 > /dev/null 2>&1
    $ ifconfig dvb0_0 192.168.240.230 > /dev/null 2>&1
    $ dvbnet -a 0 -p 300 > /dev/null 2>&1
    $ ifconfig dvb0_1 192.168.240.231 > /dev/null 2>&1
    ...
    From now on you can observe incoming packages with a sniffer, e.g. wireshark. The source address is always:

  • 192.168.1.1
    The destination address depends on the channel, distributed using a certain PID. For pid 100, so dvb0_0, the destination address for the TSL Announcement Channel is:
  • 224.223.222.223
    Note that you can have different channels (i.e., destination addresses) distributed on one PID.

    To check activated PID's:
    $ dvbnet -l

    
    Found device 0: interface dvb0_0, listening on PID 100
    Found device 1: interface dvb0_1, listening on PID 300
    

    4. Configure multicast routing

    Needed: First create the Tellicast destination address:
    $ /sbin/ifconfig dummy0 192.168.238.238 multicast
    And the multicast deamon:
    $ /usr/local/sbin/smcroute -d
    $ sleep 5
    Now, for all needed channels in all PID's do:
    $ /usr/local/sbin/smcroute -a dvb0_<n> 192.168.1.1 <ip_addr_of_chan> dummy0
    Example:

    $ /usr/local/sbin/smcroute -a dvb0_0 192.168.1.1 224.223.222.223 dummy0
    $ /usr/local/sbin/smcroute -a dvb0_1 192.168.1.1 224.223.222.21 dummy0

    Show routes:
    $ /sbin/ip mroute

    
    (192.168.1.1, 224.223.222.21)    Iif: dvb0_1     Oifs: dummy0
    (192.168.1.1, 224.223.222.223)   Iif: dvb0_0     Oifs: dummy0
    

    6. Stopping.

    Before unplugging receiver or putting your PC into hibernate best is to stop all traffic:

    $ /usr/local/sbin/smcroute -k
    $ /sbin/ifconfig dummy0 down
    $ /sbin/ifconfig dvb0_0 down
    $ /sbin/ifconfig dvb0_1 down
    ...
    $ dvbnet -d dvb0_0
    $ dvbnet -d dvb0_1
    ...
    killall szap


    7. Debugging.

  • dvbtraffic should show received packets.
  • /usr/sbin/tcpdump -v -i dvb0_0
  • /usr/sbin/tcpdump -v -i dvb0_0
  • /usr/bin/scandvb -c

    8. Current problems with Opera receiver under Linux: Solved.

    If dvbtraffic doesn't show traffic, while receiver is tuned and locked correctly, try following:

    9. Some messages to check install.

  • dmesg gives:
    opera1 1-6:1.0: no suspend for driver opera1?
    dvb-usb: Opera1 DVB-S USB2.0 successfully deinitialized and disconnected.
    dvb-usb: found a 'Opera1 DVB-S USB2.0' in cold state, will try to load a firmware
    dvb-usb: downloading firmware from file 'dvb-usb-opera-01.fw'
    dvb-usb: generic DVB-USB module successfully deinitialized and disconnected.
    opera: start downloading fpga firmware dvb-usb-opera1-fpga-01.fw
    dvb-usb: found a 'Opera1 DVB-S USB2.0' in warm state.
    DVB: registering new adapter (Opera1 DVB-S USB2.0)
    dvb-usb: MAC address: 00:e0:4f:00:39:86
    DVB: registering frontend 0 (ST STV0299 DVB-S)...
    input: IR-receiver inside an USB DVB receiver as /class/input/input12
    dvb-usb: schedule remote query interval to 200 msecs.
    dvb-usb: Opera1 DVB-S USB2.0 successfully initialized and connected.
    
  • /sbin/lsmod gives:
    Module                  Size  Used by
    stv0299                12873  1 
    i2c_i801               12113  0 
    
    dvb_pll                13637  1 
    dvb_usb_opera          12745  1 
    dvb_usb                18509  1 dvb_usb_opera
    dvb_core               69481  2 stv0299,dvb_usb
    i2c_core               21825  5 dvb_pll,stv0299,dvb_usb_opera,dvb_usb,i2c_i801
    
  • "cat /proc/sys/net/ipv4/conf/all/rp_filter" gives:
    0