TBS5980 (aka TBS Qbox CI): Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
m (→‎For Linux with ARM CPU in Raspberry PI: add Check that you can redirect and play sound and video stream TV channel from your raspberry pi to a computer)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:Qbox red.jpg|thumb|The Qbox CI switched on. The CAM module has not been inserted.]]
The Qbox DVB-S2 CI USB2.0, as the name suggests, is a [[DVB-S2]] [[DVB-S2_USB_Devices|USB 2.0]] adapter from [http://www.tbsdtv.com/ TurboSight]. It has been on the market since early 2011. The company has no distribution network, but their products can be ordered online. Shipping of my device to Western Europe took less than three days.


The Qbox DVB-S2 CI is supported under Linux. The minimum required kernel version is (yet) unknown, the driver requires DVB version 5.1.
The '''Qbox DVB-S2 CI USB2.0''' is a [[DVB-S2]] [[USB 2.0]] adapter from [[TurboSight]]. It has been on the market since early 2011, and is supported under Linux. The minimum required kernel version is (yet) unknown, the driver requires DVB version 5.1.


While TurboSight has no distribution network, their products can be ordered online.
[[Image:Qbox_red.jpg|right|thumb|200px|The Qbox CI switched on. The CAM module has not been inserted]]

==Overview/Features==


==Overview/features==
* USB 2.0 interface (B-connector)
* USB 2.0 interface (B-connector)
* Inputs: Antenna (F-connector), remote and CI-slot
* Inputs: Antenna (F-connector), remote and CI-slot
Line 13: Line 12:
* CCM mode support ONLY (NO support for VCM and ACM modes used by a lot of DVB-S2 multistream Free TV channels with Eutelsat 5 West A (5°W) satellite)
* CCM mode support ONLY (NO support for VCM and ACM modes used by a lot of DVB-S2 multistream Free TV channels with Eutelsat 5 West A (5°W) satellite)


===Components Used===
===Components used===
* [[STMicroelectronics STB6100]] (tuner)
* [[STMicroelectronics STB6100]] (tuner)
* [[STMicroelectronics STV0903]] (demodulator)
* [[STMicroelectronics STV0903]] (demodulator)
* [[Cypress EZ-USB FX2]] CY7C68013A (USB 2.0 interface chipset)
* [[Cypress EZ-USB FX2]] CY7C68013A (USB 2.0 interface chipset)


===Other Images===
===Otherimages===
<gallery perrow=4>
<gallery >
Image:Qbox_blue.jpg|Qbox with LED turned blue
File:Qbox blue.jpg|Qbox with LED turned blue
Image:Qbox_CAM.jpg|Qbox with astoncrypt CAM
File:Qbox CAM.jpg|Qbox with astoncrypt CAM
Image:Qbox_remote.jpg|Qbox remote control
File:Qbox remote.jpg|Qbox remote control
Image:Qbox_package.jpg|Qbox package
File:Qbox package.jpg|Qbox package
</gallery>
</gallery>


Line 97: Line 96:
(Bus Powered)
(Bus Powered)


==Making it Work==
==Making it work==
The device is actively supported to run under Linux. Every few months the driver gets updated, and the company actively supports users through a forum.
The device is actively supported to run under Linux. Every few months the driver gets updated, and the company actively supports users through a forum.
By downloading, compiling and installing the drivers and firmware, the device works (at least, in my distro, Fedora 14 x86-64). Together with the manufacturer-supplied source code for scanning and zapping (slightly modified versions of scan-s2 and szap-s2) DVB-S2 reception works. Newer versions of szap and scan work just as well.
By downloading, compiling and installing the drivers and firmware, the device works (at least, in my distro, Fedora 14 x86-64). Together with the manufacturer-supplied source code for scanning and zapping (slightly modified versions of scan-s2 and szap-s2) DVB-S2 reception works. Newer versions of szap and scan work just as well.
Line 106: Line 105:
===Drivers===
===Drivers===


==== For linux with x86 or X86-64 CPU ====
==== For Linux with x86 or X86-64 CPU ====
Available [http://www.tbsdtv.com/download/ here] from TBS website. Look for the TBS5980 driver. Latest update: 29/12/2015. Apart from the firmware file, there is no closed-source object code included in the software. All code has been released under GPLv2.
Available [http://www.tbsdtv.com/download/ here] from TBS website. Look for the TBS5980 driver. Latest update: 29/12/2015. Apart from the firmware file, there is no closed-source object code included in the software. All code has been released under GPLv2.


Line 112: Line 111:


==== For Linux with ARM CPU in Raspberry PI ====
==== For Linux with ARM CPU in Raspberry PI ====
'''WARNING : THIS INSTALLATION PROCESS IS A DRAFT, IT IS NOT FINISHED YET. THIS WARNING MESSAGE WILL BE REMOVED WHEN THE INSTALLATION PROCESS WILL BE FULL'''

'''WARNING : THIS INSTALLATION PROCESS IS A DRAFT, IT IS NOT FINISH YET. THIS WARNING MESSAGE WILL BE REMOVE WHEN THE INSTALLATION PROCESS WILL BE FULL'''


The open source driver is available [https://github.com/ljalves/linux_media/wiki here].
The open source driver is available [https://github.com/ljalves/linux_media/wiki here].
Line 120: Line 118:
You mustn't use the remote control because it use a lot of of CPU power.
You mustn't use the remote control because it use a lot of of CPU power.


=====Building the Open Source Driver=====
=====Building the open-source driver=====

These instructions are taken from [http://www.satelliteguys.us/xen/threads/hobbyist-open-source-satellite-receiver-raspberry-pi-2-instructions-and-tips.348466/#post-3652518 satelliteguys.us forum] and [https://www.raspberrypi.org/documentation/linux/kernel/building.md Raspberry PI official website]:
These instructions are taken from [http://www.satelliteguys.us/xen/threads/hobbyist-open-source-satellite-receiver-raspberry-pi-2-instructions-and-tips.348466/#post-3652518 satelliteguys.us forum] and [https://www.raspberrypi.org/documentation/linux/kernel/building.md Raspberry PI official website]:


Compilation and Installation process with : <BR>
Compilation and Installation process with : <BR>
-Hardware : Raspberry Pi 2 <BR>
-Hardware : Raspberry Pi 2 <BR>
-Operating System : Raspbian in NOOBS Version 1.9.1 Full and with the Release date: 2016-05-10 <BR>
-Operating System : Raspbian in NOOBS Version 2.1.0 Full and with the Release date: 2016-11-29 <BR>
<BR>
<BR>


* Check your Linux kernel release :
* Check your Linux kernel release :
uname -r
uname -r
4.4.9-v7+
4.4.38-v7+
Note the major and minor kernel release number, here 4.4.
Note the major and minor kernel release number, here 4.4.


Line 152: Line 149:
Note you must get the kernel sources for raspberry pi with the same release number than the release number in the output of the previously used uname command, here 4.4 for the file rpi-4.4.y.tar.gz.
Note you must get the kernel sources for raspberry pi with the same release number than the release number in the output of the previously used uname command, here 4.4 for the file rpi-4.4.y.tar.gz.
sudo su - root
sudo su - root
ls /etc/modprobe.d/
fbdev-blacklist.conf ipv6.conf libpisock9.conf raspi-blacklist.conf
cd /usr/src
cd /usr/src
wget https://github.com/raspberrypi/linux/archive/rpi-4.4.y.tar.gz
wget https://github.com/raspberrypi/linux/archive/rpi-4.4.y.tar.gz
Line 167: Line 162:
Note 2 : As of 6/6/2016, tbs-qbox2ci.c and tbs-qbox2ci.h files, for the TBS 5980 driver, are only available in /root/media/drivers/ from https://github.com/ljalves/linux_media.git repositories.
Note 2 : As of 6/6/2016, tbs-qbox2ci.c and tbs-qbox2ci.h files, for the TBS 5980 driver, are only available in /root/media/drivers/ from https://github.com/ljalves/linux_media.git repositories.
cp /root/media/drivers/media/dvb-frontends/stv6110x.c /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv6110x.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv6110x_priv.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv6110x_reg.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
.
.
'''MANDATORY'''
cp /root/media/drivers/media/dvb-frontends/stv090x.c /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv090x.c /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv090x.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv090x.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends

'''OPTIONNAL'''
cp /root/media/drivers/media/dvb-frontends/stv090x_priv.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv090x_priv.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv090x_reg.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv090x_reg.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
Line 182: Line 176:
cp /root/media/drivers/media/dvb-frontends/stb6100_cfg.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stb6100_cfg.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
.
.
cp /root/media/drivers/media/dvb-frontends/stv6110x.c /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv6110x.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv6110x_priv.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv6110x_reg.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/usb/dvb-usb/technisat-usb2.c /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb
cp /root/media/drivers/media/usb/dvb-usb/technisat-usb2.c /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb
.
.
'''MANDATORY'''
cp /root/media/drivers/media/usb/dvb-usb/tbs-qbox2ci.c /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb
cp /root/media/drivers/media/usb/dvb-usb/tbs-qbox2ci.c /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb
cp /root/media/drivers/media/usb/dvb-usb/tbs-qbox2ci.h /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb
cp /root/media/drivers/media/usb/dvb-usb/tbs-qbox2ci.h /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb
Line 204: Line 203:
.
.
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/tbs-qbox2ci.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/tbs-qbox2ci.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/tbs-qbox2ci.ko
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-tbsqbox2ci.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/tbs-qbox2ci.mod.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-tbsqbox2ci.ko
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/tbs-qbox2ci.mod.c
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-tbsqbox2ci.mod.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-tbsqbox2ci.mod.c
.
.
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/technisat-usb2.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/technisat-usb2.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/technisat-usb2.ko
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/technisat-usb2.mod.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.ko
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/technisat-usb2.mod.c
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.mod.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.mod.c
* Patching the kernel source code :

There are 3 patchs to apply to fix several problems.

'''Patch 1''' :
To avoid the following error :
CC [M] drivers/media/dvb-frontends/stv090x.o
drivers/media/dvb-frontends/stv090x.c:3738:54: error: unknown type name ‘fe_sec_tone_mode_t’
static int stv090x_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
^
drivers/media/dvb-frontends/stv090x.c:3828:63: error: unknown type name ‘fe_sec_mini_cmd_t’
static int stv090x_send_diseqc_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t burst)
^
drivers/media/dvb-frontends/stv090x.c:4920:24: error: ‘stv090x_send_diseqc_burst’ undeclared here (not in a function)
.diseqc_send_burst = stv090x_send_diseqc_burst,
^
drivers/media/dvb-frontends/stv090x.c:4922:16: error: ‘stv090x_set_tone’ undeclared here (not in a function)
.set_tone = stv090x_set_tone,
^
drivers/media/dvb-frontends/stv090x.c: In function ‘stv090x_attach’:
drivers/media/dvb-frontends/stv090x.c:4991:3: error: implicit declaration of function ‘stv090x_send_diseqc_burst’ [-Werror=implicit-function-declaration]
stv090x_send_diseqc_burst(&state->frontend, SEC_MINI_A);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:264: recipe for target 'drivers/media/dvb-frontends/stv090x.o' failed

In the file media/drivers/media/dvb-frontends/stv090x.c , you must replace
the line 3735
static int stv090x_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
by
static int stv090x_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone)
and the line 3825
static int stv090x_send_diseqc_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t burst)
by
static int stv090x_send_diseqc_burst(struct dvb_frontend *fe, enum fe_sec_mini_cmd burst)

or if you to use the command patch :
# diff -Naur /opt/raspberry-kernel/media/drivers/media/dvb-frontends/stv090x.c drivers/media/dvb-frontends/stv090x.c
--- /opt/raspberry-kernel/media/drivers/media/dvb-frontends/stv090x.c 2016-06-03 21:27:46.089160190 +0200
+++ drivers/media/dvb-frontends/stv090x.c 2016-06-06 20:50:22.982381627 +0200
@@ -3735,7 +3735,7 @@
return 0;
}
-static int stv090x_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
+static int stv090x_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone)
{
struct stv090x_state *state = fe->demodulator_priv;
u32 reg;
@@ -3825,7 +3825,7 @@
return -1;
}
-static int stv090x_send_diseqc_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t burst)
+static int stv090x_send_diseqc_burst(struct dvb_frontend *fe, enum fe_sec_mini_cmd burst)
{
struct stv090x_state *state = fe->demodulator_priv;
u32 reg, idle = 0, fifo_full = 1;


'''Patch 2''' :
To avoid the following error :
CC [M] drivers/media/usb/dvb-usb/technisat-usb2.o
drivers/media/usb/dvb-usb/technisat-usb2.c:456:3: error: unknown type name ‘fe_sec_voltage_t’
fe_sec_voltage_t voltage)
^
drivers/media/usb/dvb-usb/technisat-usb2.c: In function ‘technisat_usb2_frontend_attach’:
drivers/media/usb/dvb-usb/technisat-usb2.c:554:40: error: ‘technisat_usb2_set_voltage’ undeclared (first use in this function)
a->fe_adap[0].fe->ops.set_voltage = technisat_usb2_set_voltage;
^
drivers/media/usb/dvb-usb/technisat-usb2.c:554:40: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:258: recipe for target 'drivers/media/usb/dvb-usb/technisat-usb2.o' failed
make[4]: *** [drivers/media/usb/dvb-usb/technisat-usb2.o] Error 1
scripts/Makefile.build:403: recipe for target 'drivers/media/usb/dvb-usb' failed

In the file drivers/media/usb/dvb-usb/technisat-usb2.c , you must replace
the line 456
fe_sec_voltage_t voltage)
by
enum fe_sec_voltage voltage)

