Tevii DVB-S2 662

Hi all.

I am trying to enable tevii DVB_S2 662 in osmc and raspbmc with unfortunately no sucess.

http://www.tevii.com/Products_S660_1.asp#

I have been in touch with the Tevii support team and here the email i got from them

Installing drivers for the S662 has been a breeze and very little to do and hence there's no significant writeup. People who require support we are providing directly to make things easier for you. However, taking your comments quite seriously and will request to include written documentation alongwith.

The latest driver archive can be downloaded from
http://www.tevii.com/Tevii_Product_20141204media_build_b7.tar.bz2.rar

Please do note the extraneous .rar extension. The archive is a regular
bzipped tar archive.

you can rename it to media_build_b7.tar.bz2

Once downloaded, you can uncompress the archive
$ tar -jxvf media_build_b7.tar.bz2

This creates a media_build directory.
change directory to media_build/v4l

Clean any stale configuration files with the following command

v4l/$ make distclean

Make sure, you have a properly working toolchain (build_essentials)

Build your sources:

v4l/$make

Make sure the build completed, without errors.

once everything’s fine, install the compiled modules with root privileges

v4l/$ sudo make install

A reboot, will load the relevant module

v4l/$ sudo reboot

After a reboot, you can verify whether the driver loaded correctly:
dmesg |grep dvb

Also lsmod should show the relevant loaded modules

Unfortunately i cannot install this due to the kernel in raspbmc and osmc is there a way i can do this easily?

Anyone for my problem

I had a reply from the support team from the tevii box and they asked the following questions

  • Are you able to compile anything under osmc
    (gcc, and so on)
  • Are you able to compile any kernel drivers ?
    (build essentials and so on)

OSMC is a full Debian system with build-essential packages (gcc, make etc) and the Linux headers. Please point them to this thread.

That said, there seems no reason you can’t follow the above instructions. What do you mean by

S

Well the make command stops with some errors about missing ./config file in /lib/modules/3.18.5-v7+/build

Hi,

I got one of those too today, i went through the instructions above and installed the drivers but i still don’t see it the adapter in tv headend. Ill keep at it until i get it working.

If you need me to print out the commands you need to go go through the above instructions i can do that - let me know.

i rushed through that a bit the other evening -looked again today and my install is failing with a similar error ::

osmc@osmc:/lib/firmware/b7/media_build$ sudo make
make -C /lib/firmware/b7/media_build/v4l
make[1]: Entering directory ‘/lib/firmware/b7/media_build/v4l’
Updating/Creating .config
make[2]: Entering directory ‘/lib/firmware/b7/media_build/linux’
Patches for 3.18.9-5-osmc already applied.
make[2]: Leaving directory ‘/lib/firmware/b7/media_build/linux’
Preparing to compile for kernel version 3.18.9
File not found: /lib/modules/3.18.9-5-osmc/build/.config at ./scripts/make_kconfig.pl line 33, line 4.
make[1]: *** No rule to make target ‘.config’, needed by ‘.myconfig’. Stop.
make[1]: Leaving directory ‘/lib/firmware/b7/media_build/v4l’
Makefile:26: recipe for target ‘all’ failed
make: *** [all] Error 2

Does anyone understand why this fails or if there might be a workaround or actual support for this in the future. I found the hardware on a wiki somewhere for debian supported tv tuners so i had hoped i would be good with it. Fingy’s crossed for the future though, I’m still full of hope to get it working.

Thanks,

i am also hopeful that it will work one day. Supported is another thing. Will definitely not buy a tevii product anymore.

Start by installing the kernel headers: Wiki - OSMC

It will fix the .config error ; you might get other errors down the line but let’s fix one thing at a time…

It still fails with the same error with the source installed

make No version yet, using 3.18.10-1-osmc scripts/make_makefile.pl Updating/Creating .config make[1]: Entering directory '/home/osmc/b7/media_build/linux' Patches for 3.18.10-1-osmc already applied. make[1]: Leaving directory '/home/osmc/b7/media_build/linux' Preparing to compile for kernel version 3.18.10 File not found: /lib/modules/3.18.10-1-osmc/build/.config at ./scripts/make_kconfig.pl line 33, line 4. Updating/Creating .config make[1]: Entering directory '/home/osmc/b7/media_build/linux' Patches for 3.18.10-1-osmc already applied. make[1]: Leaving directory '/home/osmc/b7/media_build/linux' Preparing to compile for kernel version 3.18.10 File not found: /lib/modules/3.18.10-1-osmc/build/.config at ./scripts/make_kconfig.pl line 33, line 4. make: *** No rule to make target '.config', needed by '.myconfig'. Stop.

