PCTV 292e USB TV tuner DVB-C/T/T2 on Turris Omnia

Hi,

I have a PCTV 292e USB TV tuner stick. Apparently Linux includes support for it from kernel 3.16:

https://linuxtv.org/wiki/index.php/PCTV_Systems_tripleStick_T2_(292e)

I am able to use the stick on a Raspberry Pi using OpenELEC without having to do anything at the command line, but was hoping to plug it directly into my Omnia and run tvheadend in an LXC container to stream over WAN.

My understanding (from the Turris DVB wiki page) is that I need Turris to recognise the stick before I can share it with the LXC container.

It appears my Omnia is running a 4.4 kernel:

root@turris:~# uname -r
4.4.134-8f7f4132dc88fb7034ce9648e5961be5-0

I’ve downloaded the firmware file indicated by the linuxtv.org wiki page into /lib/firmware/:

root@turris:~# ls -l /lib/firmware/
drwxr-xr-x    1 root     root            14 Mar 29  1957 ath10k
-rw-r--r--    1 root     root          6919 Jun  9 20:38 dvb-demod-si2168-b40-01.fw

However, all I see in dmesg relating to the stick is:

[    8.000823] usb 3-1: new high-speed USB device number 2 using xhci-hcd

Apologies - although I’ve used Linux for a while as a user/admin, I don’t have much experience of hardware. I’m not sure what further information is useful for troubleshooting this sort of thing.

lsusb -t seems to indicate there’s no driver for the device:

root@turris:~# lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M

lsusb -v does identify the device:

root@turris:~# lsusb -v -s 3:2

Bus 003 Device 002: ID 2013:025f PCTV Systems 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x2013 PCTV Systems
  idProduct          0x025f 
  bcdDevice            1.00
  iManufacturer           3 PCTV
  iProduct                1 PCTV 292e
  iSerial                 2 0013940319
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x03ac  1x 940 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

So can I assume the issue is that the Turris kernel doesn’t have the necessary device drivers compiled in? If so, is the right thing to do to submit a ticket requesting the addition of the drivers? (I’m not sure how to identify what drivers to request, though…)

Many thanks for any advice.

This thread suggests creating an issue on the Turris gitlab issue tracker to request the drivers:

I’ve done so:

You need to start with installation of appropriate modules, they are not part of every installation, but separate packages. Try opkg update && opkg list | grep kmod and install drivers related to your TV card with opkg install

Thanks miska - your colleague Josef has also replied in the gitlab issue with instructions, and pointed me at a documentation page I hadn’t found before:

https://doc.turris.cz/doc/en/howto/dvb

Unfortunately it seems that installing the drivers isn’t sufficient. I’ve installed them as instructed in the gitlab issue, and verified they’re installed:

root@turris:~# opkg install kmod-dvb-si2168
Package kmod-dvb-si2168 (4.4.138+1-1-1e8e1b4c23f383e990eb3c4f490f5f2e-1) installed in root is up to date.
root@turris:~# opkg install kmod-media-tuner-si2157
Package kmod-media-tuner-si2157 (4.4.138+1-1-1e8e1b4c23f383e990eb3c4f490f5f2e-1) installed in root is up to date.
root@turris:~# opkg install kmod-video-em28xx
Package kmod-video-em28xx (4.4.138+1-1-1e8e1b4c23f383e990eb3c4f490f5f2e-1) installed in root is up to date.

However, when I plug in the stick it appears it’s not recognised. My understanding is that udev should identify the device and automatically load the drivers.

What I see in dmesg is as before:

[ 246.060952] usb 3-1: new high-speed USB device number 2 using xhci-hcd

In /var/log/messages:

2018-06-30 12:10:18 info kernel[]: [27198.270953] usb 3-1: new high-speed USB device number 3 using xhci-hcd

lsusb -t still shows no driver:

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 480M

lsmod shows the drivers are not in use:

root@turris:~# lsmod | egrep '(dvb|si2|em2)'
dvb_core               72811  1 dvb_usb
dvb_usb                15256  0 
input_core             26263  3 dvb_usb
rc_core                14440  1 dvb_usb
si2157                  4367  0 
si2168                  6034  0 

Unfortunately the DVB wiki page would seem to suggest this means more drivers are needed, though I suspect that’s not the case. I’ll see if I can confirm the packages listed in the gitlab issue are in fact the complete set.

Otherwise I’ll see if I can find out how to troubleshoot this further; perhaps there is a way to get a verbose trace (from udev?) to see why it isn’t loading the modules.

Looks like the em28xx driver is not automatically loading. If I load it manually with modprobe, I see the following in dmesg, which is looking promising:

[83407.347649] em28xx: New device PCTV PCTV 292e @ 480 Mbps (2013:025f, interface 0, class 0)
[83407.347660] em28xx: DVB interface 0 found: isoc
[83407.347753] em28xx: chip ID is em28178
[83409.336946] em28178 #0: EEPROM ID = 26 00 01 00, EEPROM hash = 0xa413f604
[83409.336953] em28178 #0: EEPROM info:
[83409.336956] em28178 #0: 	microcode start address = 0x0004, boot configuration = 0x01
[83409.342920] em28178 #0: 	AC97 audio (5 sample rates)
[83409.342924] em28178 #0: 	500mA max power
[83409.342929] em28178 #0: 	Table at offset 0x27, strings=0x146a, 0x1888, 0x0a7e
[83409.343018] em28178 #0: Identified as PCTV tripleStick (292e) (card=94)
[83409.343023] em28178 #0: dvb set to isoc mode.
[83409.343068] usbcore: registered new interface driver em28xx

Not sure why this driver doesn’t load automatically. I also don’t see any obvious dvb device in /dev/, so more to investigate…