'''Patch 3''' :
To avoid the following error :
CC [M] drivers/media/usb/dvb-usb/tbs-qbox2ci.o
drivers/media/usb/dvb-usb/tbs-qbox2ci.c:504:2: error: unknown field ‘set_lock_led’ specified in initializer
.set_lock_led = tbsqbox2ci_led_ctrl,
^
drivers/media/usb/dvb-usb/tbs-qbox2ci.c:504:2: warning: initialization from incompatible pointer type
drivers/media/usb/dvb-usb/tbs-qbox2ci.c:504:2: warning: (near initialization for ‘earda_config.tuner_set_bbgain’)
drivers/media/usb/dvb-usb/tbs-qbox2ci.c:559:7: error: unknown type name ‘fe_sec_voltage_t’
fe_sec_voltage_t voltage)
^
drivers/media/usb/dvb-usb/tbs-qbox2ci.c: In function ‘tbsqbox2ci_frontend_attach’:
drivers/media/usb/dvb-usb/tbs-qbox2ci.c:591:38: error: ‘tbsqbox2ci_set_voltage’ undeclared (first use in this function)
d->fe_adap->fe->ops.set_voltage = tbsqbox2ci_set_voltage;
^
drivers/media/usb/dvb-usb/tbs-qbox2ci.c:591:38: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:258: recipe for target 'drivers/media/usb/dvb-usb/tbs-qbox2ci.o' failed
make[4]: *** [drivers/media/usb/dvb-usb/tbs-qbox2ci.o] Error 1
scripts/Makefile.build:403: recipe for target 'drivers/media/usb/dvb-usb' failed

