This how-to describes which hardware and software components I used to build my Home Theater PC, with the ability to watch satellite television too. It includes a step-by-step guide for installing and configuring the required software, which appeared to be quite an adventure if you want to use a softcam, because the information was scattered around the internet.

Some people consider the use of a softcam illegal. My opinion is that a softcam can be used illegally, but if you use it in combination with a valid subscription on one PC only it is perfectly legal. In fact I see no difference with a real CAM, which contains the same kind of software (firmware).

For installing the software at least some experience using the Linux CLI is required.

Comments, corrections and additions are as always very welcome!

Hardware

Goal

  • Small size
  • Low power
  • Low noise
  • HD ready
  • Satellite reception
  • Softcam
  • Linux compatible
  • Affordable

Guide

Power usage

Asrock ION 330HT-BD + TeVii S660

  watt kWh/year Per year
Powered down ~3 26 €5,55
Ubuntu running ~29 254 €53,60
VDR running, no client ~31 271 €57,29
Watching SD channel ~36 315 €66,53

Assuming an average of 21,1 cent per kWh

Software

Goal

  • Open source
  • Repositories, only compilation when really necessary
  • User friendly
  • Recent, stable, supported, actively developed software

Guide

  • Install Ubuntu Karmic Koala 32 bit (use CD or unetbootin)
  • Pin kernel 2.6.31-14 (see issues)
    • sudo gedit /etc/apt/preferences
      • Package: linux-generic linux-headers-generic linux-image-generic
      • Pin: version 2.6.31-14
      • Pin-Priority: 1001
  • Setup network (wireless or wired)
  • Install NVIDIA driver
    • System | Administration | Hardware Drivers: Activate
  • To prevent tearing
    • System | Preferences | Appearance: Visual Effects: None
  • Install TeVii S660 driver
    • sudo apt-get install unrar
    • Download and extract to home folder
    • cd linux_tevii_ds3000
    • sudo -s
    • cp *.fw /lib/firmware
    • tar xjvf linux-tevii-ds3000.tar.bz2
    • cd linux-tevii-ds3000
    • make -j2
    • make install
    • Cycle power
    • dmesg | grep dvb
      • Check TEVII S660 DVBS2 USB2.0 successfully initialized and connected
    • The V4L-DVB device drivers contain almost the same code
    • Redo when new kernel
  • Install newcs card server
  • Install softcam sasc-ng
    • sudo apt-get install linux-headers-`uname -r` build-essential mercurial openssl libssl-dev gettext
    • cd ~
    • hg clone http://85.17.209.13:6100/sc (bleeding edge!)
    • cd sc
    • gedit Makefile
      • Find and remove -O3 from CSAFLAGS
    • cd ~/sc/contrib/sasc-ng
    • chmod +x configure
    • chmod +x ./dvbloopback/module/config_dvb.pl
    • ./configure --dvb-dir=~/linux_tevii_ds3000/linux-tevii-ds3000
    • make
    • make module
    • sudo -s
    • cp sasc-ng /usr/bin
    • mkdir /lib/modules/`uname -r`/misc
    • /usr/bin/install dvbloopback.ko /lib/modules/`uname -r`/misc/
    • depmod
    • modprobe dvbloopback
    • ls /dev/dvb
      • Check adapter1 (assuming one tuner)
    • mkdir /etc/sc
    • cp cardclient.conf /etc/sc
    • When FTDI bug is fixed: cp cardslot.conf /etc/sc
    • Redo when new kernel
  • Create card server / softcam startup script
    • Download script
    • sudo -s
    • cp sc /etc/init.d
    • update-rc.d sc defaults 19
    • /etc/init.d/sc start
  • Install CIR receiver driver
    • Download and install
    • Remote control configuration
      • 1st config: None, None
      • 2nd config: Nuvotron Transceivers/Remotes, None
    • Redo when new kernel (because it is a patch actually)
  • Install VDR
    • deb http://ppa.launchpad.net/the-vdr-team/vdr-ubuntu-karmic/ubuntu karmic main
      • System | Administration | Software Sources, Other
    • sudo -s
    • apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6CF20474
    • apt-get install vdr vdr-plugin-xineliboutput xineliboutput-sxfe
    • gedit /etc/default/vdr
      • OPTIONS="-w 60 -D 1 --lirc=/dev/null"
    • More than one LNB
      • gedit /etc/vdr/diseqc.conf  (Astra 19E2/23E5)
      • gedit /var/lib/vdr/setup.conf (create file)
        • DiSEqC = 1
    • gedit /var/lib/vdr/setup.conf (create file)
      • UpdateChannels = 0
    • Download channels.conf (syntax)
      • grep -v ':-' channels.conf | grep 'CANALDIGITAAL' >/var/lib/vdr/channels.conf
      • grep -v ':-' channels.conf | grep -v 'CANALDIGITAAL' >>/var/lib/vdr/channels.conf
    • Or scan channels
      • sudo apt-get install w-scan
      • sudo /etc/init.d/sc stop
      • w_scan -fs -sS19E2 -o7 -D0c >channels.conf
      • w_scan -fs -sS23E5 -o7 -D1c >>channels.conf
      • sudo /etc/init.d/sc start
      • Make channels FTA:
        • awk -F: '{if ($1 == "" ) print $0 ; else \
        • print $1":"$2":"$3":"$4":"$5":"$6":"$7":"$8":0:"$10":"$11":"$12":"$13}'  \
        • channels.conf >>/var/lib/vdr/channels.conf
    • cp remote.conf /var/lib/vdr (info)
    • sudo /etc/init.d/vdr start
      • Check /var/log/user.log
    • Optional: apt-get install vdr-plugin-femon vdr-plugin-eepg
  • Update Ubuntu
    • System | Administration | Update Manager
  • Watch
    • Disable screen saver
      • System | Preferences | Screensaver: Active ...: Never
      • System | Preferences | Power Management -> Display: Never
    • Dowload vdr-sxfe.sh to home folder
      • System | Preferences | Startup Applications: Add
      • Command: browse to vdr-sxfe.sh
    • Alternative
      • Put .lircrc in the home folder
      • Add irexec -d to startup applications
      • Start/stop vdr-sxfe using Enter/Clear on the remote control
      • Easy when vdr-sxfe crashes

