Mythtv and Air2PC ATSC card on Fedora Core 3

This write-up attempts to list the steps for configuring your Air2PC on Fedora Core 3. This card, along with the pcHDTV HD2000/HD3000 cards, are supported by mythtv and able to capture off-the-air HDTV stations.

You can purchase the Air2PC-ATSC card online here or here.

I welcome corrections or suggestions to this document.

Angel Li
29 March 2005

Linux Kernel Build

Following are the steps I used to get the Air2PC card working with mythtv. You will need to be root for most of these steps. Whenever the shell prompt is “#”, those steps need to be performed as root.

Download the 2.6.11 Linux kernel:

# cd /usr/src
# wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.tar.bz2

Extract the kernel

# tar xjf linux-2.6.11.tar.bz2

Copy the current kernel configuration file for Fedora Core 3

# cd /usr/src/linux-2.6.11
# cp /lib/modules/2.6.9-1.681_FC3/build/.config .

The directory to copy the .config file from depends on the version of the kernel you are currently using. Type uname -r to display the Linux version.

Configure a new Linux kernel:

# cd /usr/src/linux-2.6.11
# make oldconfig
# make menuconfig

For the make oldconfig command line, I just accepted the defaults when prompted for new modules or features. When making menuconfig, under Device Drivers > Multimedia devices > Digital Video Broadcasting Devices select “DVB For Linux” and “B2C2/Technisat Air/Sky/CableStar 2 PCI”. The correct frontend, nxt2002, is automatically selected.

Make the kernel and modules and install them:

# make
# make modules_install install

Edit /etc/grub.conf. If you want to make this new kernel your default when you next boot. Change default to 0:

# vi /etc/grub.conf

Create the needed devices for udev

# cd /etc/udev/devices
# /bin/mkdir -p dvb/adapter0
# cd dvb/adapter0
# /bin/mknod audio0 c 212 1
# /bin/mknod ca0 c 212 6
# /bin/mknod demux0 c 212 4
# /bin/mknod dvr0 c 212 5
# /bin/mknod frontend0 c 212 3
# /bin/mknod net0 c 212 7
# /bin/mknod osd0 c 212 8
# /bin/mknod video c 212 0
# /bin/chmod 666 *

Note: I don't know if this is the most elegant way to configure udev.

Install the necessary firmware file for the Air2PC card:

# cp /usr/src/dvb-kernel/firmware/dvb-fe-nxt2002.fw /lib/firmware

Other Linux distributions use /usr/lib/hotplug/firmware as the directory for firmware files.

Reboot and try out your new kernel

# /sbin/shutdown -r now

Type /bin/dmesg and look for these messages:

drivers/media/dvb/b2c2/skystar2.c: FlexCopIIB(rev.195) chip found
drivers/media/dvb/b2c2/skystar2.c: the chip has 38 hardware filters
DVB: registering new adapter (SkyStar2).
saa7115: starting probe for adapter SkyStar2 (0x10000)

The last line with saa7115 is only there if you've loaded the ivtv drivers.

DVB Applications

Build the dvb-apps

# cd /usr/src
# cvs -d :pserver:anonymous@linuxtv.org:/cvs/linuxtv co dvb-apps
# cd dvb-apps
# make

Install Taylor Jacob's azap program for checking out your local stations' HD signal

# cd /usr/src/dvb-apps/util/szap
# cp azap /usr/local/bin

Now generate ~/.azap/channels.conf

% cd /usr/src/dvb-apps/util/szap/channels-conf/atsc
% test ~/.azap || mkdir ~/.azap
% perl ./make_atsc_chanconf.pl ZIPCODE >~/.azap/channels.conf

Replace ZIPCODE with your 5 digit zipcode. Now run azap to check the signal strength of a particular channel:

% /usr/local/bin/azap wsvn
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
tuning to 183000000 Hz
video pid 0x0000, audio pid 0x0000
status 00 | signal fff0 | snr ea60 | ber 00000000 | unc 00000000 |
status 1f | signal f840 | snr ce6e | ber 00000068 | unc 00000000 | FE_HAS_LOCK
status 1f | signal f600 | snr d2d8 | ber 00000018 | unc 00000000 | FE_HAS_LOCK
status 1f | signal f290 | snr cd54 | ber 00000008 | unc 00000000 | FE_HAS_LOCK
status 1f | signal f340 | snr c658 | ber 00000030 | unc 00000000 | FE_HAS_LOCK
^C

Displayed is a signal check of Miami's WSVN Fox affiliate. Inspect ~/.azap/channels.conf for what antennaweb.org thinks are your local HD stations.

If you do not have some modules needed by the make_atsc_chanconf.pl script click on this link for a CGI version of the same script.

Configure mythtv

Download the CVS version of mythtv

% cd ~/src
% cvs -d :pserver:mythtv@cvs.mythtv.org:/var/lib/mythcvs login
Logging in to :pserver:mythtv@cvs.mythtv.org:/var/lib/mythcvs
CVS password: mythtv
% cvs -z3 -d :pserver:mythtv@cvs.mythtv.org:/var/lib/mythcvs checkout mythtv

Run configure and enable/disable appropriate settings. Here's what I use:

% ./configure --cpu=athlon \
    --disable-audio-arts \
    --disable-audio-jack \
    --enable-lirc \
    --disable-joystick-menu \
    --disable-firewire \
    --enable-ivtv \
    --enable-dvb \
    --enable-xvmc \
    --enable-xrandr \
    --enable-opengl-vsync

Once mythtv is built and installed visit Taylor Jacob's page for instructions configuring the Air2PC card within mythtv.

Acknowledgements

Many thanks to Taylor Jacob for guiding me thru the install of the driver and the mythtv patches.