Driver DVB-S2 | SkyStar 2 USB HD CI | Kernel patch
The USB tuner does not search for channels? DVB-S2 on Linux does not work with this card. On Raspbian only DVB-S works because of the rejection of the kernel fix by Linux developers. This means that we will not receive the broadcast, that is, we will not receive the MUX, based on DVB-S2 (that is, most on modern satellite systems), because the satellite TV card will not detect them. Device IDs are 14f7:0001, according to the Linux TV page (link in specification section) the driver for second revision device with VID 14f7 and PID 0002 is identical. You will be presented with instructions on how to modify the Raspbian 32 bit kernel for Raspberry Pi 4B on Ubuntu 20.04 LTS.
Photo Gallery of working SkyStar 2 USB HD CI
Download Linux kernel and tools for SkyStar 2 HD CI modification (build in Ubuntu)
sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
git clone --branch rpi-5.10.y https://github.com/raspberrypi/linux
cd ./linux
KERNEL=kernel7l # RPi 4B 32 bit
make bcm2711_defconfig # RPi 4B 32 bit
sudo apt install crossbuild-essential-armhf
Kernel patch for DVB-S2 SkyStar USB HD CI driver
I applied a known driver patch reported to the Linux kernel (link in the specs section), a little modified to the latest Raspbian kernel. Source diff -u patch for kernel version 5.10.52:
--- /home/cooltronic/linux/drivers/media/dvb-frontends/stb0899_drv.c 2021-07-26 06:50:00.988552591 -0700
+++ /home/cooltronic/linux/drivers/media/dvb-frontends/stb0899_drv_PATCHED_RASPBIAN_5.1.c 2021-07-30 14:33:40.375139265 -0700
@@ -294,19 +294,19 @@
.len = 6
};
- struct i2c_msg msg_1 = {
- .addr = state->config->demod_address,
- .flags = 0,
- .buf = buf_1,
- .len = 2
- };
-
- struct i2c_msg msg_r = {
- .addr = state->config->demod_address,
- .flags = I2C_M_RD,
- .buf = buf,
- .len = 4
- };
+ struct i2c_msg msg [] = {
+ {
+ .addr = state->config->demod_address,
+ .flags = 0,
+ .buf = buf_1,
+ .len = 2
+ }, {
+ .addr = state->config->demod_address,
+ .flags = I2C_M_RD,
+ .buf = buf,
+ .len = 4
+ }
+ };
tmpaddr = stb0899_reg_offset & 0xff00;
if (!( stb0899_reg_offset &0x8))
@@ -325,28 +325,17 @@
}
/* Dummy */
- status = i2c_transfer(state->i2c, &msg_1, 1);
- if < 1)
- goto err;
-
- status = i2c_transfer(state-> (i2c status, &msg_r, 1);
- if (status < 1)
+ status = i2c_transfer(state-> i2c, msg, 2);
+ if (status < 2)
goto err;
buf_1 [0] = GETBYTE(stb0899_reg_offset, BYTE1);
buf_1 [1] = GETBYTE(stb0899_reg_offset, BYTE0);
/* Actual */
- status = i2c_transfer(state->i2c, &msg_1, 1);
- if (status < 1) {
- if (status != -ERESTARTSYS)
- printk(KERN_ERR "%s ERR(2), Device= [0x%04x] , Base address= [0x%08x] , Offset= , [0x%04x] Status=%dn",
- __func__, stb0899_i2cdev, stb0899_base_addr, stb0899_reg_offset, status);
- goto err;
- }
+ status = i2c_transfer(state->i2c, msg, 2);
+ if < 2) {
- status = i2c_transfer(state-> (i2c status, &msg_r, 1);
- if (status < 1) {
if (status != -ERESTARTSYS)
printk(KERN_ERR "%s ERR(3), Device= [0x%04x] , Base address= [0x%08x] , Offset= , [0x%04x] Status=%dn",
__func__, stb0899_i2cdev, stb0899_base_addr, stb0899_reg_offset, status);
@@ -473,8 +462,15 @@
(((reg & 0xff00) == 0xf200) || ((reg & 0xff00) == 0xf600)))
_stb0899_read_reg(state, (reg | 0x00ff));
- dprintk(state->verbose, FE_DEBUGREG, 1,
- %%s [0x%04x] : %*ph", __func__, reg, count, buf);
+ if (unlikely(*state->verbose >= FE_DEBUGREG)) {
+ int i;
+
+ printk(KERN_DEBUG "%s [0x%04x] :", __func__, reg);
+ for (i = 0; i < count; i++) {
+ printk(" %02x", buf [i] );
+ }
+ printk("n");
+ }
return 0;
Err:
@@ -503,8 +499,15 @@
buf [1] = reg & 0xff;
memcpy(&buf [2] , date, count);
- dprintk(state->verbose, FE_DEBUGREG, 1,
- "%s [0x%04x] : %*ph", __func__, reg, count, date);
+ if (unlikely(*state->verbose >= FE_DEBUGREG)) {
+ int i;
+
+ printk(KERN_DEBUG "%s [0x%04x] :", __func__, reg);
+ for (i = 0; i < count; i++)
+ printk(" %02x", data [i] );
+ printk("n");
+ }
+
ret = i2c_transfer(state->i2c, &i2c_msg, 1);
/*
@@ -590,19 +593,13 @@
return 0;
}
-static void stb0899_detach (struct dvb_frontend *fe)
-{
- struct stb0899_state *state = fe->demodulator_priv;
-
- /* post process event */
- stb0899_postproc(state, STB0899_POSTPROC_GPIO_POWER, 0);
-}
-
static void stb0899_release(struct dvb_frontend *fe)
{
struct stb0899_state *state = fe->demodulator_priv;
dprintk(state->verbose, FE_DEBUG, 1, "Release Frontend");
+ /* post process event */
+ stb0899_postproc(state, STB0899_POSTPROC_GPIO_POWER, 0);
kfree(state);
}
@@ -1568,7 +1565,7 @@
return DVBFE_ALGO_CUSTOM;
}
-static const struct dvb_frontend_ops stb0899_ops = {
+static struct dvb_frontend_ops stb0899_ops = {
.delsys = { SYS_DVBS, SYS_DVBS2, SYS_DSS },
.info = {
.name = "STB0899 Multistandard",
@@ -1583,7 +1580,7 @@
FE_CAN_QPSK
},
- .detach = stb0899_detach,
+
.release = stb0899_release,
.init = stb0899_init,
.sleep = stb0899_sleep,
Below is a link to the patch for the current Debian / Raspbian kernel running 5.10. Run the following command in the / drivers/media/dvb-frontends directory after copying the patch file there.
Command:
patch -p1 -i stb0899_drv.patch
Compilation and installation
The patching process went without major problems. Then, we take out the micro SD card from Raspberry Pi by connecting it to Ubuntu. We install the new kernel with the following instructions:
KERNEL=kernel7l
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2711_defconfig # RPi 32 bit 4B
make -j12 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs
mkdir mnt #musi be mounted micro sd card rapsberry
mkdir mnt/fat32
mkdir mnt/ext4
sudo mount /dev/sdb1 mnt/fat32 #partycja raspbian boot
sudo mount /dev/sdb2 mnt/ext4 #partycja Raspbian system system - default paths
sudo env PATH=$PATH make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=mnt/ext4 modules_install
sudo cp mnt/fat32/$KERNEL.img mnt/fat32/$KERNEL-backup.img
sudo cp arch/arm/boot/zImage mnt/fat32/$KERNEL.img
sudo cp arch/arm/boot/dts/*.dtb mnt/fat32/
sudo cp arch/arm/boot/dts/overlays/*.dtb* mnt/fat32/overlays/
sudo cp arch/arm/boot/dts/overlays/README mnt/fat32/overlays/
sudo umount mnt/fat32
sudo umount mnt/ext4
We have yet to copy the dvb-usb-az6027-03.fw file to Raspbian system partition folder /lib/firmware.
Now, after the restart, we are now enjoying the fully functional DVB-S2 on Technisat SkyStar USB 2 CI in Linux Raspbian on Raspberry Pi.
Device specifications
Manufacturer’s Code | SkyStar USB 2 HD CI |
Name | TechniSat SkyStar USB 2 HD CI |
Tuner type | external |
interface | USB 2.0 |
processor | STMicroelectronics STB0899 multistandard demodulator (DVB-S and DVB-S2). |
The resolution of the | Dependent on the broadcast program. Supports HDTV and 4K. |
Radio tuner and digital satellite TV DVB-S, DVB-S2 | yes. DVB-S2 on Linux requires kernel modification. |
Vision system | MPEG 2 format. HDTV MPEG-4-/H.264 |
Phonia system | Stereo, AC, Dolby |
Teletext | Software |
Save format | MPEG2 |
Card slots: inputs | LNB antenna, CI conditional access module port, 12V power port |
Remote control | pilot |
Drivers | Windows 2000, XP, 2003 Server, Vista, 7, Windows 10 works when connected to usb2 port of older controllers, Linux by copying the file dvb-usb-az6027-03.fw, and for DVB-S2 kernel modification patch to receive (file stb0899_drv.c) |
Supported software | DVB Viewer TE (Technisat Edition), tvheadend, vdr |
Other features | Timeshift, recording |
Equipment | pilot |
VID Vendor ID | 14f7 |
PID Product ID | 0001 or 0002 |
Web | Link to technical description page, link to Linux specification page,kernel modification link |
ZmieÅ„ jÄ™zyk – Change language
Blog categories
- Automatization (2)
- Computer (9)
- Curiosities (5)
- Graphics (2)
- Software (8)