usbTuner (multiple tuners on dm800) v0.7.3 ipk package (all new images) + GUI plugin

  • Hi.

    This time I present you an ipk package for usbtuner. Last time (usbTuner for all new images) I gave you tar.gz with a little bit of instructions - all manual to get the external tuner working with your dm800. Now it's all automated in a form of ipk package.

    If you don't know what usbtuner can do for you here's a little bit of explanation:
    Say you know what dm800 can do for you and how dm8000 or any other enigma2 based boxes with multiple tuners can do more...You're thinking to yourself: I wish I had more money to get dm8000 or VU+ or anything else which has multiple tuners. But hey! - since you have dm800 which has USB ports and recent images run on linux kernel 2.6.18 you have the base to run additional tuners on your box. All you need is:
    dm800, USB DVB-T/DVB-C or DVB-S/S2 device, drivers, usbtuner program and skills to make it happen.

    The thing is that it's not just a matter of connecting your USB tuner to your box and loading the required modules/drivers. In order to get your USB tuner recognized in enigma2 as additional tuner it needs to be presented to it by the OS in a special form and here usbtuner comes into place. usbtuner binary makes a dvb device (your usb connected tuner) seen by enigma2 for the cost of about 10-20% of CPU power.

    The package contains a hacked version of usbtuner binary (v0.1.9.2) and a set of scripts to configure and enable a supported, usb connected tuner device on dreambox (dm800, dm800se and dm500se).

    Originally these scripts were based on dremelite's scripts but since then they have been heavily reworked, new functionality has been added and recently - renamed.
    From version 0.6.2 scripts are no longer named like the ones from DE, some of them have been removed as there was no longer need for them and some completely rewritten.

    At the moment it is still required to upload the ipk file to your dreambox (eg, using FTP) and run it on the box using eg. SSH so:
    Once you have the ipk in eg. /tmp do:
    1. In order to avoid running the installation of usbtuner package twice (cuz the first one will probably fail on a freshly installed image) install the required package (module-init-tools) first:

    #opkg install module-init-tools

    2. Install the usbtuner package:

    #cd /tmp#opkg install usbtuner_0.7.2_all.ipk

    The above will automagically install and setup the usbtuner and it's scripts. If your tuner is recognized/supported it will be found and it's module/driver name will be put to the config file (/etc/usbtuner.conf).

    At this stage, assuming that your usb connected device has been recognized it should be in the config file but will not yet work. This is due to the fact that you probably don't have it's drivers installed. The package doesn't provide them anymore so you have to download them.
    Thankfully there is a /usr/script/ script and a GUI frontend for it which will help you download either just the required or all dvb drivers.
    BIG thanks to helour who contributed lists of modules and device USBIDS for automatic installation of only required modules rather than all of them.
    So if you're lucky enough to have a device that it's module set is known to this script, when you choose to download drivers using the GUI plugin or run (from the shell):

    #/usr/script/ download_drivers

    it will download only the drivers that are needed for your device, otherwise you can:

    #/usr/script/ download_drivers all

    and the script will download ALL v4l drivers available in your image's ipkg repo. Please bear in mind that your device's driver may not be available there and I cannot help here. Thankfully some users will be able to provide them in this or other threads.
    Please be aware of the fact that most of the drivers downloaded and installed automatically will require firmware file present in /lib/firmware and they ARE NOT in opkg repositories. But don't worry I've attached ipk with all firmware files I had access to so install it before installing usbtuner and all should be fine.

    By now you probably wonder what other switches does the script support - worry no more. You can do:

    #/usr/script/ help

    which will show u a brief help message explaining the usage of it and available switches.

    *How this whole thing works
    The package installs:
    - /etc/init.d/ - usbtuner service script for starting usbtuner for connected devices during boot and when enigma2 restarts
    - /etc/usbtuner.conf - config file to hold configured devices' module names for /etc/init.d/ service.
    - /usr/script/ - the main setup script for automatic configuration and setup of usbtuner.
    - /usr/bin/usbtuner - a binary for creating nim_socket for usb tuners in order for enigma2 to recognize it.
    - /usr/bin/lsusb - a bash script emulating lsusb program for listing devices connected to the USB bus.
    - /usr/lib/enigma2/python/Plugins/Extensions/DVBUsbTunerSetup - an Enigma2 plugin which is a frontend to the usbtnrsetup script. It will help you configure your device without needing to touch the shell. This goodie has been brought to you by no one else but helour - thanks dude.

    1. auto_setup checks your environment:
    runs automatic setup (check for required toolset, search for tuners, if found adds it to config, patches and if required, blacklists the found module in /etc/modprobe.conf and checks if it can be successfully loaded)
    2. Device is added to the config file /etc/usbtuner.conf so it will be used by the service script (/etc/init.d/ The service will be started every time you boot your dreambox and restarted every time you restart enigma2.
    3. The service script (/etc/init.d/ using modprobe loads modules from /etc/usbtuner.conf and for every successfully loaded module it will start usbtuner program (/usr/bin/usbtuner). This populates /proc/bus/nim_sockets with the new tuner which will make it recognized by enigma2.

    Please first uninstall previous versions of usbtuner package.

  • usbtuner:
    v0.7.3 - Replaced ipkg to opkg in download_drivers function. Updated the GUI plugin. Now it is possible to download and install all drivers (not only a specific one for your tuner) and all firmwares. Thanks helour!
    v0.7.2 - Fixed and improved /etc/init.d/ service startup script. Now it will actually wait (5s timeout) for /dev/dvb/adapter1+ device before it reports that loading the module was successful. This hopefully wont confuse people that all went well when it didn't.
    v0.7.1 - Fixed a bug in enable_device and disable_device functions.
    - is no longer calling /etc/init.d/ restart and is just doing "start" instead. This is to prevent freezes when currently zapped channel is from the usb connected tuner. Usbtuner would not be released during enigma2 restart and would freeze the restart. The only remedy was to reboot the box.
    - Improved /etc/init.d/ script to incorporate PID files per usbtuner program instance. This is to help fixing the above. I recommend uninstalling the previous package version and install this new one. Otherwise would not get properly patched.
    - Most important thing here is the DVBUsbTunerSetup plugin written by helour so BIG UPs for him. Check it out after installing the package, restarting enigma2 and going to the Plugins menu.
    v0.6.3 - Fixed a bug in findTuners function and calls to it which was affecting situations where a tuner was not known.
    - Slightly changed findTuners function to return it's result per line rather than all in one row which makes it easier to use by other fuctions.
    - Added MSI DigiVox mini Trio (DVB-C/T/Analog) (eb1a:2885) to the list of known devices. But this doesn't mean that this device will work. From what I read on the internet this particular device requires special drivers and is not really supported on Linux. Correct me if I'm wrong.
    v0.6.2 - Added automatic module set installation (only required modules) for supported devices (THANKS to helour) in
    - Rewritten main case loop in to support more options.
    - Added options for enabling/disabling devices for future frontend plugin.
    - Removed /usr/script/ - it's not required when we're using actual module names in the config file.
    - Renamed /usr/script/ to /usr/script/, /etc/dtt.devices to /etc/usbtuner.conf, /etc/init.d/ to /etc/init.d/
    - Changed default behavior of from auto_setup to help. Now it will display help/usage message when ran without parameters.
    - Rewritten the service script (/etc/init.d/ so that it's smarter and accept start/stop/restart parameters.
    - Fixed and improved /usr/bin/lsusb. There were some bugs in displaying device names. Added a bit of caching, filtering out device ids with 0000:0000 USBIDs, improved parsing of usb.ids, replaced the main while with for loop for speed improvement, fixed incorrect ids displaying.
    - Other things that I don't remember anymore.
    v0.5.3 - Added dw2102 auto configuration/autoinstallation support.
    v0.5.2 - Just changed the arch so that it installs without any tricks on dm800se and others.
    v0.5.1 - Removed modules and firmware from the package. Firmwares are provided in the attached ipk (v4l-firmwares) and modules/drivers can be installed using /usr/script/ download_drivers.
    - is no longer using insmod to load modules. It's been replaced by modprobe wich is the proper way of doing this. Modprobe will load the module and it's depended modules by itself
    - Renamed driver names in and to correspond to the actual module names.
    - Added package dependency (module-init-tools) because sometimes busybox's modprobe doesn't support -b option
    - is now patching /etc/init.d/ to add -b to modprobe call so that it respects blacklisted modules.
    - Added blacklisting of the found driver/module in /etc/modprobe.conf so that the box doesn't hang during boot due to the fact that tuner connected through USB is being loaded prior the primary internal one - apparently Enigma2 doesn't like it this way.
    - Added possibility to automatically download and install drivers/modules from opkg/ipkg repository that the box is configured with (/usr/script/ download_drivers). This does NOT install all required firmware files because they are not in repositories !!!
    v0.4.3b - Removed rt73.bin - firmware which was causing installation errors.
    v0.4.2b - Adjusted delays on af9015 module loading. Not sure if it's gonna help. Feedback welcome.
    v0.4b - Added support for em28xx driver to both install and autoconfigure. I'm not sure if it fully works hence b(eta). Please report sucess/failures.
    v0.3 - fixed a bug I introduced in v0.2 (missing ";;") in and Added smsusb to autoconfigure ( thanks vass5728 ) and symlinked the firmware file for it.
    v0.2 - added b2c2_flexcop_usb/b2c2_flexcop/SkyStar support. Autoconfigure will recognize usbid: 0af7:0101 for it.
    v0.1 - initial release

    0.2 - Replaced dvb-usb-af9015.fw version for version: The previous (newer f/w is still provided but with a different filename: dvb-usb-af9015.fw. If you need newer version delete dvb-usb-af9015.fw and rename: dvb-usb-af9015-new.fw to: dvb-usb-af9015.fw.
    0.1 - Created initial package

    Edited 27 times, last by a.key ().

  • ATTENTION !!!!!!!!!!
    I'm calling all users of this package to report their devices (USBIDS, device names, links to the actual device pictures, etc) so that we get a list of usb tuners that work fine on our dreambox with this package.
    I will list them in this post in a nice list or something.

    Tuners confirmed to work:
    Please visit:
    The list is generated automagically by the GUI. So if you allow the GUI send feedback the list will be updated.

    Please don't hesitate to send feedback using the GUI plugin. This way we give others hints on what tuners they can buy and should work.

    Edited 13 times, last by a.key ().

  • Hi a.key,

    i just want to thank you for your work. Great that you took your time to do this. Finally my WinTV Nova USB stick is working on CVS with Gemini Plugin. I think this should get sticky!

    Greetz Psymon

  • Quote

    Originally posted by dreamboxrss
    not for 800se!

    I don't know if dm800se uses different kernel but I'd assume it does. This means that the provided kernel modules are not compatibile.
    You can always download all the dvb modules for your box and replace the ones in /usr/lib/modules/dvbt
    That should work I guess.

  • Is there a list about which usb-tuner will be supported?

    Gibt es eine Liste welche USB-Tuner unterstützt werden?

  • any chance to make it work with an old skystar dvb-s card (the one that worked fine with GP 4.7) - b2c2-flexcop ??

    Thank you

  • Quote

    Original von Czaja0
    any chance to make it work with an old skystar dvb-s card (the one that worked fine with GP 4.7) - b2c2-flexcop ??

    Thank you

    well the driver is listed @ the opendreambox feed :)


    DreamBox 1: 7000s rev. 4 . . . . . . . . . . . . . . . Dreambox 2: 7025-SS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dreambox 3: 600 PVR-S . . . . . . . . . Dreambox 4: DM800S HD PVR
    USB - Stick: Kingston Datatraveler USB 2.0 . . CF - Karte: 1GB Extrememory Performance w/o MB!
    Festplatte: IBM 120GB . . . . . . . . . . . . . . . . . . Festplatte: Maxtor 200GB. . . . . . . . . . . . . . . . . . . . . . . . . . . Festpaltte: Samsung 120GB. . . . . . . Festplatte: HDDrive2go 500GB eSata
    Image im Flash: Gemini 4.X0 . . . . . . . . . . . . . Image im Flash: Gemini 4.X0. . . . . . . . . . . . . . . . . . . . . . . . . Image im Flash: Gemini 4.X0. . . . . . Image im Flash: Gemini 5.X0
    Satelliten: 13,0°; 19,2°; 23,5° Ost. . . . . . . . . . Satelliten: NIM1 -19,2° Ost; NIM2 - 13,0°; 19,2°; 23,5° Ost . . Satelliten: 13,0°; 19,2°; 23,5° Ost . . Satelliten: 13,0°; 19,2°; 23,5° Ost

    ...Never cared for what they say - Never cared for games they play - Never cared for what they do - Never cared for what they know...


  • Could you please add the em28xx driver to support the "Hauppauge 900R or 900R2" for pinnacle 330e?


  • unfortunately my skystar card doesn't want to work
    downloaded the drivers but getting this error:

    modprobe: failed to load module b2c2_flexcop (/lib/modules/2.6.18-7.4-dm800/extra/b2c2-flexcop.ko): unknown symbol in module, or unknown parameter

    Any idea??
    Latest icvs image with GP3 plugin DM800

  • The thing is that it's not just one driver that you need to load up.
    As you can see from the above error there is an unknown symbol. This is due to a missing module.
    You see some modules are dependent on each other. If you take a look at /usr/script/ that is provided with my package you'll see that for every tuner/module-set name there are couple of other modules that are being loaded before the actual main module.
    Because I don't have your tuner at hand I can't help you much here.
    What I would do...would be to get your device/tuner plugged to a normal Linux box (PC with a Linux/Live Linux distro) and check what modules are being loaded when you connect your device and load your module.
    You could take a list of loaded modules before the device is connected to the usb port, and then a list of modules loaded after the device is connected (again with lsmod). You will also need to know the sequence in which those modules need to be loaded because as mentioned above they are dependent on each other.
    This all is caused by the lack of proper modprobe/udev although there are some new images that advertise them selves as being capable of automatically load up modules on dm800 (I saw something like that on SiF's team image release note - but I haven't got time to check how they are doing it yet).
    Another approach would be to actually check what symbols are missing and what modules provide them.
    There is a file: /usr/lib/modules/<kernel_version>/modules.symbols that should list all symbols that the currently running kernel support and what module provides them. I'm not sure if this file is all properly filled in on dm800 so probably the best would be to inspect this file on a Linux running on your PC.

  • I am not sure how the linux kernel for the 800 is written.
    If dynamic loading of modules is supported and the module exists, it should be loaded automatically on the first reference to a particular symbol and the resolved address should be placed in the symbol table. If this a case it seems that some module is missing and this why you are getting the unresolved
    Check the modules to see where the symbol is defined (not referenced) and you can probably discover which module is missing.

    Otherwise, how do you know when and how symbols in modules are referenced so that you can have a prioritized loading order of modules.
    You have to know not only the symbols in the module but also the execution sequence.

  • thanks for the quick answer. will check it out.
    Mabye this driver will help you out. It was prepared by rmie for GP 5.1. Was working fine but with only one polarization. Told me it is the driver issue but didn't have time to look at it.

    Here is what I currently have in modules.symbols



      (1.93 kB, downloaded 373 times, last: )
    • b2c2.tar.gz

      (178.18 kB, downloaded 173 times, last: )

    Edited once, last by Czaja0 ().

  • Quote

    Originally posted by Czaja0
    thanks for the quick answer. will check it out.
    Mabye this driver will help you out. It was prepared by rmie for GP 5.1. Was working fine but with only one polarization. Told me it is the driver issue but didn't have time to look at it.

    Here is what I currently have in modules.symbols

    OK Czaja - you might be lucky this time...if...
    Have u installed my ipk ? If not...

    get this script: lsusb in shell script
    unzip it to your dreambox, make sure it's executable (chmod +x /path/to/where/you/extracted/lsusb
    and fire it up:

    Do this with your usb tuner connected to your box of course !

    Get the output (copy) and paste it it here.
    I need to know the USB ids of it. If you paste me what I request I'll update the ipk to v0.2 which will include this module in autoinstall/autoconfig.

  • here it is:

    welcome on your dreambox!
    Kernel 2.6.18-7.4-dm800 (#1 Wed Jan 19 18:56:41 CET 2011).
    dm800 login: root
    root@dm800:~# /usr/bin/lsusb
    Bus 001 Device 001: ID 148f:2573 Ralink Technology, Corp. RT2501/RT2573 Wireless
    Bus 001 Device 001: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial (IODATA
    USB-RSAQ2) PL2303 Serial Port
    Bus 001 Device 001: ID 0781:5567 SanDisk Corp. Cruszer Blade
    Bus 002 Device 002: ID 0af7:0101 B2C2, Inc. Digital TV USB Receiver (DVB-S/T/C /
    Bus 001 Device 001: ID 0409:005a NEC Corp. HighSpeed Hub
    Bus 003 Device 000: ID 0000:0000 CD-R/RW Drive
    Bus 002 Device 000: ID 0000:0000 CD-R/RW Drive
    Bus 001 Device 000: ID 0000:0000 CD-R/RW Drive