Penguin

FreeView is the new consortium of TV and radio providers, providing digital service by DVB-S on the Optus D1 satellite. FreeView There is also a DVB-T service over UHF.

MythTv supports DVB, and there are a number of DVB devices that are supported under Linux. There are some tricks to setting this up, but we'll cover them all below. I have installed all the software below on Ubuntu Edgy (6.10). It does not cover the basic MythTv installation, which you are assumed to have done already. If not, the Ubuntu guide is very straightforward.
DVB-T is also covered over in FreeViewHDMythTvNotes.

Hardware and connectivity

Get a DVB card. The TechniSat SkyStar 2 satellite used to be $139 for a serial remote or $145 for a USB remote on Trade Me from an importer, who lives in Te Awamutu, and is a thoroughly nice bloke. Sadly he hasn't had any for ages.

The Technotrend S-1401 is currently $125 from nicegear (another thoroughly nice bloke) along with a number of other Linux supported DVB cards.

I installed the card and didn't have to do anything else. Check lsmod for b2c2_flexcop_pci; if it's not there, modprobe it, and add it to /etc/modules so it will load at boot.

Now, connect it to your Sky dish, or other satellite dish pointed at Optus D1. The device at the end of the arm off the dish, that focuses the beam, is called an LNB. Since August 2007, Freeview and Sky Digital uses horizontal polarisation. You can use a splitter and connect to both the DVB-S card and Sky Digital at the same time.

At this point it is assumed you have your DVB-S card connected to the satellite. Now we can test this.

Aligning Dish

A sky dish is perfect for DVB-S and should be already aimed at the Optus D1 satellite. But if you're installing a new one then remember a rooftop can be dangerous. If you're unsure just use the services of a dish installer.

Your pole mount must be vertical and stable. A 60 cm dish is considered the minimum, but should work fine. Larger dishes make rain-fade less likely, but catch more wind. Note, offset/oval dishes look like they're pointing the wrong angle - believe the scale on the mounting not your eye.

While you're up there - note the LO frequency of the LNB. Should be written on a sticker. Mine's 10.75 GHz but there are other common values like 11.3GHz.

Depending on where you are in the country, the angle and direction of the dish changes. Calculate the good values at www.dishpointer.com? or look up a table like Freeview Shop.

Hamilton is a magnetic bearing of 316 degrees and an elevation of 43.4 degrees. Christchurch is 318.7 and 38.2 degrees elevation.

The LNB and satellite finder gauges need power to run - this is provided by the card/set top box. Should be 18V DC. Some cards provide power all the time, like the old SkyStar?. Other cards only provide power while recording, so you need to run dvbtune while aiming the dish. Most finders light up with power and make squealy noises when they get signal.