Hi mometto,

Just want to say thanks for jumping in and trying to help out.
I have had the same result as taiebot.

You are right about installing Kernel its just about the right ones. Im trying to learn fast but my time is limited and i have precious little to put to this but do whenever i can.

Right now for the last few days i had been working on a work-around involving a second pi installation just to host tvheadend and my Tevii card and use it as a server o point my OSMC tvheadend client at - this is to save my OSMC from corruption - and not to have to constantly back up my card - obviously not being a linux master there arelots of noobish mistakes being made by me…

I have tried ubuntu pi debian jessy for pi and a few other various builds /remixes of raspbian which have all failed with the same error. I have finally settled on Diet pi to continue this project on cause i like the look of it.

So my thinking was the drivers might work with an older Kernel. Keep in mind this is all new to me and my thinking is basically guess work -not having anywhere near a full understanding of kernels etc…

Doing alot of research and this link should help

S2-liplianin - LinuxTVWiki

Thats is what is required here i believe. Unfortunately im in work tonight then away for a few days and then back to work 12 hours shifts! so it willbe at least a week before i can continue with my efforts.

Thanks!

Edit: I made some edit to make the process easier and fix kernel headers rather then kernel source

Below a very ugly way to get this working… There are issues on both OSMC headers and the Tevii source which make things a bit complex.

media_build expects to have the kernel source (or at least headers) in /lib/modules/3.18.10-1-osmc/build

The first issue is that the headers are installed in cd /usr/src/rbp2-headers-3.18.10-1-osmc, so to fix this you do

sudo ln -s /usr/src/rbp2-headers-3.18.10-1-osmc /lib/modules/3.18.10-1-osmc/build

This should work in theory now, but the headers appears to be incomplete and you will get an error reffering to mach file not found…

./arch/arm/include/asm/barrier.h:41:27: fatal error: mach/barriers.h: No such file or directory

Including arch/arm/mach-bcm2709 in the headers should fix this… Ideally Sam should fix this in the header generation…

So let’s download the kernel source

