Archive for the ‘Media Center’ Category

DVB-C card for digital TV on my mediacenter

Sunday, April 1st, 2007

I was not happy with the quality of my analogue TV signal, so i finally decided to buy a DVB-C card to receive digital TV from my provider in Denmark, TDC Kabel TV.

To receive the signal you need a DVB-C card. To receive non-free-to-air channels you need a Common Interface (CI) and a CAM (Common Access Module) to decode the signal. In the CAM you must insert a decoder card bought from your provider.

I ended up ordering the following at dvbshop.net:

  • Technotrend Premium C-2300 Hybrid
  • Technotrend Premium 3.5″ CI incl. TT-remotecontrol
  • Viaccess I/II CAM (V484)

I have no use for the remote control, but could not find a CI for the C-2300 card without it.

The card was pretty easy to get working in Linux. When I first booted after inserting the card, the kernel log showed:

[ 57.704473] dvb-ttpci: could not load firmware, file not found: dvb-ttpci-01.fw
[ 57.704509] dvb-ttpci: usually this should be in /usr/lib/hotplug/firmware or /lib/firmware
[ 57.704550] dvb-ttpci: and can be downloaded from http://www.linuxtv.org/download/dvb/firmware/


So i downloaded http://www.linuxtv.org/download/dvb/firmware/dvb-ttpci-01.fw-2622 and saved it as /lib/firmware/dvb-ttpci-01.fw and reloaded the driver:

# rmmod dvb-ttpci
# modprobe dvb-ttpci

and the card was now detected and initialized just fine:

[ 571.805460] saa7146: register extension 'dvb'.
[ 571.806038] PCI: Enabling device 0000:05:07.0 (0000 -> 0002)
[ 571.806223] saa7146: found saa7146 @ mem ffffc20000070000 (revision 1, irq 3) (0x13c2,0x000a).
[ 571.812619] DVB: registering new adapter (Technotrend/Hauppauge WinTV Nexus-CA rev1.X).
[ 571.846734] adapter has MAC addr = 00:d0:5c:04:ae:d4
[ 572.052113] dvb-ttpci: gpioirq unknown type=0 len=0
[ 572.077680] dvb-ttpci: info @ card 0: firm f0240009, rtsl b0250018, vid 71010068, app 80002622
[ 572.077683] dvb-ttpci: firmware @ card 0 supports CI link layer interface
[ 572.725120] dvb-ttpci: DVB-C analog module @ card 0 detected, initializing MSP3415
[ 573.072477] dvb_ttpci: saa7113 not accessible.
[ 573.133828] saa7146_vv: saa7146 (0): registered device video2 [v4l2]
[ 573.134080] saa7146_vv: saa7146 (0): registered device vbi2 [v4l2]
[ 573.134357] DVB: registering frontend 0 (ST STV0297 DVB-C)...
[ 573.134549] input: DVB on-card IR receiver as /class/input/input3
[ 573.134630] dvb-ttpci: found av7110-0.
[ 577.936266] spurious 8259A interrupt: IRQ7.

To test and scan for channels I created a file called dk-TDCKabelTV containing the frequences used by TDC Kabel TV in Copenhagen:

C 143000000 6875000 NONE QAM64
C 156000000 6875000 NONE QAM64
C 490000000 6875000 NONE QAM64
C 498000000 6875000 NONE QAM64
C 506000000 6875000 NONE QAM64
C 514000000 6875000 NONE QAM64
C 522000000 6875000 NONE QAM64
C 530000000 6875000 NONE QAM64
C 538000000 6875000 NONE QAM64
C 546000000 6875000 NONE QAM64
C 554000000 6875000 NONE QAM64
C 578000000 6875000 NONE QAM64
C 586000000 6875000 NONE QAM64
C 602000000 6875000 NONE QAM64
C 610000000 6875000 NONE QAM64
C 618000000 6875000 NONE QAM64
C 626000000 6875000 NONE QAM64
C 674000000 6875000 NONE QAM64

I then used scan dk-TDCKabelTV > channels.conf to scan for channels. I later used the generated file when setting up the tuner card in MythTV. I had to delete a lot of channels though. It looks like MythTV cannot handle the radio channels – and I haven’t bought access to all 100 channels or so available with TDCs Selector…

Hauppauge MediaMVP and MythTV

Sunday, October 15th, 2006

I was looking for a cheap and easy way to connect my seconday TV to my MythTV media center.

The Hauppauge MediaMVP combined with the “MediaMVP Media Center” open source application from www.mvpmc.org looked like it supported all my requirements:

  • It is noiseless and small
  • It supports output to SCART
  • It can be hacked to act as a MythTV frontend.

From the HOWTO’s on the MediaMVP Media Center it also looked like it was very easy to get working. That, however it was not. ;-)

I now have a somewhat working setup where I can watch recorded shows, but not really anything else. Which is OK for now.

