Amlogic S905X(w) - Sundtek Media TV Stick (DVB-C/T/T2) not usable

  • This is related to this thread and I opened this thread on @kszaq  's request. Other than in the aforementioned post, I believe the trouble is with the Sundtek driver and not with TvHeadend, since VDR can also not tune to a channel when using the (high quality and expensive) Sundtek stick, while both TvHeadend and VDR work just fine with the (cheap and ok quality) XBOX ONE Digital tuner.

    I would like to mention that I have been using these Sundtek Sticks for almost 8 years now. They have been in heavy use during that time (often attached to a 24/7 headless VDR on a Dockstar and now a cubietruck). So, I would really love to be able to use them with the new toy - the china boxes.

    To make this (somewhat) reproducible, here is what I did (on November 29th 2017 on a S905X 1GB/8GB EgoIggo:(

    • created a fresh SD card with kszaq 's standard image
    • used a dedicated device tree and remote.conf
    • did the usual setup steps (including enabling SSH)
    • installed addons from LibreELEC addons repo
      • - Sundtek MediaTV (vers. 8.2.104)
      • - TvHeadend Server 4.2 (vers. 8.2.112)
      • - VDR PVR backend (vers. 8.2.105; this will automatically install VDR VNSI client (vers. 2.6.23.1))
      • - TvHeadend HTSP client (vers. 3.4.27.1)

    I then disabled VDR (backend and client) and also TvHeadend server in order to be able to copy over the respective configurations so as to be able to use them right away. Of course, I enabled debug logging in Kodi.

    Then, I checked whether the Sundtek sticks were found (locally and over the network):

    So, the sticks were visible the way they should be.

    After copying over the configuration, I re-enabled TvHeadend server, headed over to the Web-If and attached the DVB-adapter to the DVB-C network and enabled it. Here, it can already be seen, that something is not quite right, because TvHeadend only sees the DVB-C part of the tuner, not the DVB-T part (on the left you can see the situation on the Wetek Play (as it should be) and to the left the situation on an AML S905X):

    Then, I turned the box off, power-cycled and turned it back on. Then, I went to TV and tried to watch the first channel (not encrypted). This gave me a message form the TvHeadend HTSP Client saying "No free adapter available". I then stopped TvHeadend server via the command line.

    This lead to the following logs: dmesg | paste and Kodi log: log-2017-11-29-12.22.24.zip

    Then, in for TvHeadend server, I activated TRACE Debug setting Debug Value #1 to "all" first and to "dvb" second and tried watching the channel again. This gave the following two debug.txt files: tvheadend_debug.zip

    I would like to mention, that

    • it does not make a difference whether the Sundtek stick is attached locally or accessed in network mode (i.e., attached to a different device, where it works perfectly well).
    • the same issue arises on another S905X box as well as on a S905W box (which I sent back)

    As GDPR-1 mentioned in the related thread I linked above, all this must be due to the 64bit kernel mixed with the 32bit user space.

    Anything else I can do like provide similar info for devices where the Sundtek sticks work (Rpi3, Wetek Play) or test something specific on the china box, please let me know.

  • I had a look at the Sundtek driver and it's a binary blob. I suspect it is not working because it is compiled with different headers than kernel used in my releases. Fixing this would require recompiling kernel, every single DVB addon and testing every other configurations that users might have - after the builds got to a place where almost everything DVB-related works (except Sundtek!) I feel this isn't something I'd want to do, sorry.

    I will think if there's another solution you can try.

  • Here, it can already be seen, that something is not quite right, because TvHeadend only sees the DVB-C part of the tuner, not the DVB-T part (on the left you can see the situation on the Wetek Play (as it should be) and to the left the situation on an AML S905X):

    I think stick can only work in one mode and not both. Or this is dual tuner? In addon settings you can enable DVB-C o DVB-T and this mode is set when driver is started. If this is dual tuner then I should change this in settings. But I doubt. At least Marcus newer requested this.

  • I think stick can only work in one mode and not both. Or this is dual tuner? In addon settings you can enable DVB-C o DVB-T and this mode is set when driver is started. If this is dual tuner then I should change this in settings. But I doubt. At least Marcus newer requested this.

    Actually, I tried this also, explicitly setting DVB-C mode in the config, but that did not change anything. As the picture shows, what we see on the china boxes is not normal. Both capabilities should be visible.

  • Wow, man you are unbelievable, a test build already? :cool: Thanks!

    Anyway: there is no change with the Sundtek stick, unfortunately, but the XBOX ONE tuner worked. I even hotplugged it in, after I had chosen a channel to watch with the Sundtek. TvHeadend kept trying and when I plugged in the XBOX ONE tuner, it immediately started the show.

  • I understand that if you look at TVHeadend log (via web browser) there is a DTV_CLEAR error for Sundtek tuner? I'm wondering why, I added the only missing patch that used to be in my builds and made the compat section aligned to Raybuntu's build where Sundtek reportedly works...

  • Sorry, I don't quite understand. What do yu mean by "TvHeadend log (via web browser)"? I am still quite new to TvHeadend. I played around with it a bit a few years back, then decided to go with VDR, but now just started with it again. So, please, bear with me ...

    EDIT: Ok, I might now know what you mean ... Here is the debug.txt for the situation I described with your testbuild: debug.txt

    Indeed, like you said, DTV_CLEAR failed ...

    Edited once, last by chessplayer (November 29, 2017 at 10:40 PM).

  • One more thing: Sundtek have a support forum and they are (mostly) quite responsive. Maybe they would help with source code or something. I already opened a thread there (in German, I am afraid). Is there anything in particular I could ask them for? Or maybe you could let me know what you think they would need to do to compile the driver the way it would have to be done?

  • I don't think there's a reason to involve Sundtek (not yet) - first let's try to figure out why it's working in @Raybuntu's builds and not in mine. This probably gets to having a proper set of patches. I will prepare another test build for you today evening.

  • Guys, thanks a lot for your efforts, but the situation is still the same. The driver is 32bit, that is true:

    Code
    mediaclient --arch
    Architecture: armsysvhf

    Do I need to install anything new or should just doing the update be enough?

    Some additional information: I tried re-installing the driver where I even deleted the files in userdata/addon_data. Also, I explicitly set dvbmode to DVBC via commandline, all to no avail ...

    Edited once, last by chessplayer (November 30, 2017 at 6:02 PM).