DViCO FusionHDTV DVB-T Dual Digital 4 Installation

From MythTV Official Wiki
Jump to: navigation, search

Clean.png Cleanup: This page should be cleared off in preparation for deletion. Tuner specific information should be migrated to the LinuxTV Wiki, and any additional information moved to more generic pages. Discuss the issue on the talk page

Ubuntu 9.10 Installation on Foxcon 45CSX - Intel ATOM 330 CPU

This documentation is my working notes for installing the DViCO FusionHDTV DVB-T Dual Digital 4 onto an Ubuntu 9.10 (Karmic Koala) Distribution.

Hardware

I bought the following Setup on 20/11/2009 from http://www.gamedude.com.au. I dislike them because you have to wait so long in line to purchase and after sales service sucks but they do have a good selection of cases: An alternate source is http://www.umart.com.au but not as many cases.

  • TV Card - DVico FusionHDTV DualDigital 4 Low profile - $149
  • Micro ATX Motherboard - Foxconn 45csx Intel Atom 330 DualCore CPU Video Sound - $119
  • Case - 65x265x300mm - AYWUN MD-100 Black Mirror Front Mini ITX Case External Power - $89
  • Memory - TeamElite 2gig DDR2 800Mhz PC2 6400 CL5 - $59
  • HardDrive - Samsung 1TB Sata-2 32meg Cache - $105
  • DVD Burner - SONY SLIM Internal DVD-RW Drive BLACK 8x DVD+/-RW SATA - $79
  • MOLEX TO SATA POWER + DATA CABLE 15CM - $12
  • NetComm 802.11N Draft 2.0 Wirless USB Adaptor MODEL : NP910N - $59
  • TOTAL - $671

The case only has 1 sata power connector and comes with very short sata cables not long enough to reach the hard drive. Which is why I bough the Molex->Sata Power+Sata Data adapter.

Kernel / Packages

Warning.png Warning: After installing Ubuntu Karmic and logging into the gnome desktop the system suddenly froze. I suspect this is because of the intel graphics driver. After a bit of googling I found this solution:

After you log in hit: Ctrl-Alt-F1 to take you to a terminal before it freezes. Then log in to the terminal and type:

#killall compiz compiz.real

Hit Ctrl-Alt-F7 to take you back to the altered gnome desktop. Open up a terminal and type

$metacity --replace

The problem is intel driver not behaving nicely with compiz.

Check your DVB TV Card

After you have a stable setup check the messages to make sure your card was detected:

#dmesg | grep -i dvb
dvb-usb: found a 'DViCO FusionHDTV DVB-T Dual Digital 4 (rev 2)' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (DViCO FusionHDTV DVB-T Dual Digital 4 (rev 2))
DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)...
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1e.0/0000:01:02.2/usb2/2-1/input/input5
dvb-usb: schedule remote query interval to 100 msecs.
dvb-usb: DViCO FusionHDTV DVB-T Dual Digital 4 (rev 2) successfully initialized and connected.
dvb-usb: found a 'DViCO FusionHDTV DVB-T Dual Digital 4 (rev 2)' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (DViCO FusionHDTV DVB-T Dual Digital 4 (rev 2))
DVB: registering adapter 1 frontend 0 (DiBcom 7000PC)...
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1e.0/0000:01:02.2/usb2/2-2/input/input6
dvb-usb: schedule remote query interval to 100 msecs.
dvb-usb: DViCO FusionHDTV DVB-T Dual Digital 4 (rev 2) successfully initialized and connected.

You should also see the directory's /dev/dvb/adapter0 /dev/dvb/adapter1

Check your CPU

The Atom 330 is a dual core processor with hyper-threading so you should see 4 processors:

$cat /proc/cpuinfo

The Intel Atom reports that it has multiple cores (and HyperThreading) via an ACPI message and will not fall back to another delivery mechanism (like most other platforms) if ACPI is not available.