In the file drivers/media/usb/dvb-usb/tbs-qbox2ci.c , you must replace
the line 559
fe_sec_voltage_t voltage)
by
enum fe_sec_voltage voltage)
* Add information about a new driver in the first configuration file for compiling
* Add information about a new driver in the first configuration file for compiling
Line 351: Line 245:


* Compiling for Raspberry PI 1 with the Raspberry Pi 1 (or Compute Module) Default Build Configuration
* Compiling for Raspberry PI 1 with the Raspberry Pi 1 (or Compute Module) Default Build Configuration
Note : the Pi 1 is maybe more than likely underpowered for this project and maybe the Pi1 probably won't display video properly.
But you can try all the installation steps in this page and verify it. Workaround : if it is to slow with [https://en.wikipedia.org/wiki/Standard-definition_television SD video] in mpeg-2, you can try to buy [http://www.raspberrypi.com/mpeg-2-license-key/ a mpeg-2 licence] to use the GPU hardware to process the video and not the CPU.Mybe it help. This workaround does not work with TV channel with HD video in mpeg-4.More information about video codec in Raspberry Pi : [https://www.raspberrypi.org/blog/new-video-features/ New video features! MPEG-2 and VC-1 decode, H.264 encode, CEC support]
cd /usr/src/linux-rpi-4.4.y
cd /usr/src/linux-rpi-4.4.y
export KERNEL=kernel
export KERNEL=kernel
Line 363: Line 259:


* Save the current headers and modules files :
* Save the current headers and modules files :
mv /lib/modules/4.4.9+ /lib/modules/4.4.9+.bak
mv /lib/modules/4.4.38+ /lib/modules/4.4.38+.bak
mv /lib/modules/4.4.9-v7+ /lib/modules/4.4.9-v7+.bak
mv /lib/modules/4.4.38-v7+ /lib/modules/4.4.38-v7+.bak
make modules
make modules
make modules_install
make modules_install
make headers_install
make headers_install

Now, there is a new folder : /lib/modules/4.4.39-v7

* Check that the TBS5980 kernel modules are build :
ls -l /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv6110x.ko
ls -l /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv090x.ko
ls -l /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stb6100.ko
ls -l /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-tbsqbox2ci.ko
ls -l /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.ko

* Check that the the TBS5980 kernel modules are installed :
ls -l /lib/modules/4.4.39-v7/kernel/drivers/media/dvb-frontends/st*
ls -l /lib/modules/4.4.39-v7/kernel/drivers/media/usb/dvb-usb/dvb-usb-t*


* Select the new kernel with TBS5980 support
* Select the new kernel with TBS5980 support
Make sure you backup your old /boot/kernel.img
Make sure you backup your old /boot/kernel.img
cp -p /boot/kernel7.img /boot/kernel7.img.OK.ORI
cp -p /boot/kernel.img /boot/kernel.img.OK.ORI


cp arch/arm/boot/zImage /boot/kerneltbsci.img
cp arch/arm/boot/zImage /boot/kernel7tbsci.img
nano /boot/config.txt
nano /boot/config.txt
#add the following:
#add the following:
kernel=kerneltbsci.img
kernel=kernel7tbsci.img


* Install the firmware file required by TBS5980 driver
* Install the firmware file required by TBS5980 driver
Line 384: Line 295:
mkdir tbs5980-firmware
mkdir tbs5980-firmware
cd tbs5980-firmware
cd tbs5980-firmware
wget http://www.tbsdtv.com/download/document/common/tbs-linux-sources_v151229.zip
wget http://www.tbsiptv.com/download/tbs5980/tbs-linux-sources_v151229.zip
unzip tbs-linux-sources_v151229.zip
unzip tbs-linux-sources_v151229.zip
cp dvb-usb-tbsqbox-id5980.fw /lib/firmware
cp dvb-usb-tbsqbox-id5980.fw /lib/firmware
Line 390: Line 301:
* Avoid high CPU usage :
* Avoid high CPU usage :
[https://github.com/ljalves/linux_media/wiki/TBS-5922-%28aka-tbs-qbox22%29 source]: In order to avoid a high CPU usage, you should disable the IR receiver:
[https://github.com/ljalves/linux_media/wiki/TBS-5922-%28aka-tbs-qbox22%29 source]: In order to avoid a high CPU usage, you should disable the IR receiver:
In /etc/modprobe.d/options add the line :
ls /etc/modprobe.d/
fbdev-blacklist.conf ipv6.conf libpisock9.conf raspi-blacklist.conf
In the /etc/modprobe.d/dvbir.conf file if this file exist or else in the /etc/modprobe.d/options file, add the line :
options dvb_usb disable_rc_polling=1
options dvb_usb disable_rc_polling=1


* Reboot
* Reboot
shutdown -r now


* Check information about TBS 5980 in kernel log :
* Check information about TBS 5980 in kernel log :
Line 399: Line 313:
dmesg | grep TBS
dmesg | grep TBS


pi@raspberrypi:~ $ dmesg | grep 5980
===Sample Kernel Output===
[ 4.583620] usb 1-1.5: New USB device found, idVendor=734c, idProduct=5980
[ 7.642915] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5980.fw'
[ 9.633822] usb 1-1.5: New USB device found, idVendor=734c, idProduct=5980
[ 9.634891] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5980.fw'

pi@raspberrypi:~ $ dmesg | grep TBS
[ 7.640406] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in cold state, will try to load a firmware
[ 7.642939] tbsqbox2ci: start downloading TBSQBOX2CI firmware
[ 7.763212] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in warm state.
[ 7.764051] DVB: registering new adapter (TBS Qbox DVB-S2 CI USB2.0)
[ 7.833526] dvb-usb: no frontend was attached by 'TBS Qbox DVB-S2 CI USB2.0'
[ 7.834113] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully initialized and connected.
[ 7.896372] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully deinitialized and disconnected.
[ 9.633892] usb 1-1.5: Manufacturer: TBS-Tech
[ 9.634867] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in cold state, will try to load a firmware
[ 9.634903] tbsqbox2ci: start downloading TBSQBOX2CI firmware
[ 9.753254] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in warm state.
[ 9.754186] DVB: registering new adapter (TBS Qbox DVB-S2 CI USB2.0)
[ 10.175674] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully initialized and connected.

pi@raspberrypi:~ $ lsusb
Bus 001 Device 006: ID 734c:5980 TBS Technologies China

pi@raspberrypi:~ $ dmesg
...
[ 114.711225] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[ 114.811756] usb 1-1.5: New USB device found, idVendor=734c, idProduct=5980
[ 114.811786] usb 1-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 115.907717] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in cold state, will try to load a firmware
[ 115.916121] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5980.fw'
[ 115.916153] tbsqbox2ci: start downloading TBSQBOX2CI firmware
[ 116.014215] usb 1-1.5: USB disconnect, device number 5
[ 116.041594] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in warm state.
[ 116.042327] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[ 116.042425] DVB: registering new adapter (TBS Qbox DVB-S2 CI USB2.0)
[ 116.042445] tbsqbox2ci: read eeprom failed.
[ 116.042457] dvb-usb: MAC address reading failed.
[ 116.121869] dvb-usb: no frontend was attached by 'TBS Qbox DVB-S2 CI USB2.0'
[ 116.122418] input: IR-receiver inside an USB DVB receiver as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/input/input0
[ 116.122452] dvb-usb: schedule remote query interval to 450 msecs.
[ 116.122481] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully initialized and connected.
[ 116.122690] usbcore: registered new interface driver tbsqbox2ci
[ 116.174064] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully deinitialized and disconnected.
[ 117.781941] usb 1-1.5: new high-speed USB device number 6 using dwc_otg
[ 117.882880] usb 1-1.5: New USB device found, idVendor=734c, idProduct=5980
[ 117.882913] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 117.882930] usb 1-1.5: Product: DVBS2BOX
[ 117.882946] usb 1-1.5: Manufacturer: TBS-Tech
[ 117.884264] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in cold state, will try to load a firmware
[ 117.884294] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5980.fw'
[ 117.884310] tbsqbox2ci: start downloading TBSQBOX2CI firmware
[ 118.012008] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in warm state.
[ 118.012669] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[ 118.012917] DVB: registering new adapter (TBS Qbox DVB-S2 CI USB2.0)
[ 118.226545] dvb-usb: MAC address: xx:xx:xx:xx:xx:xx (edited by me)
[ 118.358626] tbsqbox2ci: Attached stv0903!

=====Check that your device can receive the satellit TV and Radio transponders=====

* 1) Download the configuration file for your satellit at https://git.linuxtv.org/dtv-scan-tables.git/tree/dvb-s
* 2) Choose and install the scan utility that you want to use, a list is available here : https://www.linuxtv.org/wiki/index.php/Frequency_scan#Comparison_of_DVB_frequency_scanning_commandline_utilities
* 3) Launch the research, here we choose dvbv5-scan utility with Atlantic-Bird-3-5.0W satellit :
dvbv5-scan ./Atlantic-Bird-3-5.0W
or
dvbv5-scan ./Atlantic-Bird-3-5.0W --output=Atlantic-Bird-3-5.0W.conf --output-format=ZAP
The vlc media player can read and use channel configuration file with ZAP format.
* 4) You should have an output like this if it works (here with DVB-T transmitter) :
...
Scanning frequency #2 506166000
Lock (0x1f) Signal= 82.64% C/N= 0.22% UCB= 141 postBER= 0
Service C8, provider NTN: reserved
Service BFM TV, provider NTN: reserved
Service i>TELE, provider NTN: reserved
Service CSTAR, provider NTN: reserved
Service Gulli, provider NTN: reserved
New transponder/channel found: #14: -10
New transponder/channel found: #15: -10
New transponder/channel found: #16: -10
New transponder/channel found: #17: -10
New transponder/channel found: #18: -10
New transponder/channel found: #19: -10
New transponder/channel found: #20: -10
...