Issues

  • FTDI bug
    • Linux kernel must be pinned
    • newcs is needed to read smartcard, which it sometimes fails to do at startup
  • Communication sasc-ng/newcs sometimes fails
  • Zap time encrypted channels >= 5 sec
  • The German FTA HD channels work, but NederlandHD has only sound sofar
  • No official repositories, some compilation necessary
  • I have to set the listed frequencies about 25 MHz lower to get signal. This is annoying, because scanning channels does not work properly. The cause is most probably the TeVii S660 device, since using Windows doesn't make any difference (assuming the drivers are different) and because my LNB has been replaced in the meantime. My local supplier will replace the device when it is restocked (probably within a week).
  • The fans of the Asrock are little noisy, however the high pitch can be canceled:

To remove the heatsinks the motherboard has to be removed (four screws and some cables).

Questions

  • Does anybody know how to compile vdr-plugin-sc without compiling vdr too?
    • Without getting the message below when starting vdr
      • WARNING: The following plugins have been left out due to really binary incompatibility: sc.

Links

VN:F [1.8.5_1061]
Rating: +1 (from 1 vote)

26 Responses to “Ubuntu HTPC with satellite TV”

  1. mattia says:

    We need request:
    “Long story short, I got the debian source package for vdr-plugin-opensc from mirak’s ppa https://launchpad.net/~mirak-mirak/+archive/ppa , then changed the vdr-sc source inside with hg clone from current source, then applied some patches to the Makefile in order to build successfully and finally build the packages with dpkg-buildpackage.

    I might put up a detailed guide if more people are interested in this.”

    From dvbn forum http://tinyurl.com/yffdvqg

    I use his vdr-plugin-opensc and work fine:
    http://tinyurl.com/yfjmclr

  2. mark says:

    Is this working on 2.6.31-17-generic?

    I have mythbuntu installed on an acer revo but I’m getting errors.

    [ 276.540026] usb 1-6: new high speed USB device using ehci_hcd and address 98
    [ 276.673440] usb 1-6: configuration #1 chosen from 1 choice
    [ 276.673752] dvb-usb: found a 'TEVII S660 DVBS2 USB2.0' in cold state, will try to load a firmware
    [ 276.673765] usb 1-6: firmware: requesting dvb-usb-teviis660.fw
    [ 276.698362] dvb-usb: downloading firmware from file 'dvb-usb-teviis660.fw'
    [ 276.698376] usb 1-6: firmware: requesting dvb-usb-teviis660.fw
    [ 276.711401] teviis660: start downloading TEVIIS660 firmware
    [ 276.748553] teviis660: error while transferring firmware
    [ 276.748566] teviis660: could not restart the USB controller CPU.
    [ 276.748573] teviis660: could not restart the USB controller CPU.
    [ 277.189266] usb 1-6: USB disconnect, address 98

    In syslog:

    teviis660: error while transferring firmware
    teviis660: could not restart the USB controller CPU.

    Help!

    • Marcel says:

      Is this working on 2.6.31-17-generic?

      Yes, if you compile the driver for this kernel. I tried a lot of 2.6.31 kernels getting the FTDI driver to work, so I am quite sure about this.

      error while transferring firmware

      This seems a hardware (device, setup, driver, etc) problem to me. Maybe you can try to connect the TeVii device to another USB port and see if the problem remains.

      The log should continue with something like this:

      [    9.189676] teviis660: start downloading TEVIIS660 firmware
      [    9.312042] dvb-usb: found a 'TEVII S660 DVBS2 USB2.0' in warm state.
      [    9.312160] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
      [    9.312427] DVB: registering new adapter (TEVII S660 DVBS2 USB2.0)
      [    9.452744] dvb-usb: MAC address: 00:ff:ff:ff:ff:ff
      [    9.816784] DS3000 chip version: 0.192 attached.
      [    9.816792] S660: DS3000 attached.
      [    9.816802] DVB: registering adapter 0 frontend 0 (Montage Technology DS3000/TS2020)...
      [    9.819464] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:04.1/usb1/1-5/input/input6
      [    9.819600] dvb-usb: schedule remote query interval to 150 msecs.
      [    9.819613] dvb-usb: TEVII S660 DVBS2 USB2.0 successfully initialized and connected.
      [    9.819685] usbcore: registered new interface driver teviis660
      • mark says:

        Thanks Marcel. I have tried all ports without success.
        dmesg now shows

        [ 3954.416039] usb 1-6: new high speed USB device using ehci_hcd and address 89
        [ 3954.548757] usb 1-6: configuration #1 chosen from 1 choice
        [ 3954.549635] dvb-usb: found a 'TEVII S660 DVBS2 USB2.0' in cold state, will tr
        y to load a firmware
        [ 3954.549651] usb 1-6: firmware: requesting dvb-usb-teviis660.fw
        [ 3954.562172] dvb-usb: downloading firmware from file 'dvb-usb-teviis660.fw'
        [ 3954.562186] usb 1-6: firmware: requesting dvb-usb-teviis660.fw
        [ 3954.579926] teviis660: start downloading TEVIIS660 firmware
        [ 3954.709614] dvb-usb: found a 'TEVII S660 DVBS2 USB2.0' in warm state.
        [ 3954.709747] dvb-usb: will pass the complete MPEG2 transport stream to the sof
        tware demuxer.
        [ 3954.740416] DVB: registering new adapter (TEVII S660 DVBS2 USB2.0)
        [ 3954.804346] teviis660: read eeprom failed
        [ 3954.804358] dvb-usb: MAC address reading failed.
        [ 3954.891450] Invalid probe, probably not a DS3000 device
        [ 3954.891770] dvb-usb: no frontend was attached by 'TEVII S660 DVBS2 USB2.0'
        [ 3954.956794] input: IR-receiver inside an USB DVB receiver as /devices/pci0000
        :00/0000:00:04.1/usb1/1-6/input/input1248
        [ 3954.956911] dvb-usb: schedule remote query interval to 150 msecs.
        [ 3954.956922] dvb-usb: TEVII S660 DVBS2 USB2.0 successfully initialized and con
        nected.
        [ 3954.957030] usb 1-6: USB disconnect, address 89
        [ 3955.001046] dvb-usb: TEVII S660 DVBS2 USB2.0 successfully deinitialized and d
        isconnected.

        I haven’t done the pinning for my kernel (2.6.31-17). Is that required?

        • Marcel says:

          It seems to me that the firmware is loaded now: “found a ‘…’ in warm state”, but communication with the device fails: “read eeprom failed” and “MAC address reading failed”, so you have to consider that the device is not functioning properly, although it still could be a communication problem, related to the USB bus or driver.

          Maybe it is best to try if the device initializes correctly using another PC.

          Pinning the kernel is required for newcs only.

  3. Marco says:

    regarding your zapping times, you should tryout tvheadend + cccam, i have zapping times lower than 1sec with this combination on encrypted channels!

  4. Ed says:

    Does anybody know how to compile vdr-plugin-opensc without compiling vdr too?

    I have read somewhere that you should make a softlink in the sc directory to your vdr’s Make.config, i.e.

    cd /usr/local/src/vdr/PLUGINS/src
    ln -s /usr/include/vdr/Make.config
    make

    I haven’t tested this myself since I compile both vdr and vdr-sc; this used to work up until vdr 1.7.10 but for some reason I’m now getting this same “binary incompatibility” error too with vdr 1.7.11 :(

    • Marcel says:

      Thanks for sharing this, I will try to do it this way and report back.

      • Ed says:

        To reply to myself: I checked my system but don’t see any /usr/include/vdr in the ppa files from the-vdr-team. I think that there have been other (rpm?) vdr packages in the past which did contain these include files but that the the-vdr-team does not supply this…

        • Ed says:

          Finally I have found the solution (on a German forum)! Do following as user root:

          apt-get build-dep vdr
          cd /usr/local/src
          apt-get source vdr
          cd vdr-1.7.10
          dpatch apply-all
          cd PLUGINS/src/
          rm -rvf ./*
          hg clone http://85.17.209.13:6100/sc
          cd ../../
          make plugins
          cd PLUGINS/lib/
          sudo cp ./* /usr/lib/vdr/plugins/
          • Marcel says:

            Thanks for sharing! I will try it coming weekend and update the guide if it works.

            Could you please post the link to the German forum too?

          • Ed says:

            The link is http://www.4freeboard.to/board/thread.php?postid=225726#post225726

            ps: just recently there is a distribution which contains vdr+xbmc by default, see http://yavdr.org/ which should make installing a linux-based htpc much easier than ever!

          • Leechguy says:

            Here is a manual (in Dutch) for compiling the vdr-plugin-sc: http://www.sat4all.com/forums/ubbthreads.php/topics/1791405/Re_yaVDR_distributie_ervaringe#Post1791405

            I also use the ppa repositories of The-VDR-Team.

          • Marcel says:

            @Leechguy: thanks!

            Will this work for the sources from the hg repository too?

          • Leechguy says:

            Yes, it pulls the source from the hg repositor. Most of the info came from the 4freeboard.to forum. I cannot lookup the exact URL due to te fact that it is being blocked by my corporate proxy.

          • Leechguy says:

            Here’s the exact URL from where I got most of the info (it’s in German): http://www.4freeboard.to/board/thread.php?postid=225247#post225247

            Since you are using an Intel Atom processor, you should should probably use his 01_Makefile-MAXCAID.dpatch file. I’m using an AMD Athlon X2 and made some optimizations for that architecture. The debian/rules file is the same if I remember correctly.

          • Marcel says:

            Still no success:

            @Ed: Still getting “WARNING: The following plugins have been left out due to really binary incompatibility: sc.”

            @Leechguy: Where can I download vdr-plugin-sc_0.9.x-hg2-template.tar.bz2?

          • Ed says:

            The combination vdr 1.7.10 + vdr-sc I managed to get working as mentioned above.
            The combination vdr 1.7.11 + vdr-sc however not entirely: I think that there is something which needs to be adapted in the plugin loader script, because I got this same error too.

            But when I started vdr directly in the shell instead as a service like this
            $ vdr -P sc
            I got it working. Unfortunately I don’t have vdr anymore on my pc so I can’t check anything anymore: I replaced vdr with tvheadend and got this working within an hour :)

            ps: smartcard updates in Tvheadend do work but only for Conax which I currently have (DVB-T digitenne)

  5. Wouter Smaal says:

    Interesting…
    - CPU frequency Atom? (TeVii S660 DVB-S2 requirements 2.0GHz CPU (2.4GHz for HDTV)
    - CPU load encrypted channels?

    • Marcel says:

      - CPU frequency Atom? (TeVii S660 DVB-S2 requirements 2.0GHz CPU (2.4GHz for HDTV)

      Not overclocked: 1.6 Ghz. The requirements of TeVii are based on the CPU doing all the work, but in this case the GPU is helping significantly.

      - CPU load encrypted channels?

      Watching SD/encrypted:

      HTPC top

  6. John Locke says:

    Can you use CCcam with this?
    And does it play the 720p sat channels without stuttering?
    What was the total amount of money you spent on this?

    Thanks!

    • Marcel says:

      Can you use CCcam with this?

      Yes, put something like this in your cardclient.conf:

      cccam2:[ip-address]:[port-number]:[emm]/[caid]/[mask]:[user-name]:[password]

      And does it play the 720p sat channels without stuttering?

      Yes, on my HD ready TV (1360×768), but I haven’t tried encrypted channels yet (I don’t expect problems)

      What was the total amount of money you spent on this?

      With Blu-ray, without satellite dish and subscription, about €495
      Without Blu-ray it will be about €80 less

Leave a Reply

(required)

(required)

Bear