Set the elevation and direction as accurately as possible (remember compasses are affected by iron and most rooftops are steel, so use the google map at dishpointer.com or get a bearing while you're on the ground)

Then from behind, swing the dish to the left. Optus D1 is the first satellite you should come to. Once the direction is at maximum signal strength, tweak up the elevation using the same method. Then rotate the LNB angle and see if it helps. Then check them all again, and repeat until there's no improvement. You want the best possible signal.

Finally tighten all bolts and cable tie the signal lead down securely. Then use sealant around anything that could leak.

Testing DVB

You can skip this step if you're game, and go straight to MythTV installation.

Install some packages: apt-get install dvbsnoop dvbtune dvb-utils

The parameter for frequency is in kilohertz and needs to be calculated depending on your LNB. You did note the LO frequency of your LNB? If not go check.

TVNZ transponder is 12.483 GHz which is 12,483MHz then subtract your LNB's LO in MHz (10,750MHz for me) returns 1,733Mhz. So I'd use dvbtune -f 1733000 -s 22500 -p h -m

We now need to tune to a LNB frequency. Let's test connecting to the TVNZ transponder at 12,483 KHz. dvbtune -f 1183000 -s 22500 -p h -m (for a 11.3 GHz LNB) dvbtune -f 1733000 -s 22500 -p h -m (for a 10.75 GHz LNB)

Your output should resemble this:

tuning DVB-S to L-Band:0, Pol:H Srate=22500000, 22kHz=off
ERROR setting tone
: Invalid argument
polling....
Getting frontend event
FE_STATUS:
polling....
Getting frontend event
FE_STATUS: FE_HAS_SIGNAL FE_HAS_LOCK FE_HAS_CARRIER FE_HAS_VITERBI FE_HAS_SYNC
Bit error rate: 147
Signal strength: 51001
SNR: 52971
FE_STATUS: FE_HAS_SIGNAL FE_HAS_LOCK FE_HAS_CARRIER FE_HAS_VITERBI FE_HAS_SYNC
Signal=50823, Verror=0, SNR=52983dB, BlockErrors=0, (S|L|C|V|SY|)
Signal=50931, Verror=0, SNR=53001dB, BlockErrors=0, (S|L|C|V|SY|)

If you don't get scrolling Signal= lines, you might have a newer LNB with a different offset (designed for pointing at two satellites at once). Try dvbtune -f 1733000 -s 22500 -p h -m. Follow the "New LNB" instructions paths below.

If you have a really new Sky LNB, you may need to add -tone 0 to the dvbtune arguments.

Output like this means no signal, so your dish is misaligned or you're using the wrong LNB LO Frequency, or your cable is damaged or some other physical problem.

FE_STATUS: FE_HAS_SIGNAL FE_HAS_CARRIER
polling....
polling....
^C

If you don't get this going, there is a lot more information at the PVR Geek wiki.

Now, run the tuner, and background it:

dvbtune -f 1183000 -s 22500 -p h -m 2>/dev/null & (rnewer 10.75 GHz LNB: substitute 1733000 for 1183000)

Scan for channels:

root@lounge:# scan -c -U
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
0x0000 0x0401: pmt_pid 0x010a Maori Television Service -- Maori TV (running)
0x0000 0x040b: pmt_pid 0x010d Television New Zealand -- TVONE (running)
0x0000 0x040c: pmt_pid 0x010e Television New Zealand -- TV2 (running)
0x0000 0x040d: pmt_pid 0x010f TVNZ -- Reserved 6 (starts soon)
0x0000 0x040e: pmt_pid 0x0110 TVNZ -- Reserved 7 (???)
0x0000 0x076d: pmt_pid 0x0111 TVNZ -- Reserved 5 (pausing)
0x0000 0x076e: pmt_pid 0x010c TVNZ -- Reserved 4 (starts soon)
0x0000 0x076f: pmt_pid 0x0112 TVNZ -- Reserved 3 (not running)
0x0000 0x0770: pmt_pid 0x010b Television New Zealand -- Test - TVNZ WIDE (running)
0x0000 0x0771: pmt_pid 0x0000 Television New Zealand -- New Channel Test (running)
0x0000 0x6640: pmt_pid 0x0101 Television New Zealand -- SSU-ZW (running)
dumping lists (11 services)
Maori TV                 (0x0401) 01: PCR 0x1ffe V 0x0202 A 0x028c (eng)
TVONE                    (0x040b) 01: PCR 0x1ffe V 0x0203 A 0x028d (eng) TT 0x0243
TV2                      (0x040c) 01: PCR 0x1ffe V 0x0204 A 0x028e (eng) TT 0x0244
Reserved 6               (0x040d) 01: PCR 0x1ffe V 0x0205 A 0x028f (eng) TT 0x0243
Reserved 7               (0x040e) 01: PCR 0x1ffe V 0x0206 A 0x0290 (eng) TT 0x0244
Reserved 5               (0x076d) 01: PCR 0x1ffe V 0x0201 A 0x028b (eng)
Reserved 4               (0x076e) 01: PCR 0x1ffe V 0x0207 A 0x0291 (eng)
Reserved 3               (0x076f) 01: PCR 0x1ffe V 0x0208 A 0x0292 (eng)
Test - TVNZ WIDE         (0x0770) 01: PCR 0x1ffe V 0x0200 A 0x028a (eng)
SSU-ZW                   (0x6640) 0c:
New Channel Test         (0x0771) 01:
Done.

Note: on some distros, scan is called dvbscan. This is the case on Gentoo, where the package containing dvbscan is media-tv/linuxtv-dvb-apps. In Debian they're packaged in dvb-apps dvbsnoop dvbstream dvbtune.

You have now got a list of all the channels on this transponder. Freeview has other transponders - check Lyngsat's Optus D1 page for information.

Assuming you've got this far, there's one final test. Foreground the dvbtune task and kill it.

Now run dvbstream -f 1183 -s 22500 -p h -o 512 650 | mplayer - (newer LNB: substitute 1733 for 1183)

You should now be watching the TVNZ Widescreen test (currently all Stargate SG-1, all the time). (NOTE: TVNZ Widescreen is not active at the moment)

Adding your channels to MythTV

Stop the MythTV backend, if it's running, and run mythtv-setup.

Capture card

Add a new capture card of type "DVB DTV capture card (v3.x)". Select DiSEqC, and enter some details about your LNB - for a single-location Sky LNB, you will want to set to Custom, set type Standard (Voltage), and set LNB LOF Low (MHz) to 11300 (newer LNB: 10750). If this doesn't work for you, you will have to look at the LNB settings on the PVR Geek wiki.

Remember you have to click Finish, go back to the Capture card screen, and hit Finish again, to save your LNB settings.

Video source

Create a new video source. Name it "DVB". For the XMLTV listings grabber, select "Transmitted guide only (EIT)". This will allow you to get guide data directly from the satellite. Click Finish.

In the future (MythTV 0.21) you can use any XMLTV grabber in your path - nice.net.nz/epg has a grabber that has had some post-processing done to a post-processed guide downloaded from the internet, with some more information, but this will work for now.

Input connections

This section maps capture cards to video sources. Select 0?, and connect it to the DVB video source you just created.

Now, you can automatically tune channels from the satellite. Click "Scan for channels". Your scan type should remain "Full Scan (tuned)". Add the frequencies for the Freeview transponders, one at a time (in HZ) and click Next:

 Transponder   Frequency   Symbol rate 
 TVNZ   12483000   22500000 
 CanWest/Other   12456000   22500000 

These were found at Lyngsat's Optus D1 page. Remember both need to be horizontal polarity - check each transport in turn.

Two sets of about 6 channels each will be detected and added.

Channel editor

The final step is setting up your channels. Set the channel number to whatever you would like it to be in MythTV; the callsign is what matters to DVB.

Guide data

Exit mythtv-setup. You're advised to check /etc/cron.daily/mythtv-backend. Restart mythtv-backend, and then as the mythtv user run mythfilldatabase

You should see a line such as:

2007-05-02 19:27:11.170 Updating source #2 (DVB) with grabber eitonly

Now, start the frontend or check mythweb, and you should have guide information.

See also

OpenMedia, a NZ company selling a PVR based on MythTv, have some guides online with screenshots: