====== Using a DVBSky T982 PCIe card under Linux ====== I recently acquired a [[http://www.dvbsky.net/Products_T982.html|DVBSky T982]] DVB-T / DVB-C decoder card (it was already fitted in a machine I bought second-hard for other reasons). It's based on a [[https://www.verical.com/datasheet/conexant-systems-unsorted-cx23885-15z-367583.pdf|Conexant CX23885]] decoder and a [[https://www.silabs.com/tv-and-video/digital-tv-and-satellite-demodulators/si2168|Silicon Labs Si2168]] demodulator. I'm trying to get it working under Linux (Debian 10 Buster / Devuan 3 Beowulf kernel 4.19.0-10) and this is a bit of a story about how it's not obvious (even though it's actually easy) to do this. I've used [[https://www.linuxtv.org/wiki/index.php/Scan|scan]], [[https://www.linuxtv.org/wiki/index.php/Dvbscan|dvbscan]] and [[https://www.linuxtv.org/wiki/index.php/W_scan|w_scan]], and none of them find any channels. I have a DVB-T antenna plugged into one input socket on the card, and a DVB-C feed from my local provider [[https://www.netcologne.de/privatkunden/hilfe/programmbelegung-senderlisten|NetCologne]] plugged into the other. I know that the NetCologne feed provides multiple digital TV channels because it works nicely on my LG 42LH4000 television. ===== Firmware ===== I've installed the firmware package [[https://packages.debian.org/buster/firmware-misc-nonfree|firmware-misc-nonfree]] and I can see the card being detected and set up in dmesg:[ 7.571465] cx23885: cx23885 driver version 0.0.4 loaded [ 7.571708] cx23885: CORE cx23885[0]: subsystem: 4254:0982, board: DVBSky T982 [card=51,autodetected] [ 7.812110] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 7.854515] cx25840 12-0044: cx23885 A/V decoder found @ 0x88 (cx23885[0]) [ 7.876695] cx25840 12-0044: firmware: direct-loading firmware v4l-cx23885-avcore-01.fw [ 8.494100] cx25840 12-0044: loaded v4l-cx23885-avcore-01.fw firmware (16382 bytes) [ 8.509383] cx23885: cx23885_dvb_register() allocating 1 frontend(s) [ 8.509392] cx23885: cx23885[0]: cx23885 based dvb card [ 8.534800] i2c i2c-11: Added multiplexed i2c bus 13 [ 8.534806] si2168 11-0064: Silicon Labs Si2168-A30 successfully identified [ 8.534810] si2168 11-0064: firmware version: A 3.0.2 [ 8.545398] si2157 13-0060: Silicon Labs Si2147/2148/2157/2158 successfully attached [ 8.545426] dvbdev: DVB: registering new adapter (cx23885[0]) [ 8.545432] cx23885 0000:03:00.0: DVB: registering adapter 0 frontend 0 (Silicon Labs Si2168)... [ 8.573687] cx23885: DVBSky T982 port 1 MAC address: 00:17:42:54:09:87 [ 8.573691] cx23885: cx23885_dvb_register() allocating 1 frontend(s) [ 8.573693] cx23885: cx23885[0]: cx23885 based dvb card [ 8.584315] i2c i2c-10: Added multiplexed i2c bus 14 [ 8.584321] si2168 10-0064: Silicon Labs Si2168-A30 successfully identified [ 8.584324] si2168 10-0064: firmware version: A 3.0.2 [ 8.589796] si2157 14-0060: Silicon Labs Si2147/2148/2157/2158 successfully attached [ 8.589825] dvbdev: DVB: registering new adapter (cx23885[0]) [ 8.589832] cx23885 0000:03:00.0: DVB: registering adapter 1 frontend 0 (Silicon Labs Si2168)... [ 8.618175] cx23885: DVBSky T982 port 2 MAC address: 00:17:42:54:09:88 [ 8.618181] cx23885: cx23885_dev_checkrevision() Hardware revision = 0xa5 [ 8.618188] cx23885: cx23885[0]/0: found at 0000:03:00.0, rev: 4, irq: 16, latency: 0, mmio: 0xfe600000 ===== Devices ===== This gives me two adapters under /dev/dvb:# ls -alR /dev/dvb /dev/dvb: total 0 drwxr-xr-x 4 root root 80 Apr 2 17:59 . drwxr-xr-x 18 root root 3600 Apr 2 17:59 .. drwxr-xr-x 2 root root 120 Apr 2 17:59 adapter0 drwxr-xr-x 2 root root 120 Apr 2 17:59 adapter1 /dev/dvb/adapter0: total 0 drwxr-xr-x 2 root root 120 Apr 2 17:59 . drwxr-xr-x 4 root root 80 Apr 2 17:59 .. crw-rw---- 1 root video 212, 1 Apr 2 17:59 demux0 crw-rw---- 1 root video 212, 2 Apr 2 17:59 dvr0 crw-rw---- 1 root video 212, 0 Apr 2 17:59 frontend0 crw-rw---- 1 root video 212, 3 Apr 2 17:59 net0 /dev/dvb/adapter1: total 0 drwxr-xr-x 2 root root 120 Apr 2 17:59 . drwxr-xr-x 4 root root 80 Apr 2 17:59 .. crw-rw---- 1 root video 212, 5 Apr 2 17:59 demux0 crw-rw---- 1 root video 212, 6 Apr 2 17:59 dvr0 crw-rw---- 1 root video 212, 4 Apr 2 17:59 frontend0 crw-rw---- 1 root video 212, 7 Apr 2 17:59 net0 I have no idea whether the top connector on the card corresponds to adapter0 or adapter1, but I have no reason to believe that one of them is for DVB-T and the other for DVB-C, so I've just plugged in the antenna and the cable feed and tried to scan for channels. **Edit**: it turns out that adapter0 is the top connector, and adapter1 is the bottom connector. It also turns out that no, they're not specific to DVB-T or -C: both connectors can do both types of signal. ===== More firmware ===== I just spotted that [[https://packages.debian.org/buster/firmware-misc-nonfree|firmware-misc-nonfree]] clearly isn't sufficient. Whilst I'm doing a scan, the following turns up in dmesg / syslog:[76759.199059] si2168 10-0064: firmware: failed to load dvb-demod-si2168-a30-01.fw (-2) [76759.199164] si2168 10-0064: Direct firmware load for dvb-demod-si2168-a30-01.fw failed with error -2 [76759.199171] si2168 10-0064: firmware file 'dvb-demod-si2168-a30-01.fw' not found A bit of a Google search turns up [[https://tvheadend.org/boards/5/topics/22103|a forum page]] telling me where I can download [[https://github.com/LibreELEC/dvb-firmware/raw/master/firmware/dvb-demod-si2168-a30-01.fw|this firmware file]], and also [[https://github.com/LibreELEC/dvb-firmware/raw/master/firmware/dvb-tuner-si2158-a20-01.fw|another one]] which seems to be related. So, I've downloaded those, put them into /lib/firmware and tried again (initially without a reboot), and this time a scan puts into syslog:[77900.749275] si2168 11-0064: firmware: direct-loading firmware dvb-demod-si2168-a30-01.fw [77900.749287] si2168 11-0064: downloading firmware from file 'dvb-demod-si2168-a30-01.fw' [77903.797846] si2168 11-0064: firmware version: � 3.0.16 This looks more promising, however so far it still hasn't encouraged anything to work. ===== Progress! ===== # rmmod cx23885 # modprobe cx23885 This now causes a scan process to load not only the 'demod' firmware but also the 'tuner' firmware, and this **does** help. [80185.675356] si2168 11-0064: firmware: direct-loading firmware dvb-demod-si2168-a30-01.fw [80185.675367] si2168 11-0064: downloading firmware from file 'dvb-demod-si2168-a30-01.fw' [80188.719879] si2168 11-0064: firmware version: � 3.0.16 [80188.731366] si2157 13-0060: found a 'Silicon Labs Si2158-A20' [80188.731440] si2157 13-0060: firmware: direct-loading firmware dvb-tuner-si2158-a20-01.fw [80188.731445] si2157 13-0060: downloading firmware from file 'dvb-tuner-si2158-a20-01.fw' [80189.731408] si2157 13-0060: firmware version: 2.1.9 **[[https://www.linuxtv.org/wiki/index.php/Scan|scan]]** now gives me a considerable quantity of output for DVB-C, as expected from the number of channels NetCologne provides, but nothing for DVB-T... **[[https://www.linuxtv.org/wiki/index.php/Dvbscan|dvbscan]]** still produces nothing, but then most of the documentation says that one of the tools __scan__ and __dvbscan__ will work, and the other one won't, with any given adapter, so I'm not too surprised. **[[https://www.linuxtv.org/wiki/index.php/W_scan|w_scan]]** gives plenty of output, for both DVB-T and DVB-C. This is what I get in Cologne, Germany at Easter 2021: * DVB-T {{:technotes:w_scan.dvb-t.full.txt|full output}} from command, {{:technotes:w_scan.dvb-t.m.txt|channel list}} in mplayer format * DVB-C {{:technotes:w_scan.dvb-c.full.txt|full output}} from command, {{:technotes:w_scan.dvb-c.m.txt|channel list}} in mplayer format You might then want to use a [[noworlater|recording script]] which can record now, or later, for a specified duration, on a specified channel. ---- [[.:|Go up]]\\ Return to [[:|main index]].