Autor Thema: linuxserver/tvheadend + sundtek  (Gelesen 13718 mal)

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #15 am: Dezember 06, 2021, 03:24:58 Nachmittag »
check dmesg if there's a hardware issue or a software issue.
Failure is a good thing! I'll fix it

tomasl

  • Newbie
  • *
  • Beiträge: 24
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #16 am: Dezember 06, 2021, 05:55:19 Nachmittag »
it seems that this set of messages repeats. I wonder if it's every time the adapter disappears from TVHeadend. those are today's messages, but it's similar from yesterday when I tested plugging and unplugging the tuner from USB hub directly to HC4 port and back again. so perhaps every time the USB hub somehow loses power the adapter disappears from TVHeadend.
[Mon Dec  6 10:11:49 2021] usb 1-2.3: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 64 rq 2 len 1 ret -71
[Mon Dec  6 10:11:49 2021] usb 1-2.3: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 64 rq 2 len 1 ret -71
[Mon Dec  6 10:11:49 2021] usb 1-2.3: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 64 rq 2 len 1 ret -71
[Mon Dec  6 10:11:49 2021] usb 1-2.3: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 64 rq 2 len 1 ret -71
[Mon Dec  6 10:11:49 2021] usb 1-2.3: USB disconnect, device number 55
[Mon Dec  6 10:11:49 2021] usb 1-2.3: new high-speed USB device number 56 using xhci-hcd
[Mon Dec  6 10:11:49 2021] usb 1-2.3: New USB device found, idVendor=2659, idProduct=1502
[Mon Dec  6 10:11:49 2021] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Mon Dec  6 10:11:49 2021] usb 1-2.3: Product: SkyTV Ultimate 6 2016/Q1
[Mon Dec  6 10:11:49 2021] usb 1-2.3: Manufacturer: Sundtek
[Mon Dec  6 10:11:49 2021] usb 1-2.3: SerialNumber: U171212190229
[Mon Dec  6 10:11:49 2021] usb 1-2.3: Unsupported device
[Mon Dec  6 10:11:49 2021] usb 1-2.3: Unsupported device
[Mon Dec  6 10:11:49 2021] usb 1-2.3: Unsupported device
[Mon Dec  6 10:11:49 2021] usb 1-2.3: Unsupported device
[Mon Dec  6 10:11:49 2021] usb 1-2.3: Unsupported device
[Mon Dec  6 10:11:49 2021] usb 1-2.3: Unsupported device
[Mon Dec  6 10:11:49 2021] usb 1-2.3: Unsupported device
[Mon Dec  6 11:59:11 2021] docker0: port 1(vethd684a46) entered disabled state
[Mon Dec  6 11:59:11 2021] veth1d78fb8: renamed from eth0
[Mon Dec  6 11:59:11 2021] docker0: port 1(vethd684a46) entered disabled state
[Mon Dec  6 11:59:11 2021] device vethd684a46 left promiscuous mode
[Mon Dec  6 11:59:11 2021] docker0: port 1(vethd684a46) entered disabled state
[Mon Dec  6 11:59:11 2021] docker0: port 1(vethfec4937) entered blocking state
[Mon Dec  6 11:59:11 2021] docker0: port 1(vethfec4937) entered disabled state
[Mon Dec  6 11:59:11 2021] device vethfec4937 entered promiscuous mode
[Mon Dec  6 11:59:11 2021] IPv6: ADDRCONF(NETDEV_UP): vethfec4937: link is not ready
[Mon Dec  6 11:59:11 2021] docker0: port 1(vethfec4937) entered blocking state
[Mon Dec  6 11:59:11 2021] docker0: port 1(vethfec4937) entered forwarding state
[Mon Dec  6 11:59:12 2021] eth0: renamed from vetha074485
[Mon Dec  6 11:59:12 2021] IPv6: ADDRCONF(NETDEV_CHANGE): vethfec4937: link becomes ready
[Mon Dec  6 11:59:13 2021] amlogic-pcie-v2 fc000000.pcieA: the device class is not reported correctly from the register
[Mon Dec  6 11:59:16 2021] usb 1-2.3: usbfs: process 103060 (mediasrv) did not claim interface 0 before use
[Mon Dec  6 11:59:30 2021] usb 1-2.3: usbfs: process 103067 (mediasrv) did not claim interface 2 before use

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #17 am: Dezember 07, 2021, 01:14:29 Vormittag »
You are using it via USB Hub no? if so try to remove it, some hubs are troublesome (which might possibly be related to the hardware design of the particular hub and not related to the chipset on the hub)
Failure is a good thing! I'll fix it

