Project

General

Profile

DVB-C USB stick recognized, /dev/dvb not available (therefore device not visible in TV Adapters)

Added by A AAA 2 months ago

On QNAP QTS 4.5 the 2x TV Butler DVB-C sticks (quivalent to Logilink VG0022A using firmware dvb-usb-it9303-01.fw) are recognized (manufacturer Dexatek Technology Ltd)

uname -a
Linux NAS-TVS-472XT 4.14.24-qnap #4 SMP Fri Jan 28 07:31:12 CST 2022 x86_64 GNU/Linux

lsusb
Bus 001 Device 006: ID 1d19:0100 Dexatek Technology Ltd.
Bus 001 Device 005: ID 1d19:0100 Dexatek Technology Ltd.
Bus 001 Device 002: ID 1005:b155 Apacer Technology, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

dmesg
...
[  957.456793] usb 1-4: USB disconnect, device number 3
[  957.483571] [usb.001.003] /sys/devices/pci0000:00/0000:00:14.0/usb1/1-4 removed.
[  959.822043] usb 1-6: USB disconnect, device number 4
[  959.850480] [usb.001.004] /sys/devices/pci0000:00/0000:00:14.0/usb1/1-6 removed.
[  971.989620] usb 1-6: new high-speed USB device number 5 using xhci_hcd
[  972.143249] [usb.001.005] /sys/devices/pci0000:00/0000:00:14.0/usb1/1-6 added.
[  973.839680] usb 1-4: new high-speed USB device number 6 using xhci_hcd
[  973.991997] [usb.001.006] /sys/devices/pci0000:00/0000:00:14.0/usb1/1-4 added.

cat /sys/bus/usb/devices/1-4/product
TS Aggregator

TVMosaic qnap app recognizes the sticks as tv adapters (but DVBLogic went out of business) therefore I assume drivers are loaded successfully

Hovever, /dev/dvb does not exist and therefore TVHeadend doesn't recognize them as DVB-C adapters.