Warning.png Warning: If you don't see 4 processors like I did then you will need to add th line acpi=ht to your kernel parameters temporarily. For some reason I added this to my kernel and the processors showed up but the mythtv menu was unbelievably slow. I removed it and the menu returned to normal and to my astonishment the 4 processors were still detected. It sounds a bit voodoo to me but it worked. If you need to do this you can use the following commands to add then remove the kernel parameters.

$sudo gedit /etc/default/grub
Change the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=ht"
$sudo update-grub
$sudo reboot

If everything went well the your 4 processors should be detected using cat /proc/cpuinfo. Now try removing acpi=ht from grup using the above steps and see if the 4 processors are still available.

NetComm Wireless N NIC USB

Had a problem with the NetComm 802.11N NP910N not working but after a few searches found the solution. Add the following to the bottom of the usb blacklist file.

gedit /etc/modprobe.d/blacklist.conf

Script.png /etc/modprobe.d/blacklist.conf

*snip*
blacklist rt2800usb
blacklist rt2870sta
sudo reboot

Installing MythTV

  1. Go to: System > Administration > Synaptic - Mark all upgrades and Apply. This will take a while on your new system.
  2. Search "mythtv", then mark mythtv & mythplugins for installation. Yes to all and Apply.
  3. Give your mysql database a root password when asked.

Set up Myth TV

This is my quick and dirty setup. Leave the defaults for everything else (ie Next.. Next.. etc Finish).

  • Run mythtv-setup - It should add you to the mythtv group and then log you out
  • Run mythtv-setup again - (My screen stayed blank - so hit the up arrow after it starts to prompt it to refresh)
  • Go into General > On the second page:
TV Format=PAL-BG
Chanel Frequency Table=Australia
Your Local TimeZone (for XMLTV)=Auto
  • Go into Capture Card > New Capture Card
Card Type=DVB DVT Capture Card (3.x)
DVB Device Number=/dev/dvb/adapter0/frontend0
  • New Capture Card (for your second receiver)
Card Type=DVB DVT Capture Card (3.x)
DVB Device Number=/dev/dvb/adapter1/frontend0
  • Go into Video Sources > New Video Source
Video Source Name=vs1
XMLTV Listings Grabber=No Grabber (we will use our own later!)
Channel Frequency Table=Default
  • Go Into Input connections > [DVB:/dev/dvb/adapter0/frontend0](DVBInput)->(None)
Video Source=vs1
Press Scan For Channels

You should see all your channels being found. When it is finished -> Next -> Finish.

  • Now do the second input > [DVB:/dev/dvb/adapter1/frontend0](DVBInput)->(None)
