UPDATE (2016/03/21): A lot of the links and instructions in this post are no longer valid/working. I recommend using a newer version of Linux (CentOS or Ubuntu), and the latest drivers from the TBS website (http://www.tbsdtv.com/download/)
This is my first post in a number of posts I will be making detailing how I’ve got the (Almost!) perfect TV Server & Client setup for my house.
In order to make a TV server, you will need some form of tuner. As I’m a paying Sky customer, I’ve chosen to purchase 2x TBS6981 DVB-S2 Dual Tuners. These are currently priced at about £89, which is a good deal.
The cards are low-profile cards, but come with a bracket in order to fit them in larger cases. I’ve decided to put mine in my HP Microserver (which I blogged about here).
Without going into too much detail on the spec of the cards, they are pretty meaty.
Being a dual tuner card, it requires two drops from the satellite LNB (you need to run one cable for each input on the card. Don’t use splitters!)
As I have two cards, I needed to run 4 cables direct from the LNB on the satellite. If you only have a standard dual-lnb, or you’ve filled up all the slots on your quad-LNB, you will need to purchase either a bigger LNB, or a bracket to mount two quad-LNB’s on the same dish. You don’t need to go buying a bigger dish yet!
The cards will churn out both DVB-S (SDTV) and DVB-S2 (HDTV), which is great if you’ve got Movies or Sports in HD.
Each tuner can be tuned to one multiplex at a time, which is different to a channel. Multiplexes contain multiple channels. For example the BBC multiplex contains BBC One, BBC Two, BBC Three (and CBBC), BBC Four (and CBeebies), BBC News and BBC Parliament.
When you change a channel, you are in fact changing a filter to filter out the channels you don’t want to see in the multiplex. So even when you are viewing BBC One, your box is in fact viewing all the BBC channels and just filtering out everything but the data for BBC One. This is great, because we can ‘exploit’ this to watch/record/stream more than one channel at a time on one tuner, leaving the other tuners free for someone/something else to use.
You can view all the mutiplexes and more information at Lyngsat. For Freesat/Sky UK we most commonly use the Astra satellite cluster at 28.2E (East). Details for all the 28.2E multiplexes are located here.
Now that we understand a little bit about multiplexing channels, we can get going on the installation.
Firstly, You will need a basic Ubuntu install. I’ve chosen 11.04 x86_64 with the 2.6.38-8-generic kernel. This is mainly because I had problems getting the TBS drivers to install on the 3.x kernel (which is shipped with anything higher!), and anything less than 2.6.32 will cause more issues with the drivers. It’s worth pointing out that you can do this on a 32bit install, but I’ve not tried it, and therefore I don’t know how stable the drivers are.
Ubuntu installation instructions are out of the scope of this tutorial. You need to visit the Ubuntu website if you need help with that.
After you’ve got that installed, it’s worth making sure everything is up-to-date with APT.
sudo apt-get update sudo apt-get upgrade sudo apt-get install linux-headers-$(uname -r) sudo apt-get install build-essential checkinstall gcc
Install updates and reboot as required.
Next we need to download the required drivers from the TBS website. TBS have provided pretty stable linux drivers for all of their products. While sometimes they have issues on certain kernel levels, the TBS team do tend to quickly provided updates and patches to their drivers for both Windows and Linux. For a full list of drivers, check them out here.
For the TBS 6981, open a terminal and type the following:
sudo su - cd ~ wget http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120604.zip unzip tbs-linux-drivers_v120604.zip
Now we have all the drivers downloaded and unzipped, we need to do something with the files.
First, we need to get the files we need for this card. As these are generic Linux drivers, they contain installation files for most of the other TBS cards. We only need a few files, so lets enter this into your terminal:
mkdir tbs cp linux-tbs-drivers.tar.bz2 tbs/ cp szap-s2.tar.bz2 tbs/ cp scan-s2.tar.bz2 tbs/ cp astra_szap-s2.conf tbs/ cp astra_scan-s2.conf tbs/ cp v4l-cx23885-avcore-01.fw tbs/ cd tbs
Now we have the required TBS drivers in a folder called tbs, located in the users home directory. If you are root, we are in /root/tbs. For normal users, we are in /home/username/tbs.
We now need to extract some of the archives we’ve just moved, in order to see the goodies inside:
tar xjvf linux-tbs-drivers.tar.bz2 cd linux-tbs-drivers
For the X86_64 version, we need to do:
This kicks off the configuration for the installation.
Then we need to build and install the drivers (This might take a while):
make make install
Now we need to install a few tools and testing packages:
cd ~/tbs tar xjvf szap-s2.tar.bz2 cd szap-s2 make make install
And a few more:
cd ~/tbs tar xjvf scan-s2.tar.bz2 cd scan-s2 make make install
After everything is installed, and we have no error messages, we need to reboot for the drivers to be loaded.
shutdown -r now
After reboot, check that the drivers have been loaded correctly by issuing the following into a terminal:
dmesg | grep frontend
You want to get back this, which confirms the drivers are working:
DVB: registering adapter 0 frontend 0 (TurboSight TBS 6981 DVBS/S2 frontend)... DVB: registering adapter 1 frontend 0 (TurboSight TBS 6981 DVBS/S2 frontend)...
Now, if you’ve got your card linked up to a satellite, we can test the signal and locking.
First, create a new file in ~ called zaptest.conf, and insert the following:
Ch1:10123:H:0:1:2:0:0 Ch2:10234:V:1:3:4:0:0 Ch3:10345:H:2:5:6:0:0 Ch4:10456:V:3:7:7:0:0
Then, run the following command:
szap-s2 -p -H -r -a 0 -c zaptest.conf
This will use the szap-s2 application we installed earlier, to run a test on the values in zapfile.conf using adapter 0 on the TBS card.
If all is good, you will be able to see a signal percentage and ‘FE_HAS_LOCK’ at the end of the final line for each channel.
Job Done. You now have a working satellite tuner. Next, you will need to hook this up to some form of viewer or TV server backend. My next tutorial will feature the TBS 6981 running with TVHeadend.