=====Check that you can redirect and play sound and video stream TV channel from your raspberry pi to a computer=====

With the utility dvbstream, you can redirect the sound and video stream TV channel from your raspberry pi to a computer and
then use vlc media player to read this tream.<BR>
More information here :<BR>
http://www.linuxcertif.com/man/1/dvbstream/<BR>
https://www.linuxtv.org/wiki/index.php/Dvbstream

=====Build TvHeadEnd for Raspberry Pi with Raspian Pixel=====

Requirements :
sudo apt-get install libssl-dev
sudo apt-get install liburiparser*
sudo apt-get install libiconv-hook1 libiconv-hook-dev
sudo apt-get install dvb-tools libdvbv5-0
sudo apt-get install libavahi-client-dev libavahi-common-dev libdbus-1-dev
sudo apt-get install libavcodec-dev

Compiling and installing :
$ cd
$ mkdir tvheadend
$ cd tvheadend/
$ wget https://github.com/tvheadend/tvheadend/archive/v4.0.9.tar.gz
$ mv v4.0.9.tar.gz tvheadend-v4.0.9.tar.gz
$ tar xzvf tvheadend-v4.0.9.tar.gz
$ cd tvheadend-4.0.9
$ ./configure --prefix=/opt/tvheadend-4.0.9
$ make
$ sudo make install