Video Source=vs1
(You wont have to scan for chanels the second time -> Next -> Finish

Mythfrontend

  1. Open up mythfrontend to create the configuration files.
  2. Watch TV - Make sure your card is working
  3. Go to Utilities > Setup > Appearance
  • Page 1
UI Theme: Whatever you want (personally MythCenter seems quicker to me)

  • Page 4 - Localization
Date format: Oz format
Short Date format: Oz format


Getting Your Australian Channel Listings

Most of the guides have recommended Shepherd however whilst providing good information this thing is a slug and will take ages to complete.

My personal preference is to use Oztivo. Oztivo is 100x faster than shepherd but doesn't provide extra indepth guide information. (Like looking up IMDB for movie information).

The following will give you a step by guide to setting up the Oztivo Guide.

Mapping the Channels

Firstly we need to set up our mapping from our guide data to our channels we found in our last step. Myth found 22 channels but a lot of those channels are repeated this is why we give the same xmltvid to the channels that are repeated. We can also remove visibility of those repeated channels if we desire.

  1. Open up firefox and go to http://localhost/mythweb.
  2. Mythtv settings (Key and Spanner Icon top of the screen) -> TV -> Chanel Info
  3. Enter in your xmltvid and new names:
xmltvid  ch#   callsign      name    Visibility
10-2     1     ONE HD       ONE HD   Yes
2-1      2     ABC1         ABC      Yes
3-1      3     SBS ONE      SBS      Yes
7-1      7     7 Digital    7        Yes
9-1      9     Nine Digital 9        Yes
10-1     10    TEN Digital  TEN      Yes
10-2     11    ONE HD       ONE HD   Yes
10-2     12    ONE Digital  ONE      Yes
2-1      20    ABC HDTV     ABC HD   Yes
2-2      21    ABC1         ABC 2    Yes
2-1      22    ABC2         ABC      Yes    
2-1      23    ABC3         ABC      Yes
3-1      30    SBS HD       SBS HD   No  (no Signal)
3-1      32    SBS TWO      SBS      Yes
3-2      33    SBS 3        SBS NEWS Yes
3-1      34    SBS 4        SBS      Yes
7-1      70    7 HD Digital 7 HD     Yes
7-1      71    7 Digital 1  7        Yes
7-2      72    7TWO         7TWO     Yes
7-1      73    7 Digital 3  7        Yes
9-1      90    Nine HD      9 HD     Yes
9-2      99    GO!          GO!      Yes

Getting the Oztivo Guide Data

Background: The old method was to get your channels that you listed in xml format. However oztivo was having too much bandwidth/computational issues and decided to make their xml data static instead of dynamically generated. Unfortunately this makes getting the data a little more complicated than before. Luckily for us Auric had made a script to get the data.

  1. Head over to http://www.oztivo.net/twiki/bin/view/Guidedata/WebHome and Sign Up.
  2. Download the program, get the support modules and configure it:
 $cd /usr/bin
 $sudo wget http://web.aanet.com.au/~auric/files2/tv_grab_oztivo
 $sudo apt-get install libxmltv-perl libconfig-general-perl libxml-simple-perl libemail-mime-perl
 $sudo chmod 755 tv_grab_oztivo
 $cd
 $tv_grab_oztivo --configure

Now go through the configuration skipping the first question and changing your path to the downloaded oztivo files:

Do you have a tv_grab_au or tv_grab_au_reg xmltv config file?
If so enter FULL path to where it is ?
oztivo username? Your_Sign_Up_Username
oztivo password? Your_Sign_Up_Password
Enter FULL path of directory to store downloaded oztivo files in? [/home/mythtv/.xmltv/sharedir] /home/bob/.xmltv

When you get to the xmltvid section place in the xmltvid from your mappings for the channel you want to download. eg 7TWO becomes 7-2:

*snip*
xmltvid for 7CEN,Seven Central? 
xmltvid for 7TWO,7TWO? 7-2
xmltvid for A-PAC,Australia's Public Affairs Channel?
*snip*

Finally it should spit out the following:

Added the following channels
7TWO        7-2                              7TWO                       Yes
ABC-Qld     2-1                              ABC Qld                    Yes
ABC2        2-2                              ABC2                       Yes
GO          9-2                              GO!                        Yes
Nine-Qld    9-1                              Nine Qld                   Yes
One-Qld     10-2                             One QLD                    Yes
SBS-Qld     3-1                              SBS Qld                    Yes
SBSTWO-Qld  3-2                              SBS TWO QLD                Yes
Seven-Bris  7-1                              Seven Qld                  Yes
Ten-Qld     10-1                             Ten Brisbane               Yes
OK or start again? [OK|again] OK

Time to test out the script

$tv_grab_oztivo --mythfilldatabase 1 --output /tmp/oztivo.xml

That should probably take about 3 minutes. Check out your program guides:

  1. Go to Applications > Sound & Video > MythFrontend
  2. Manage Recordings > Schedule Recordings > Program Guide

If everything looks good we will add this to our crontab:

crontab -e

Add this line to the crontab. This will start the job at 3:36am.

36 03 * * * /usr/bin/tv_grab_oztivo --mythfilldatabase 1 --output /tmp/oztivo.xmltv

MythVideo

The default lookup inside the mythtv frontend couldnt find some of my video art. So Instead i used Jamu which is already included for us in the myth folder.

  1. First copy your video files to the mythtv videos folder and then run the jamu script in interactive mode
cp All_My_Videos /var/lib/mythtv/videos
/usr/share/mythtv/mythvideo/scripts/jamu.py -MIV
  1. Now open your frontend and go to Utilities Setup > Setup > Media Settings > Videos Settings > General Settings > Page 2/8 > Uncheck "Show Unkown File Types". This will prevent the gallery from showing your subtitle files (*.srt)
  2. Escape back to the Top Menu and go to Media Library > Watch Videos.
    1. Press <M> to bring up the internal menu and scan for changes.
    2. Press <I> to bring up the info panel where you can reset you metadata if something went wrong.

To get the latest version of Jamu.py cab be found here

Slow Windows Shares

I was having trouble browsing my Windows 7 shares. Turns out wins is not enabled by default.

sudo apt-get install smbfs winbind
sudo nano /etc/nsswitch.conf

Add wins to this line before dns:

Script.png /etc/nsswitch.conf
hosts:          files mdns4_minimal [NOTFOUND=return] wins dns mdns4
sudo reboot

Credit to this Dmizer's Guide

Remote Control (Lircd)

You can create a Symlink to correct input device using the following UDEV rule: create update: /etc/udev/rules.d/10-local.rules

# DViCO FusionHDTV DVB-T Dual Digital 4
KERNEL=="event*", \
   ATTRS{manufacturer}=="Dvico", \
   ATTRS{idVendor}=="0fe9", \
   ATTRS{idProduct}=="db98", \
   SYMLINK="input/irremote"

The above creates a Symlink device call irremote which you can code in the LIRC config.

OR

This I found to be the most painful as I was using the wrong driver for a long time. But after i switched it became a breeze. Now on my system i have 2 /dev/input/events that work when you press a button. When i do a cat /dev/input/event3 and press the 0 key on the remote this happens:

cat /dev/input/event1
0000             
[Control-C to quit]

So it seems that this should be the one to use.... Unfortunately Not! Something else is parsing the input from your remote and is producing that like a keyboard entry. What you really want is something that produces binary gibberish when you press a button:

cat /dev/input/event5
����E�
�����E�
[Control-C to quit]

If your screen is mangled from catting out that then you can type "reset" to reset your terminal. So now that we have determined what device we should use it is time to see if we can record our key presses. We will be using the driver dev/input and not the driver dvico like I did for way to many days. Another thing that may stop the following from working is if lircd is running. You can stop it by "/etc/init.d/lirc stop".

Recording your remote control

This is here for reference or if you have a slightly different remote than mine. You can skip to mapping your remote if you just wish to use my generated files. Otherwise, to record the buttons on your remote do this:

irrecord --disable-namespace --driver=dev/input --device=/dev/input/event5 out.txt
*snip*
Press RETURN to continue.
Hold down an arbitrary button.
................................................................................
Found gap length: 251753
Now enter the names for the buttons.

You must get dots when holding down a key and nothing else. If you don't get dots or other symbols are showing up then you either have a driver problem or are using the wrong input. Otherwise out.txt will hold all your keys.

If you have come this far then your remote is working like a charm. Time to map the keys and make lircd run automatically. This is done with 3 files:

Mapping your Remote

gedit /etc/lirc/hardware.conf

Make sure you modify your DRIVER and DEVICE to be the same as you used for irrecord. I also changed START_LIRCMD=false for some reason.

Script.png /etc/lirc/hardware.conf

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="DViCO FusionREMOTE"
REMOTE_MODULES=""
REMOTE_DRIVER="dev/input"
REMOTE_DEVICE="/dev/input/event5"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
gedit /etc/lirc/lircd.conf

Script.png /etc/lirc/lircd.conf

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.6(devinput) on Mon Nov 23 02:00:14 2009
#
# contributed by Soth
#
# brand: DViCO FusionHDTV DVB-T Dual Digital 4
# model no. of remote control: FusionREMOTE
# devices being controlled by this remote: MythTV
#
# irrecord --disable-namespace --driver=dev/input --device=/dev/input/event5 out.txt

begin remote

  name  DViCO_Dual_Digital
  bits           16
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   16
  pre_data       0x8001
  gap          99999
  toggle_bit_mask 0x0

      begin codes
#Top White Buttons
          tv                       0x0164
          pc                       0x0074
          dtv                      0x0179
          mp3                      0x0187
          dvd                      0x0185
          profile                  0x016C
#Keypad
          1                        0x0002
          2                        0x0003
          3                        0x0004
          4                        0x0005
          5                        0x0006
          6                        0x0007
          7                        0x0008
          8                        0x0009
          9                        0x000A
          setup                    0x008D
          0                        0x000B
          guide                    0x016D
#Directional Pad
          replay                   0x00A5
          skip                     0x00A3
          up                       0x0067
          right                    0x006A
          down                     0x006C
          left                     0x0069
          ok                       0x0160
          start                    0x001C
#Volume and Channel
          volup                    0x0073
          voldn                    0x0072
          chup                     0x0192
          chdn                     0x0193
#Bottom Buttons
          mute                     0x0071
          open                     0x0086
          play                     0x00A4
          stop                     0x0080
          input                    0x0166
          livetv                   0x0182
          rew                      0x00A8
          ff                       0x00D0
          back                     0x009E
          aspect                   0x0173
          screen                   0x0174
          alttab                   0x000F
          snapshot                 0x00D4
          dvdmenu                  0x008B
          rec                      0x00A7
      end codes

end remote

Ok since we have set up these two files lets check our work.

/etc/init.d/lirc restart
ps aux | grep lircd
root 12671  0.0  0.0 2740 572 ?     Ss  16:27  0:00 /usr/sbin/lircd --driver=dev/input --device=/dev/input/event5
root 12675  0.0  0.0 2796 748 pts/1 R+  16:27  0:00 grep lircd

lircd is running with the correct driver and device. Ok let run irw and press some keys (Up, Ok and Start) on our remote

irw
0000000000010067 00 up DViCO_Dual_Digital
0000000000010160 00 ok DViCO_Dual_Digital
000000000001001c 00 start DViCO_Dual_Digital

Great Now we have to map these keys so that mythtv can use them. which brings us to our final file lircrc. You should save this file in your user directory as it is for personal mappings of the remote.

Script.png ~/.mythtv/lircrc

# lircrc.example.DVICO-nativelirc
# 2004-07-04, Chris Pascoe
# mailto:linuxdvb@itee.uq.edu.au
# Save this file in ~/.mythtv/lircrc
#
# Note the "repeat =" strings in the volume and channel.
# This means that if you hold down the key, every nth instance will be
# passed.  This depends on your system, so you may want to increase or
# decrease this and see what happens.  repeat = 1 is probably too
# fast.
 
### Top white buttons ###
 
  begin
     prog = mythtv
     button = tv
     config = Esc
  end    

  begin
     prog = mythtv
     button = pc
     config = Esc
  end    

# DTV - Change focus for PiP (to change channel in the other window)
   begin
     prog = mythtv
     button = dtv
     config = B
  end    
 
  begin
     prog = mythtv
     button = mp3
     config = Ctrl+M
  end
 
  begin
     prog = mythtv
     button = dvd
     config = Ctrl+D
  end
 
# Toggle PiP on/off
  begin
     prog = mythtv
     button = profile
     config = V
  end
 
### Keypad ### 
 
  begin
      prog = mythtv
      button = 1
      config = 1
      config = return
  end
  
  begin
      prog = mythtv
      button = 2
      config = 2
      config = return
  end
  
  begin
      prog = mythtv
      button = 3
      config = 3
      config = return
  end
  
  begin
      prog = mythtv
      button = 4
      config = 4
      config = return
  end
  
  begin
      prog = mythtv
      button = 5
      config = 5
      config = return
  end
  
  begin
      prog = mythtv
      button = 6
      config = 6
      config = return
  end
  
  begin
      prog = mythtv
      button = 7
      config = 7
      config = return
  end
  
  begin
      prog = mythtv
      button = 8
      config = 8
      config = return
  end
  
  begin
      prog = mythtv
      button = 9
      config = 9
      config = return
  end
 
  begin
     prog = mythtv
     button = setup
     config = M
  end    
 
  begin
      prog = mythtv
      button = 0
      config = 0
      config = return
  end
 
  begin
     prog = mythtv
     button = guide
     config = S
  end    

### Directional Pad ###

#commercial skip backwards
  begin
      prog = mythtv
      button = replay
      config = Q
  end

#commercial skip forwards
  begin
      prog = mythtv
      button = skip
      config = Z
  end
 
  begin
      prog = mythtv
      button = up
      config = Up
  end
  
  begin
      prog = mythtv
      button = down
      config = Down
  end
  
  begin
      prog = mythtv
      button = left
      config = Left
  end
  
  begin
      prog = mythtv
      button = right
      config = Right
  end
  
  begin
      prog = mythtv
      button = ok
      config = Return
  end

  begin
      prog = mythtv
      button = start
      config = Esc
  end

### Volume and Channel ###
  
  begin
    prog = mythtv
    button = voldn
    repeat = 1
    config = F10
  end
  
  begin
    prog = mythtv
    button = volup
    repeat = 1
    config = F11
  end
  
  begin
      prog = mythtv
      button = chup
      config = Up
  end
  
  begin
      prog = mythtv
      button = chdn
      config = Down
  end

### Bottom Buttons ###
 
  begin
      prog = mythtv
      button = mute
      config = |
  end

  begin
      prog = mythtv
      button = open
      config = 
  end
  
  begin
      prog = mythtv
      button = play
      config = ctrl+p
  end

  begin
      prog = mythtv
      button = stop
      config = P
  end  
    
  begin
      prog = mythtv
      button = input
      config = I
  end
  
  begin
      prog = mythtv
      button = livetv
      config = 
  end

  begin
      prog = mythtv
      button = rew
      config = Left
#    config = seek -180
  end

  begin
      prog = mythtv
      button = ff
      config = Right
#     config = seek +180
  end

  begin
      prog = mythtv
      button = back
      config = Esc
  end

  begin
      prog = mythtv
      button = aspect
      config = W
  end
  
  begin
      prog = mythtv
      button = screen
      config = 
  end

#swap the pip windows
  begin 
     prog = mythtv
     button = alttab
     config = N
  end

  begin
      prog = mythtv
      button = snapshot
      config = P
  end

  begin
      prog = mythtv
      button = dvdmenu
      config = 
  end

  begin
      prog = mythtv
      button = rec
      config = R
  end

MythWeather

Pretty easy to set up and works of the Bom Website. For easier setup I would go to the bom website to look up your particular weather settings as the location for the Weather and Radar may be different. Make sure when you are setting up inside the Mythfrontend to use SI units.

cd /usr/share/mythtv/mythweather/scripts
sudo rm -rf ca_envcan/ uk_bbc/ us_nws/
sudo wget http://web.aanet.com.au/~auric/files2/au_bom.zip
sudo unzip au_bom.zip

Again credit to Auric's Mythweather Scripts

MythMovies

To get your movie time download the tarball from Jonty's Site.

cd ~/Downloads
tar zxfv Jonty-Googlemovies-ca04a27.tar.gz
cp Jonty-Googlemovies-ca04a27/googlemovies.pl /usr/share/mythtv/

Now in the mythfrontend Movie Times enter your post code and change the grabber to:

Post Code: 4207
Radius: Not Used
Grabber: /usr/share/mythtv/googlemovies.pl %z