I tried to rebuild /dv/dvb manually according to this (http://www.roland-gersch.de/dec2000/node6.html)

rm -rf /dev/dvb

mkdir /dev/dvb
chmod 755 /dev/dvb

for i in `seq 0 3`; do
        echo "Creating DVB devices in /dev/dvb/adapter$i" 
        mkdir /dev/dvb/adapter$i
        chmod 755 /dev/dvb/adapter$i
        mknod -m 0660 /dev/dvb/adapter$i/video0    c 250   `expr 64 \* $i + 0`
        mknod -m 0660 /dev/dvb/adapter$i/audio0    c 250   `expr 64 \* $i + 1`
        mknod -m 0660 /dev/dvb/adapter$i/frontend0 c 250   `expr 64 \* $i + 3`
        mknod -m 0660 /dev/dvb/adapter$i/demux0    c 250   `expr 64 \* $i + 4`
        mknod -m 0660 /dev/dvb/adapter$i/dvr0      c 250   `expr 64 \* $i + 5`
        mknod -m 0660 /dev/dvb/adapter$i/ca0       c 250   `expr 64 \* $i + 6`
        mknod -m 0660 /dev/dvb/adapter$i/net0      c 250   `expr 64 \* $i + 7`
        mknod -m 0660 /dev/dvb/adapter$i/osd0      c 250   `expr 64 \* $i + 8`
        chown admin /dev/dvb/adapter$i/*
done

cat /dev/dvb/adapter0/dvr0
cat: /dev/dvb/adapter0/dvr0: No such device or address

cat /dev/dvb/adapter0/frontend0: No such device or address

However there is no such device in frontend0 and dvr0 and the structue is removed on next reboot

Is there any way to use the dvb-c usb sticks with TVHeadend?

Thank you very much for your help!


Replies (4)

RE: DVB-C USB stick recognized, /dev/dvb not available (therefore device not visible in TV Adapters) - Added by saen acro 2 months ago

https://github.com/uglymagoo/plexmediaserver-installer/blob/master/lib/udev/rules.d/60-tvbutler-perms.rules

Linux
Rename the attached file to 60-tvbutler-perms.rules and copy it to /etc/udev/rules.d

Then run:
sudo udevadm control --reload-rules
sudo service udev restart
sudo udevadm trigger

RE: DVB-C USB stick recognized, /dev/dvb not available (therefore device not visible in TV Adapters) - Added by A AAA 2 months ago

Thank you very much for your reply!

I downloaded https://github.com/uglymagoo/plexmediaserver-installer/blob/master/lib/udev/rules.d/60-tvbutler-perms.rules with the contents
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="0100", GROUP="video", MODE="0664"
and copied the file to /etc/udev/rules.d

Note: GROPUP="video" - I don't have a group with this name.
groups
administrators everyone

Should I replace it with administrators?

[/etc/udev/rules.d] # ls -lisa
total 148
 37321   0 drwxr-xr-x 2 admin administrators     80 2022-04-30 08:25 ./
 37320   0 drwxr-xr-x 3 admin administrators     80 2022-04-30 08:21 ../
347361 144 -rw-r--r-- 1 admin administrators 143571 2022-04-30 08:25 60-tvbutler-perms.rules
 37322   4 -rw-r--r-- 1 admin administrators    636 2022-01-28 01:12 65-drbd.rules

[/etc/udev/rules.d] # sudo udevadm control --reload-rules
[/etc/udev/rules.d] # sudo service udev restart
sudo: service: command not found

Unfortunately the service command on my qnap system is not located there: /usr/sbin/service

After a reboot file has disappeared:

[/etc/udev/rules.d] # ls -lisa
total 4
37979 0 drwxr-xr-x 2 admin administrators  60 2022-01-28 01:12 ./
37978 0 drwxr-xr-x 3 admin administrators  60 2022-01-28 01:12 ../
37980 4 -rw-r--r-- 1 admin administrators 636 2022-01-28 01:12 65-drbd.rules
[/etc/udev/rules.d] #

And dev/dvb does not exist:

[/etc/udev/rules.d] # ls /dev/dvb
/bin/ls: cannot access /dev/dvb: No such file or directory
[/etc/udev/rules.d] #

Note: many service commands can be found but unfortunately not for TVHeadend in the particular .qpkg directory

[/] # find . -name "service" 
./share/CACHEDEV2_DATA/.qpkg/container-station/system-docker/overlay2/b49291270112fbae80c0044ea06ea94fd5becf05f5772a4d5c794972b270ca1e/diff/usr/sbin/service
./share/CACHEDEV2_DATA/.qpkg/container-station/system-docker/overlay2/dde0d7ffa47cbe99d028671751e32c336fe81ee460696c1f6a900d74cc418498/merged/usr/sbin/service
./share/CACHEDEV2_DATA/.qpkg/container-station/system-docker/overlay2/e927a959546c912ce129047b264391b9d099bff3b617a1d85ffef7d332955ef1/merged/usr/sbin/service
./share/CACHEDEV2_DATA/.qpkg/photostation2/m/js/app/service
./share/CACHEDEV2_DATA/.qpkg/MediaSignPlayer/CodexPackExt/usr/sbin/service
./share/CACHEDEV2_DATA/.qpkg/MediaSignPlayer/CodexPackExt/share/CACHEDEV2_DATA/.qpkg/container-station/system-docker/overlay2/b49291270112fbae80c0044ea06ea94fd5becf05f5772a4d5c794972b270ca1e/diff/usr/sbin/service
./share/CACHEDEV2_DATA/.qpkg/MediaSignPlayer/CodexPackExt/share/CACHEDEV2_DATA/.qpkg/container-station/system-docker/overlay2/dde0d7ffa47cbe99d028671751e32c336fe81ee460696c1f6a900d74cc418498/merged/usr/sbin/service
./share/CACHEDEV2_DATA/.qpkg/MediaSignPlayer/CodexPackExt/share/CACHEDEV2_DATA/.qpkg/container-station/system-docker/overlay2/e927a959546c912ce129047b264391b9d099bff3b617a1d85ffef7d332955ef1/merged/usr/sbin/service
./share/CACHEDEV2_DATA/.qpkg/MediaSignPlayer/CodexPackExt/share/CACHEDEV2_DATA/.qpkg/photostation2/m/js/app/service
./share/CACHEDEV2_DATA/.qpkg/MediaSignPlayer/CodexPackExt/share/CACHEDEV2_DATA/.qpkg/MediaSignPlayer/CodexPackExt/usr/sbin/service
./share/CACHEDEV2_DATA/.qpkg/MediaSignPlayer/CodexPackExt/share/CACHEDEV2_DATA/.qpkg/MediaSignPlayer/CodexPackExt/share/CACHEDEV2_DATA/.qpkg/container-station/system-docker/overlay2/b49291270112fbae80c0044ea06ea94fd5becf05f5772a4d5c794972b270ca1e/diff/usr/sbin/ser
.....

[/] # cd /share/CACHEDEV1_DATA/.qpkg/TVHeadend
[/share/CACHEDEV1_DATA/.qpkg/TVHeadend] # find . -name "service" 
[/share/CACHEDEV1_DATA/.qpkg/TVHeadend] #

What would you suggest?

RE: DVB-C USB stick recognized, /dev/dvb not available (therefore device not visible in TV Adapters) - Added by A AAA 2 months ago

Thanks!

When I test it I get the following message:

udevadm test SUBSYSTEM=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="0100", GROUP="administrators", MODE="0664" 
run_command: calling: test
udevadm_test: version 140
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/lib/udev/rules.d/50-udev.rules' as rules file
udev_rules_new: rules use 33084 bytes tokens (2757 * 12 bytes), 5250 bytes buffer
udev_rules_new: temporary index used 11280 bytes (564 * 20 bytes)
unable to open device '/sysSUBSYSTEM==usb,'

 sudo udevadm test /etc/udev/rules.d/60-tvbutler-perms.rules
run_command: calling: test
udevadm_test: version 140
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/lib/udev/rules.d/50-udev.rules' as rules file
udev_rules_new: rules use 33084 bytes tokens (2757 * 12 bytes), 5250 bytes buffe                                                                             r
udev_rules_new: temporary index used 11280 bytes (564 * 20 bytes)
unable to open device '/sys/etc/udev/rules.d/60-tvbutler-perms.rules'

 dmesg | grep usb
[    0.955017] usbcore: registered new interface driver usbfs
[    0.961009] usbcore: registered new interface driver hub
[    0.966025] usbcore: registered new device driver usb
[    7.766450] usbcore: registered new interface driver btusb
[    7.966128] usbcore: registered new interface driver usbhid
[    7.966129] usbhid: USB HID core driver
[    8.908623] usbcore: registered new interface driver usblp
[    8.976315] usbcore: registered new interface driver usb-storage
[    8.983048] usbcore: registered new interface driver uas
[    9.273005] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    9.423038] usb-storage 1-1:1.0: USB Mass Storage device detected
[    9.429185] scsi host6: usb-storage 1-1:1.0
[    9.548003] usb 1-4: new high-speed USB device number 3 using xhci_hcd
[    9.799002] usb 1-6: new high-speed USB device number 4 using xhci_hcd
[   10.463324] Check proc_name[usb-storage].
[   10.475492] Check proc_name[usb-storage].
[   10.482513] Check proc_name[usb-storage].
[   10.486534] Check proc_name[usb-storage].
[   10.496460] Check proc_name[usb-storage].
[   10.521937] Check proc_name[usb-storage].
[   11.143469] usbcore: registered new interface driver r8152
[   11.197401] Check proc_name[usb-storage].
[   11.202156] Check proc_name[usb-storage].
[   21.979893] usbcore: registered new interface driver usbserial
[   21.986398] usbcore: registered new interface driver pl2303
[   21.991990] usbserial: USB Serial support registered for pl2303
[   21.998640] usbcore: registered new interface driver cdc_acm
[   48.467430] snd_usb_audio: unknown parameter 'qnap_start_index' ignored
[   48.474150] usbcore: registered new interface driver snd-usb-audio
[   48.483187] usbcore: registered new interface driver snd-usb-caiaq
[   48.493249] usbcore: registered new interface driver uvcvideo
[  570.925440] [usb.001.003] /sys/devices/pci0000:00/0000:00:14.0/usb1/1-4 added.
[  570.925611] [usb.001.004] /sys/devices/pci0000:00/0000:00:14.0/usb1/1-6 added.
[  570.931908] [usb.001.002] /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1 added.

p.s: and I tried chmod 777 /etc/udev/rules.d/60-tvbutler-perms.rules as suggested in one of the referred pages but without success

Sorry, my unix skills are only very basic

    (1-4/4)