My problem was that the new versions of the Hauppauge MediaMVP dosn’t just boot via tftp. Here is what I had to do to make it boot the MediaMVP Media Center software:

On my DHCP server I added the following group:
group {
host mvp { # NOTE: Change the hardware ethernet to the MAC address of your actual MVP
hardware ethernet 00:0d:fe:0b:b3:fc;
fixed-address 192.168.1.3;
}
}

This will just assign a static IP to the box. No need to set TFTP server, filename etc here since it will just ignore it anyway.

To boot the application you must be a tftp server on port 16869 (use dpkg-reconfigure atftp to reconfigure atftp to run on this port) and you must run the mvprelay application from the MVPServer package. For example:
./mvprelay 16881 5906 6337 192.168.1.2
In your /tftpboot directory the files must be called dongle.bin, dongle.bin.config and dongle.bin.ver. You cannot set other filenames in the DHCP server configuration or the relay application…

So far my box only fetches the application and not the config file, so I have to telnet to it, kill the running application and execute the commands from dongle.bin.config…..

Problem with PVR500, ivtv and Linux 2.6.17.3 solved!

Thursday, July 6th, 2006

After upgrading to Linux 2.6.17.3 and ivtv 0.7.0 my PVR500 card suddenly stopped working. It looked like the driver was loaded, but i could not read any data from /dev/video0.

When trying to read data from the device or trying to use ivtv-tune the following was logged by the kernel:

[68705.613937] ivtv0: i2c hardware 0x00000001 not found for command 0xc008561c!
[68705.613941] ivtv0: i2c addr 0x44 not found for command 0x4008646f!
[68705.613944] ivtv0: i2c hardware 0x00000020 not found for command 0x4008646d!
[68705.613947] ivtv0: i2c hardware 0x00000001 not found for command 0x4008646d!
[68705.613977] ivtv0: i2c hardware 0x00000001 not found for command 0xc008561c!
[68705.617982] ivtv0: i2c hardware 0x00000001 not found for command 0xc008561c!
[68705.618952] ivtv0: i2c hardware 0x00000001 not found for command 0xc008561c!

I read a lot of mailinglist posts suggesting that it meant that the card was broken etc… but finally I also saw the line:

[68705.887156] ivtv1: Failed to load module cx25840

and after some investigation found that this driver is no longer included in ivtv – it is now shipped as part of the Linux kernel. So i enabled the modules cx25840 and wm8775 in the kernel, and now my card works like a charm again.

DVB-T and Linux

Thursday, July 6th, 2006

I have a MediaCenter PC running Ubuntu Linux and MythTv. It works very well, and until now my TV input has been through a Hauppauge PVR 500 card.

I just added a Hauppauge Nova-T DVB-T card since it is now possible to receive DVB-T signals in Denmark.

It was fairly easy to get working once I had a good enought antenna.

The driver, cx8800, is included in the Linux kernel. I’m currently using 2.6.17.3 which gives me working DVB-T, but broke ivtv and my PVR500 card….

When the driver was loaded i tested the signal with the scan and tzap applications from the dvb-utils package. On www.digi-tv.dk i found that there is one transponder near Copenhagen and that the frequency is 714000000 hz.

The dvb-utils package comes with definition files for a lot of countries, but not for Denmark. I created one myself containing:
# Denmark - Copenhagen
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 714000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE

I saved the file as dk-Copenhagen and used the scan tool to look for channels:
$scan dk-Copenhagen
scanning dk-Copenhagen
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
initial transponder 714000000 0 2 9 3 1 3 0
>>> tune to:
714000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE
0x0000 0x0065: pmt_pid 0x0000 DigiTV -- DR1 (running)
0x0000 0x0066: pmt_pid 0x0000 DigiTV -- DR2 (running)
0x0000 0x0067: pmt_pid 0x0000 DigiTV -- Tegnsprogstolkning (running)
0x0000 0x00d9: pmt_pid 0x0000 DigiTV -- TV 2 (Lorry) (running)
Network Name 'Kbh. Vest'
dumping lists (4 services)
DR1:714000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:121:101
DR2:714000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:211:221:102
Tegnsprogstolkning:714000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:311:0:103
TV 2
(Lorry):714000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2111:2121:217
Done.

Which tells me it’s working! The output (not the first line) must be saved in a file called $HOME/.tzap/channels.conf and then the signal quality can be checked using the tzap command. E.g.
$ tzap DR1
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
tuning to 714000000 Hz
video pid 0x006f, audio pid 0x0079
status 01 | signal 0030 | snr 8000 | ber 00003fff | unc 00000000 |
status 1f | signal 0031 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 0031 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK

If you don’t get FE_HAS_LOCK you need to adjust the antenna. If you do get locked on to a signal however, you should be able to play an mpeg stream with
dvbstream -o -ps -qam 64 -cr 3_4 111 121 | mplayer -
where 111 and 121 are the video and audio pid found as third and second last values on the channels line in channels.conf