Launch and configuration :
sudo /opt/tvheadend-4.0.9/bin/tvheadend -C
Go to http://raspberry_pi_ip_address:9981 and configure your device http://wiki.openelec.tv/index.php/Configuring_Tvheadend

===Sample kernel output===
The kernel outputs the information below, CAM module inserted (with module verbosity wide open):
The kernel outputs the information below, CAM module inserted (with module verbosity wide open):
# dmesg
# dmesg
Line 436: Line 469:
options stv090x verbose=3
options stv090x verbose=3


===Remote Control Support===
===Remote control support===
The device comes with a remote, but that has not been tested yet. Tbsdtv forum members complain about poor interoperability with LIRC.
The device comes with a remote, but that has not been tested yet. Tbsdtv forum members complain about poor interoperability with LIRC.

==External Links==
* [http://www.tbsdtv.com/products/tbs5980-dvb-s2-ci-tv-tuner-usb.html TBS5980 QBOX CI DVB-S2 TV Tuner USB product page]
* [http://www.tbsdtv.com/forum/viewforum.php?f=30 USB DVB-S2 CI QBox TBS5980 forum]
* [http://www.tbsdtv.com/forum/viewtopic.php?f=33&t=1420&sid=1e70005dffdd64c48eb40ba61d71cac6 Tested CAMs that work with TBS 5980 (september 2011)]


==Issues==
==Issues==
Line 451: Line 479:
Network support has not been addressed yet.
Network support has not been addressed yet.


==External links==
[[Category:DVB-S2_USB_Devices]]
* [http://www.tbsdtv.com/products/tbs5980-dvb-s2-ci-tv-tuner-usb.html TBS5980 QBOX CI DVB-S2 TV Tuner USB product page]
* [http://www.tbsdtv.com/forum/viewforum.php?f=30 USB DVB-S2 CI QBox TBS5980 forum]
* [http://www.tbsdtv.com/forum/viewtopic.php?f=33&t=1420&sid=1e70005dffdd64c48eb40ba61d71cac6 Tested CAMs that work with TBS 5980 (september 2011)]

[[Category:DVB-S2 USB Devices]]

Latest revision as of 21:12, 9 January 2017

The Qbox CI switched on. The CAM module has not been inserted.

The Qbox DVB-S2 CI USB2.0 is a DVB-S2 USB 2.0 adapter from TurboSight. It has been on the market since early 2011, and is supported under Linux. The minimum required kernel version is (yet) unknown, the driver requires DVB version 5.1.

While TurboSight has no distribution network, their products can be ordered online.

Overview/features

  • USB 2.0 interface (B-connector)
  • Inputs: Antenna (F-connector), remote and CI-slot
  • Separate power supply: 7.5V, 3.5A
  • Indication LED, mostly red, sometimes blue, meaning yet unknown.
  • CCM mode support ONLY (NO support for VCM and ACM modes used by a lot of DVB-S2 multistream Free TV channels with Eutelsat 5 West A (5°W) satellite)

Components used

Otherimages

Identification

lsusb output:

# lsusb -v
Bus 001 Device 009: ID 734c:5980 TBS Technologies China 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x734c TBS Technologies China
  idProduct          0x5980 
  bcdDevice            0.00
  iManufacturer           1 TBS-Tech
  iProduct                2 DVBS2BOX
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

Making it work

The device is actively supported to run under Linux. Every few months the driver gets updated, and the company actively supports users through a forum. By downloading, compiling and installing the drivers and firmware, the device works (at least, in my distro, Fedora 14 x86-64). Together with the manufacturer-supplied source code for scanning and zapping (slightly modified versions of scan-s2 and szap-s2) DVB-S2 reception works. Newer versions of szap and scan work just as well.

Firmware

The driver software package contains the firmware file: dvb-usb-tbsqbox-id5980.fw. Just install it in /lib/firmware.

Drivers

For Linux with x86 or X86-64 CPU

Available here from TBS website. Look for the TBS5980 driver. Latest update: 29/12/2015. Apart from the firmware file, there is no closed-source object code included in the software. All code has been released under GPLv2.

For compiling and installing the Open-source drivers or the Closed-source drivers, see TBS driver installation.

For Linux with ARM CPU in Raspberry PI

WARNING : THIS INSTALLATION PROCESS IS A DRAFT, IT IS NOT FINISHED YET. THIS WARNING MESSAGE WILL BE REMOVED WHEN THE INSTALLATION PROCESS WILL BE FULL

The open source driver is available here. Some instructions above are taken from http://www.satelliteguys.us/xen/threads/hobbyist-open-source-satellite-receiver-raspberry-pi-2-instructions-and-tips.348466/#post-3652518 but a lot of steps for installing and compiling are missing from this link.

You mustn't use the remote control because it use a lot of of CPU power.

Building the open-source driver

These instructions are taken from satelliteguys.us forum and Raspberry PI official website:

Compilation and Installation process with :
-Hardware : Raspberry Pi 2
-Operating System : Raspbian in NOOBS Version 2.1.0 Full and with the Release date: 2016-11-29

  • Check your Linux kernel release :
uname -r
  4.4.38-v7+

Note the major and minor kernel release number, here 4.4.

  • Update the package list available in distro repositories and then update the package installed on your system :
sudo apt-get update
sudo apt-get upgrade
  • Install the packages required to compile the TBS driver for Raspberry PI in his ARM CPU :
sudo apt-get install patchutils
sudo apt-get install bc
sudo apt-get install libncurses5-dev
sudo apt-get install git
sudo cpan Proc::processTable
 CPAN.pm requires configuration, but most of it can be done automatically.
 If you answer 'no' below, you will enter an interactive dialog for each
 configuration option instead.
 Would you like to configure as much as possible automatically? [yes] yes
  • Get the Linux kernel sources for Raspbian and then next the open source TBS driver

Note you must get the kernel sources for raspberry pi with the same release number than the release number in the output of the previously used uname command, here 4.4 for the file rpi-4.4.y.tar.gz.

sudo su - root
cd /usr/src
wget https://github.com/raspberrypi/linux/archive/rpi-4.4.y.tar.gz
tar xzvf rpi-4.4.y.tar.gz
ls /usr/src/linux-rpi-4.4.y
cd /root
git clone --depth=1 https://github.com/ljalves/linux_media.git -b latest ./media
  • Copy driver sources into kernel source directories

Note : As of 6/6/2016, the following files below are the same in /root/media/drivers/ and /usr/src/linux-rpi-4.4.y/drivers folders, except for stv090x.c, stv090x.h . These files in /root/media/drivers/ are patched and have an adding for lock led hooks to the stv090x, stv0288, cx24116 and tda10071 frontends. Similar code already exists in the stv0900 frontend. source code patch.
For the file technisat-usb2.c, the line .count = 4 are replaced by .count = 8.
Note 2 : As of 6/6/2016, tbs-qbox2ci.c and tbs-qbox2ci.h files, for the TBS 5980 driver, are only available in /root/media/drivers/ from https://github.com/ljalves/linux_media.git repositories.

. MANDATORY

cp /root/media/drivers/media/dvb-frontends/stv090x.c /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv090x.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends

OPTIONNAL

cp /root/media/drivers/media/dvb-frontends/stv090x_priv.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv090x_reg.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends

.

cp /root/media/drivers/media/dvb-frontends/stb6100.c /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stb6100.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stb6100_proc.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stb6100_cfg.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends

.

cp /root/media/drivers/media/dvb-frontends/stv6110x.c /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv6110x.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv6110x_priv.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/dvb-frontends/stv6110x_reg.h /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends
cp /root/media/drivers/media/usb/dvb-usb/technisat-usb2.c /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb

. MANDATORY

cp /root/media/drivers/media/usb/dvb-usb/tbs-qbox2ci.c /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb
cp /root/media/drivers/media/usb/dvb-usb/tbs-qbox2ci.h /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb
  • Remove the old modules if they exist so the new ones will get made
rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv6110x.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv6110x.ko
rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv6110x.mod.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv6110x.mod.c

.

rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv090x.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv090x.ko
rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv090x.mod.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv090x.mod.c

.

rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stb6100.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stb6100.ko
rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stb6100.mod.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stb6100.mod.c

.

rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/tbs-qbox2ci.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-tbsqbox2ci.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-tbsqbox2ci.ko
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-tbsqbox2ci.mod.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-tbsqbox2ci.mod.c

.

rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/technisat-usb2.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.ko
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.mod.o
rm /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.mod.c

  • Add information about a new driver in the first configuration file for compiling

Make additions to Makefiles and Kconfigs so system will process the code The <tab> means remove the <tab> and then hit the tab key, you are trying to format the additions to look like whats already there. Same with <2 spaces> Add the following to the /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/Kconfig file at the end

config DVB_USB_TBSQBOX2CI
<tab>tristate "TurboSight QBOX2 CI DVB-S2 USB2.0 support"
<tab>depends on DVB_USB
<tab>select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT
<tab>select DVB_STV090x if MEDIA_SUBDRV_AUTOSELECT
<tab>select DVB_STB6100 if MEDIA_SUBDRV_AUTOSELECT
<tab>help
<tab><2 spaces>Say Y here to support the TurboSight QBOX2 CI DVB-S USB2.0 receivers
  • Add information about a new driver in the second configuration file for compiling

Add to the end of/usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/Makefile before the first ccflags-y statement

dvb-usb-tbsqbox2ci-objs := tbs-qbox2ci.o
obj-$(CONFIG_DVB_USB_TBSQBOX2CI) += dvb-usb-tbsqbox2ci.o
  • Add information about a new driver in the third configuration file for compiling

Edit the /usr/src/linux-rpi-4.4.y/arch/arm/configs/bcm2709_defconfig file and under the line CONFIG_DVB_USB_TECHNISAT_USB2=m, add the line

CONFIG_DVB_USB_TBSQBOX2CI=m
  • If exist, back up the .config file
cp /usr/src/linux-rpi-4.4.y/.config /usr/src/linux-rpi-4.4.y/.config.tbs2ci.bak
  • Compiling for Raspberry PI 1 with the Raspberry Pi 1 (or Compute Module) Default Build Configuration

Note : the Pi 1 is maybe more than likely underpowered for this project and maybe the Pi1 probably won't display video properly. But you can try all the installation steps in this page and verify it. Workaround : if it is to slow with SD video in mpeg-2, you can try to buy a mpeg-2 licence to use the GPU hardware to process the video and not the CPU.Mybe it help. This workaround does not work with TV channel with HD video in mpeg-4.More information about video codec in Raspberry Pi : New video features! MPEG-2 and VC-1 decode, H.264 encode, CEC support

cd /usr/src/linux-rpi-4.4.y
export KERNEL=kernel
make bcmrpi_defconfig
make
  • Compiling for Raspberry PI 2 or 3 with the Raspberry Pi 2/3 Default Build Configuration
cd /usr/src/linux-rpi-4.4.y
export KERNEL=kernel7
make bcm2709_defconfig
make -j4
  • Save the current headers and modules files :
mv /lib/modules/4.4.38+ /lib/modules/4.4.38+.bak
mv /lib/modules/4.4.38-v7+ /lib/modules/4.4.38-v7+.bak
make modules
make modules_install
make headers_install

Now, there is a new folder : /lib/modules/4.4.39-v7

  • Check that the TBS5980 kernel modules are build :
ls -l /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv6110x.ko
ls -l /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stv090x.ko
ls -l /usr/src/linux-rpi-4.4.y/drivers/media/dvb-frontends/stb6100.ko
ls -l /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-tbsqbox2ci.ko
ls -l /usr/src/linux-rpi-4.4.y/drivers/media/usb/dvb-usb/dvb-usb-technisat-usb2.ko
  • Check that the the TBS5980 kernel modules are installed :
ls -l /lib/modules/4.4.39-v7/kernel/drivers/media/dvb-frontends/st*
ls -l /lib/modules/4.4.39-v7/kernel/drivers/media/usb/dvb-usb/dvb-usb-t*
  • Select the new kernel with TBS5980 support

Make sure you backup your old /boot/kernel.img

cp -p /boot/kernel7.img /boot/kernel7.img.OK.ORI
cp -p /boot/kernel.img /boot/kernel.img.OK.ORI
cp arch/arm/boot/zImage /boot/kernel7tbsci.img
nano /boot/config.txt
 #add the following:
 kernel=kernel7tbsci.img
  • Install the firmware file required by TBS5980 driver

Go to http://www.tbsdtv.com/products/tbs5980-dvb-s2-ci-tv-tuner-usb.html, tab Download, download the linux driver in the zip archive, get the dvb-usb-tbsqbox-id5980.fw file and copy it /lib/firmware

cd /usr/src
mkdir tbs5980-firmware
cd tbs5980-firmware
wget http://www.tbsiptv.com/download/tbs5980/tbs-linux-sources_v151229.zip
unzip tbs-linux-sources_v151229.zip
cp dvb-usb-tbsqbox-id5980.fw /lib/firmware
  • Avoid high CPU usage :

source: In order to avoid a high CPU usage, you should disable the IR receiver:

ls /etc/modprobe.d/
  fbdev-blacklist.conf  ipv6.conf  libpisock9.conf  raspi-blacklist.conf

In the /etc/modprobe.d/dvbir.conf file if this file exist or else in the /etc/modprobe.d/options file, add the line :

options dvb_usb disable_rc_polling=1
  • Reboot
shutdown -r now
  • Check information about TBS 5980 in kernel log :
dmesg | grep 5980
dmesg | grep TBS
pi@raspberrypi:~ $ dmesg | grep 5980
[    4.583620] usb 1-1.5: New USB device found, idVendor=734c, idProduct=5980
[    7.642915] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5980.fw'
[    9.633822] usb 1-1.5: New USB device found, idVendor=734c, idProduct=5980
[    9.634891] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5980.fw'
pi@raspberrypi:~ $ dmesg | grep TBS
[    7.640406] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in cold state, will try to load a firmware
[    7.642939] tbsqbox2ci: start downloading TBSQBOX2CI firmware
[    7.763212] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in warm state.
[    7.764051] DVB: registering new adapter (TBS Qbox DVB-S2 CI USB2.0)
[    7.833526] dvb-usb: no frontend was attached by 'TBS Qbox DVB-S2 CI USB2.0'
[    7.834113] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully initialized and connected.
[    7.896372] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully deinitialized and disconnected.
[    9.633892] usb 1-1.5: Manufacturer: TBS-Tech
[    9.634867] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in cold state, will try to load a firmware
[    9.634903] tbsqbox2ci: start downloading TBSQBOX2CI firmware
[    9.753254] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in warm state.
[    9.754186] DVB: registering new adapter (TBS Qbox DVB-S2 CI USB2.0)
[   10.175674] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully initialized and connected.
pi@raspberrypi:~ $ lsusb
Bus 001 Device 006: ID 734c:5980 TBS Technologies China
pi@raspberrypi:~ $ dmesg
...
[  114.711225] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[  114.811756] usb 1-1.5: New USB device found, idVendor=734c, idProduct=5980
[  114.811786] usb 1-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  115.907717] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in cold state, will try to load a firmware
[  115.916121] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5980.fw'
[  115.916153] tbsqbox2ci: start downloading TBSQBOX2CI firmware
[  116.014215] usb 1-1.5: USB disconnect, device number 5
[  116.041594] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in warm state.
[  116.042327] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[  116.042425] DVB: registering new adapter (TBS Qbox DVB-S2 CI USB2.0)
[  116.042445] tbsqbox2ci: read eeprom failed.
[  116.042457] dvb-usb: MAC address reading failed.
[  116.121869] dvb-usb: no frontend was attached by 'TBS Qbox DVB-S2 CI USB2.0'
[  116.122418] input: IR-receiver inside an USB DVB receiver as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/input/input0
[  116.122452] dvb-usb: schedule remote query interval to 450 msecs.
[  116.122481] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully initialized and connected.
[  116.122690] usbcore: registered new interface driver tbsqbox2ci
[  116.174064] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully deinitialized and disconnected.
[  117.781941] usb 1-1.5: new high-speed USB device number 6 using dwc_otg
[  117.882880] usb 1-1.5: New USB device found, idVendor=734c, idProduct=5980
[  117.882913] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  117.882930] usb 1-1.5: Product: DVBS2BOX
[  117.882946] usb 1-1.5: Manufacturer: TBS-Tech
[  117.884264] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in cold state, will try to load a firmware
[  117.884294] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5980.fw'
[  117.884310] tbsqbox2ci: start downloading TBSQBOX2CI firmware
[  118.012008] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in warm state.
[  118.012669] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[  118.012917] DVB: registering new adapter (TBS Qbox DVB-S2 CI USB2.0)
[  118.226545] dvb-usb: MAC address: xx:xx:xx:xx:xx:xx (edited by me)
[  118.358626] tbsqbox2ci: Attached stv0903!
Check that your device can receive the satellit TV and Radio transponders
dvbv5-scan ./Atlantic-Bird-3-5.0W 

or

dvbv5-scan ./Atlantic-Bird-3-5.0W --output=Atlantic-Bird-3-5.0W.conf --output-format=ZAP

The vlc media player can read and use channel configuration file with ZAP format.

  • 4) You should have an output like this if it works (here with DVB-T transmitter) :

...

Scanning frequency #2 506166000
Lock   (0x1f) Signal= 82.64% C/N= 0.22% UCB= 141 postBER= 0
Service C8, provider NTN: reserved
Service BFM TV, provider NTN: reserved
Service i>TELE, provider NTN: reserved
Service CSTAR, provider NTN: reserved
Service Gulli, provider NTN: reserved
New transponder/channel found: #14: -10
New transponder/channel found: #15: -10
New transponder/channel found: #16: -10
New transponder/channel found: #17: -10
New transponder/channel found: #18: -10
New transponder/channel found: #19: -10
New transponder/channel found: #20: -10

...

Check that you can redirect and play sound and video stream TV channel from your raspberry pi to a computer

With the utility dvbstream, you can redirect the sound and video stream TV channel from your raspberry pi to a computer and then use vlc media player to read this tream.
More information here :
http://www.linuxcertif.com/man/1/dvbstream/
https://www.linuxtv.org/wiki/index.php/Dvbstream

Build TvHeadEnd for Raspberry Pi with Raspian Pixel

Requirements :

 sudo apt-get install libssl-dev
 sudo apt-get install liburiparser*
 sudo apt-get install libiconv-hook1 libiconv-hook-dev
 sudo apt-get install dvb-tools libdvbv5-0
 sudo apt-get install libavahi-client-dev libavahi-common-dev libdbus-1-dev
 sudo apt-get install  libavcodec-dev

Compiling and installing :

$ cd
$ mkdir tvheadend
$ cd tvheadend/
$ wget https://github.com/tvheadend/tvheadend/archive/v4.0.9.tar.gz
$ mv v4.0.9.tar.gz tvheadend-v4.0.9.tar.gz
$ tar xzvf tvheadend-v4.0.9.tar.gz
$ cd tvheadend-4.0.9
$ ./configure --prefix=/opt/tvheadend-4.0.9
$ make
$ sudo make install

Launch and configuration :

 sudo /opt/tvheadend-4.0.9/bin/tvheadend -C

Go to http://raspberry_pi_ip_address:9981 and configure your device http://wiki.openelec.tv/index.php/Configuring_Tvheadend

Sample kernel output

The kernel outputs the information below, CAM module inserted (with module verbosity wide open):

# dmesg
[18814.387092] usb 1-7: new high speed USB device using ehci_hcd and address 9
[18814.502322] usb 1-7: New USB device found, idVendor=734c, idProduct=5980
[18814.502334] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[18814.502343] usb 1-7: Product: DVBS2BOX
[18814.502349] usb 1-7: Manufacturer: TBS-Tech
[18814.684522] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in cold state, will try to load a firmware
[18814.688745] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5980.fw'
[18814.691532] tbsqbox2ci: start downloading TBSQBOX2CI firmware
[18814.810199] dvb-usb: found a 'TBS Qbox DVB-S2 CI USB2.0' in warm state.
[18814.810330] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[18814.810751] DVB: registering new adapter (TBS Qbox DVB-S2 CI USB2.0)
[18815.048073] dvb-usb: MAC address: xx:xx:xx:xx:xx:xx (edited by me)
[18815.048077] 
[18815.050881] stv090x_attach: Create New Internal Structure!
[18815.156679] stv090x_attach: Attaching STV0903 demodulator(1) Cut=0x30
[18815.156689] tbsqbox2ci: Attached stv0903!
[18815.156692] 
[18815.157478] tbsqbox2ci: CI initialized.
[18815.157488] DVB: registering adapter 0 frontend 0 (STV090x Multistandard)...
[18815.157590] stb6100_attach: Attaching STB6100 
[18815.159811] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb1/1-7/input/input12
[18815.159952] dvb-usb: schedule remote query interval to 150 msecs.
[18815.159961] dvb-usb: TBS Qbox DVB-S2 CI USB2.0 successfully initialized and connected.
[18815.160051] usbcore: registered new interface driver tbsqbox2ci
[18861.422201] tbsqbox2ci: CI enabled.
[18861.422211] dvb_ca adapter 0: DVB CAM detected and initialised successfully

To get maximum verbosity, relevant parts of /etc/modprobe.d/modprobe.conf were set as follows:

options dvb_usb debug=511
options dvb_usb_tbsqbox2ci debug=3
options stb6100 verbose=3
options stv090x verbose=3

Remote control support

The device comes with a remote, but that has not been tested yet. Tbsdtv forum members complain about poor interoperability with LIRC.

Issues

Remote control needs further research.

CAM support is underway. So far, the astoncrypt v1.07 has been tested. Before this can be finalized, a working smartcard is required. Haven't got one yet ;-).

Network support has not been addressed yet.

External links