set – $(cat /proc/cmdline) && for x in “$@”; do case “$x” in osmcdev=*) sudo apt-get update && sudo apt-get install -y “${x#osmcdev=}-source-$(uname -r)”; ;; esac; done

unpack them

sudo tar -xjvf /usr/src/rbp2-source-3.18.10-1-osmc.tar.bz2

and add the missing files…

sudo cp -r /usr/src/rbp2-source-3.18.10-1-osmc/arch/arm/mach-bcm2709/include/mach/ /usr/src/rbp2-headers-3.18.10-1-osmc/include/.

At this point, the environment should be ready and the compilation should work, however there seem to be a couple of issue with Tevii’s code.

You will first get an error on v4l/compat.h … (add the line with a +)

vi v4l/compat.h

#ifdef NEED_SMP_MB_AFTER_ATOMIC
+#ifndef smp_mb__after_atomic
#define smp_mb__after_atomic smp_mb__after_clear_bit
+#endif
#endif

And then
vi v4l/cxd2820r_core.c

static void cxd2820r_release(struct dvb_frontend *fe)              
{                                                 
        struct cxd2820r_priv *priv = fe->demodulator_priv;
        int uninitialized_var(ret); /* silence compiler warning */
        dev_dbg(&priv->i2c->dev, "%s\n", __func__);
#ifdef CONFIG_GPIOLIB
        /* remove GPIOs */
+/*                        
        if (priv->gpio_chip.label) {
                ret = gpiochip_remove(&priv->gpio_chip);
                if (ret) 
                        dev_err(&priv->i2c->dev, "%s: gpiochip_remove() " \
                                        "failed=%d\n", KBUILD_MODNAME, ret);
        }
+*/                       
#endif
        kfree(priv);
        return;               
} 

(note here a better fix would be to undefine CONFIG_GPIOLIB, I just wanted to fix the compile error. I have no idea if the device is going to use cxd2820r… If it doesn’t then this is irrelevant).

At this point it should complete without error and you can continue to follow Tevii’s instructions.

Edit 2:
I forgot. The above works on a rbp2. For rbp1 you should just need to change the paths (rbp2->rbp1).

I dont have a Vero so can’t tell if it has the same header issue…

Edit 3:
Check How to Obtain, Build and Install V4L-DVB Device Drivers - LinuxTVWiki and install the missing requirements.

Thank you mometto.

It is more complex than i thought but will give it a go. I suppose this will break if osmc gets upgraded to a higher kernel.

Ok got much further than normally.

I am stopping now at

Can't locate Proc/ProcessTable.pm in @INC (you may need to install the Proc::ProcessTable module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/arm-linux-gnueabihf/perl5/5.20 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at ./scripts/rmmod.pl line 4. BEGIN failed--compilation aborted at ./scripts/rmmod.pl line 4. Makefile:51: recipe for target 'default' failed make: *** [default] Error 2

Ok i have solved my problem by installing sudo apt-get install libproc-processtable-perl

Yes it works !!! :smile:

w2102: su3000_identify_state

[ 4.631664] dvb-usb: found a ‘TeVii S662 USB’ in warm state.
[ 4.631690] dw2102: su3000_power_ctrl: 1, initialized 0

[ 4.632225] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[ 4.632508] DVB: registering new adapter (TeVii S662 USB)
[ 4.637804] 00 18 bd 5b b5 7a
[ 4.637858] dvb-usb: MAC address: 00:18:bd:5b:b5:7a
[ 4.729627] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

Finally got time to get back to this, Thank you so much for your help mometto it was a great feeling to get so much further could not have ever figured that out myself.

however the struggle continues. i think im having a firmware issue now.

[ 5.203138] dw2102: su3000_identify_state

[ 5.203173] dvb-usb: found a ‘TeVii S662 USB’ in warm state.
[ 5.203202] dw2102: su3000_power_ctrl: 1, initialized 0

[ 5.203872] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[ 5.204116] DVB: registering new adapter (TeVii S662 USB)
[ 5.208840] 00 18 bd 5b b7 9f
[ 5.208898] dvb-usb: MAC address: 00:18:bd:5b:b7:9f
[ 5.441135] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 5.563564] m88ds3103: m88ds3103_attach
[ 5.565392] DS3xxx chip version: 3103 attached.
[ 5.565411] m88ds3103: m88ds3103_initilaze()
[ 5.621286] m88ds3103: m88ds3103_load_firmware()
[ 5.621327] m88ds3103_load_firmware: Waiting for firmware upload (dvb-fe-ds3103.fw)…
[ 5.712942] usb 1-1.3: Direct firmware load for dvb-fe-ds3103.fw failed with error -2
[ 5.712989] m88ds3103_load_firmware: Waiting for firmware upload(2)…
[ 5.713006] m88ds3103_load_firmware: No firmware uploaded (timeout or file not found?)
[ 5.713036] m88ds3103_initilaze: Unable initialize firmware
[ 5.713058] dw2102: Attached M88DS3103!

[ 5.725784] m88ts202x_attach
[ 5.726948] TS202x Reg 0x0=0xc1
[ 5.727994] TS202x Reg 0x1=0x0

                            ^
                    truncated output
                            ^

5.876217] random: nonblocking pool is initialized
6.002647] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

[ 6.048418] TS202x Reg 0xfe=0x0
[ 6.049533] TS202x Reg 0xff=0x0
[ 6.050777] TS202x chip version[1]: c1 attached.
[ 6.071736] TS202x chip version[2]: c3 attached.
[ 6.121768] dw2102: Attached M88TS202x!

[ 6.121824] usb 1-1.3: DVB: registering adapter 0 frontend 0 (Montage DS3103)…
[ 6.122841] input: IR-receiver inside an USB DVB receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/input
[ 6.126622] dvb-usb: schedule remote query interval to 250 msecs.
[ 6.126668] dw2102: su3000_power_ctrl: 0, initialized 1