tomasl

  • Newbie
  • *
  • Beiträge: 24
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #18 am: Dezember 07, 2021, 02:01:24 Nachmittag »
right now it works since yesterday container restart, and I don't want to touch it. if it again stop working I'll try.
but I had it connected directly to the HC4 and it didn't work either. I tried multiple different scenarios.
I suspect something's wrong with the HC4 USB HW/controller. this is my second HC4, first HC4 USB controller died after few weeks  of using it and I returned it under warranty. I liked the idea to have cheapest possible home NAS with TVHeadend server.
I don't think there is a problem with sundtek dongle. it worked for years and is still working on the old box as a backup when it doesn't work with HC4.
what's frustrating is, that I have no idea where is the problem and can't find out with my poor linux knowledge. if it's docker, or tvheadend, or HC4 HW or Odroid HC4 ubuntu image, or something else.

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #19 am: Dezember 07, 2021, 04:46:18 Nachmittag »
Check the logfiles as mentioned, if the tuner shows up with mediaclient then there's a setup issue
if the tuner disappears in dmesg then there's a hardware (or possibly USB stack driver) issue, and maybe there's some more information about it available.
Failure is a good thing! I'll fix it

tomasl

  • Newbie
  • *
  • Beiträge: 24
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #20 am: Dezember 15, 2021, 10:21:28 Vormittag »
what I noticed is, that the /dev/dvb disappears on the host after ubuntu reboot.
the container then won't start of course.
perhaps that was the reason, that somehow the container lost access to this folder previously and I missed something and just always tried to re-create the container and install drivers inside container and never noticed that there is something wrong with /dev/dvb
so after reboot, when I create the /dev/dvb content with the below commands, the tvh container starts fine and adapter is present in tvh interface. I'll observe further.

mkdir -p /dev/dvb/adapter0
mknod /dev/dvb/adapter0/frontend0 c 212 1
mknod /dev/dvb/adapter0/dvr0 c 212 5
mknod /dev/dvb/adapter0/demux0 c 212 3

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re: linuxserver/tvheadend + sundtek
« Antwort #21 am: Dezember 16, 2021, 05:30:25 Vormittag »
yes that's a stupidity of docker that those nodes have to exist outside of the image before being able to use them inside.

Docker prohibits the use of mknod() inside the docker, if the corresponding major/minor number is not in some kind of list before starting up docker. That special file (with major/minor number) links to the device itself.
That's something where LXR containers are definitely ahead of Docker.

As some workaround for docker you can install the driver on the host and create a config file /etc/sundtek.conf
and put enabledocker=on into it, the driver will just pre-create the nodes and exit.

        media_get_config(dev->config, "enabledocker", &docker, NULL);
        if (docker && strcmp(docker, "on")==0) {
                system("mkdir -p /dev/dvb/adapter0");
                system("mknod /dev/dvb/adapter0/frontend0 c 212 1");
                system("mknod /dev/dvb/adapter0/dvr0 c 212 5");
                system("mknod /dev/dvb/adapter0/demux0 c 212 3");
                system("mkdir -p /dev/dvb/adapter1");
                system("mknod /dev/dvb/adapter1/frontend0 c 212 7");
                system("mknod /dev/dvb/adapter1/dvr0 c 212 11");
                system("mknod /dev/dvb/adapter1/demux0 c 212 9");
                system("mkdir -p /dev/dvb/adapter2");
                system("mknod /dev/dvb/adapter2/frontend0 c 212 13");
                system("mknod /dev/dvb/adapter2/dvr0 c 212 17");
                system("mknod /dev/dvb/adapter2/demux0 c 212 15");
                system("mkdir -p /dev/dvb/adapter3");
                system("mknod /dev/dvb/adapter3/frontend0 c 212 19");
                system("mknod /dev/dvb/adapter3/dvr0 c 212 23");
                system("mknod /dev/dvb/adapter3/demux0 c 212 21");
                exit(0);
        }
Failure is a good thing! I'll fix it