[ 6.126687] dvb-usb: TeVii S662 USB successfully initialized and connected.
[ 6.126988] usbcore: registered new interface driver dw2102
[ 6.969741] systemd-journald[104]: Received request to flush runtime journal from PID 1
[ 8.253937] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup
[ 8.254146] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 8.370768] dvb-usb: recv bulk message failed: -110
[ 8.370794] dw2102: i2c transfer failed.

[ 8.612927] Bluetooth: Core ver 2.19
[ 8.613073] NET: Registered protocol family 31
[ 8.613089] Bluetooth: HCI device and connection manager initialized
[ 8.613141] Bluetooth: HCI socket layer initialized
[ 8.613164] Bluetooth: L2CAP socket layer initialized
[ 8.613222] Bluetooth: SCO socket layer initialized
[ 8.664187] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 8.664216] Bluetooth: BNEP filters: protocol multicast
[ 8.664262] Bluetooth: BNEP socket layer initialized
[ 9.865608] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 9.866461] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
[ 13.039646] Console: switching to colour dummy device 80x30
[ 13.627160] dw2102: su3000_power_ctrl: 1, initialized 1

[ 13.627194] m88ds3103: m88ds3103_initfe()
[ 13.750812] usb 1-1.3: DVB: adapter 0 frontend 0 frequency 0 out of range (950000…2150000)
[ 13.751447] m88ds3103: m88ds3103_set_voltage(2)
[ 13.754835] m88ds3103: m88ds3103_sleep()
[ 13.754866] dw2102: su3000_power_ctrl: 0, initialized 1

As it shows an issue with firmware dvb-fe-ds3103.fw i downloaded it from here : DVBSky S950 - LinuxTVWiki to /lib/firmware but it didn’t seem to make any difference,

A few other things also - when i install the linuxtv.org git tree my adapter disappears from the tvheadend server page and no longer loads in osmc, until i delete the linuxtv media_build directory that it makes and reboot.

Tvheadend is giving me pains too, I have compiled it from source but i dont get the ‘pre-defined muxes’ drop down tab when i create a network. It could be due to the firmware problem or just something gone wrong, I dont see a bouquet tab either which i got once before trying this., I have reinstalled by deleting the associated folders and re-compiling but the issue remains, sudo apt-get purge tvheadend says tvheadend is not installed so i dont know any way to fully remove all traces before re-installing.

Also not seeing the ‘tv’ section on the menu in osmc using confluence skin whereas i do when i enable simple iptv client.

Bout ready to give up on this, but im truly thankful for the help so far. Seems like im asking to much and just bought the wrong thing or im just jinxed. :blush

EDIT : i just fixed the driver issue i d/l it from here https://bitbucket.org/liplianin/s2-liplianin-v37/downloads - it actually wasnt included in the first link as i thought, So there are no more driver errors.
Just this:
9.270770] dvb-usb: recv bulk message failed: -110
[ 9.270798] dw2102: i2c transfer failed.
I guess ill just have to start from a fully fresh install and not a cloned copy to fix the tvheadend issues.

Glad to see you made progress. I would recommend you however to use the firmware found in the Tevii Source rather then from another card… You should have a file dvb-firmwares.tar.bz2 in the media_build folder.

I did get the same i2c errors - I actually have the tuner but no satellite dish to try it at the moment so can’t really say the effects of it.

I am not sure to follow your problems with tvheadend… What are you installing from the linuxtv.org tree?

Once you have installed the Tevii’s driver, try to build Tvheadend from scratch this way:

git clone GitHub - tvheadend/tvheadend: Tvheadend is a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV,SAT>IP and other formats through the unix pipe as input sources.
cd tvheadend
./configure
make
sudo make install

Progress has been made. Thank you mometto for your pointers.

Delighted to report that it works & it works like a charm! :smiley: I have 280 channels on my first try :stuck_out_tongue_closed_eyes: verified by watching each of them on OSMC for a few seconds each.

Well done. Its all thanks to you.

Thank you for your patient and selfless support i know your not affiliated ? but i have donated 20 dollars to the OSMC project as a gesture of gratitude. I am bursting with happiness.
Best regards.

Glad you got it to work too. I have had mine working for two weeks now and it has been very stable so far. I need to re-arrange channel though because there is a lot of redundant channels