DViCO FusionHDTV DVB-T Dual Digital 4 with remote tutorial

From LinuxTVWiki
Revision as of 14:57, 24 November 2007 by Kemble (talk | contribs)
Jump to navigation Jump to search

Introduction

Chris Pascoe recently released some patches that make the IR remote that comes with the dd4 work I decided to write a tutorial as I didn't know how to get it to work and figured it would be important to document I made a tar ball with all the files you will need including some scripts that dload and install the drivers.

This tutorial and scripts were tested on and written on an existing install of Ubuntu gutsy 32 that was already running mythtv and a fresh install of Ubuntu gutsy 64 if you are installing using these scripts and tutorial on a fresh system you will need to uncomment the apt lines in dvb_installer download my scripts below

Tuner Installation

wget http://users.tpg.com.au/pokerrat/dvico_tutorial.tar.gz

tar xvzf dvico_tutorial.tar.gz

cd dvico_tutorial/tuner

sudo su

then open dvb_installer with a text editor and uncomment the apt lines if you using a fresh install then

./dvb_installer

this script installs the latest linuxtv drivers and applies the latest patches by chris pascoe uncomment the apt lines in the start of the script if you have a fresh ubuntu install you will need the packages that get installed by those lines. It will take a while to run it downloads and compiles about 40 mg or more if your using apt after it is finished you should have a working dvico dual tuner you can check by typing “ ls /dev/dvb/*”.

the output should look like this /dev/dvb/adapter0: demux0 dvr0 frontend0 net0

/dev/dvb/adapter1: demux0 dvr0 frontend0 net0 now su back to normal user

You can make a nice working channels.conf by running the e.g command below these are AU known transports if you live elsewhere you can hopefully find your area in “/usr/share/doc/dvb-utils/examples/scan/dvb-t” most ppl online who use this tuner seem to be from Australia.

e.g “ scan /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-sydney_north_shore > channels.conf”

if you not from sydney use one of these lines /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-Adelaide /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-Brisbane /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-canberra /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-Darwin /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-GoldCoast /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-Hobart /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-Mackay /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-Melbourne /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-Melbourne-Upwey /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-Perth /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-Sydney_Kings_Cross /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-sydney_north_shore /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-Townsville /usr/share/doc/dvb-utils/examples/scan/dvb-t/au-unknown

after this you should have a nice /etc/channels.conf file that looks like this


ABC HDTV:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_ 3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTE RVAL_1_16:HIERARCHY_NONE:2314:0:544 ABC TV Sydney:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FE C_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_IN TERVAL_1_16:HIERARCHY_NONE:512:650:545 ABC2:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_ 3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTE RVAL_1_16:HIERARCHY_NONE:2307:2308:546 etc. if you are happy with your channels.conf copy it to /etc and ~/.tzap mkdir ~/.tzap sudo cp channels.conf /etc && cp channels.conf ~/.tzap

this tutorial does not cover mythtv setup as you can find many other resources available however at this point you might like to scan your channels into mythtv using your channels.conf if you have not yet installed mythtv and intend to I suggest you use mythbuntu-control-centre

sudo apt-get install mythbuntu-control-centre you can find insructions on installing mythtv on ubuntu here https://help.ubuntu.com/community/MythTV#head-a2f3c5d4e6ca44e289fadd6e0f4a5fbded05efa7

here is a nice link if you need help with how to setup the channels for dvb cards in AU http://www.ozmyth.com/wiki/Configuring+MythTV+for+Australian+Digital+TV

you can test the tuner with tzap by typing from a console tzap -c /etc/channels.conf -r "ABC2" you should have something that looks like this obe@poo:/mnt/fed/home/oobe$ tzap -c /etc/channels.conf -r "ABC2" using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' tuning to 226500000 Hz video pid 0x0903, audio pid 0x0904 status 00 | signal 37e8 | snr 0000 | ber 00000000 | unc 00000000 | status 1e | signal b074 | snr eeee | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1e | signal b074 | snr eeee | ber 00000000 | unc 00000000 | FE_HAS_LOCK FE_HAS_LOCK is what you wanna see it means its getting the signal

Remote installation

back up your existing lirc files if you have lirc already installed mkdir lircback && cp -R /etc/lirc* lircback && cp ~/.lircrc ~/.mythtv/lircrc lircback now delete you existing lirc configs sudo rm -rf /etc/lirc* ~/.lircrc ~/.mythtv/lircrc ~./mplayer/lircrc sudo mkdir /etc/lirc sudo apt-get install cvs libtool automake autoconf cvs -dserver:anonymous@lirc.cvs.sourceforge.net:/cvsr oot/lirc login Enter cvs -z8 -dserver:anonymous@lirc.cvs.sourceforge.net:/cvsr oot/lirc co lirc cd lirc ./autogen.sh ./setup.sh select driver configuration / 0 other / 6 linux input layer then select save and run configure if configure does not run then type ./configure.sh then type make then sudo make install

now move into the remote folder provided in the tar ball

cd ../remote sudo cp -R lirc /etc sudo ln -s /etc/lirc/lircd.conf /etc/lircd.conf cp lircrc ~/.mythtv (if your not using mythtv which is unlikly replace cp lircrc ~/.mythtv with cp lircrc ~./.lircrc ) ln -s ~/.mythtv/lircrc ~/.lircrc sudo ln -s ~/.mythtv/lircrc /etc/lircrc


now restart lircd sudo /etc/init.d/lirc restart now test that the remote is working by typing irw the output should look like this oobe@poo:~/dvico_tutorial/remote$ irw 0000000000010160 00 ok DViCO_Dual_Digital 000000000001006c 00 down DViCO_Dual_Digital 000000000001006c 00 down DViCO_Dual_Digital 0000000000010160 00 ok DViCO_Dual_Digital 0000000000010067 00 up DViCO_Dual_Digital 000000000001006c 00 down DViCO_Dual_Digital 0000000000010193 00 chdn DViCO_Dual_Digital 000000000001001c 00 start DviCO_Dual_Digital

if you get connection refused error irw connect: Connection refused

then you need to select a different device in /etc/lirc/hardware.conf the device I ended up with was /dev/input/event6 that is how I left it in the provided config files to figure out which one is yours you need to do the following.

ls /dev/input/event* you will see a few event1 event2 etc. device files it is most likely the second last file or the last file you can find out by typing

cat /proc/bus/input/devices you will see a list of devices like mouse KB etc. the last 1 or 2 is most likely what where insterested in althought it could be anywhere anyway below is exactly what you want to see I: Bus=0003 Vendor=0fe9 Product=db78 Version=092f N: Name="IR-receiver inside an USB DVB receiver" P: Phys=usb-0000:02:08.2-2/ir0 S: Sysfs=/class/input/input6 U: Uniq= H: Handlers=kbd event6 B: EV=3 B: KEY=c00a4 2183051 0 0 0 0 110000 1b8 40002841 1e1680 0 0 10008ffc DEVICE="/dev/input/event above is and example of the entry you want to make in /etc/lirc/hardware.conf change S: Sysfs=/class/input/input6 to DEVICE="/dev/input/event6 in /etc/lirc/hardware.conf hopefully you have the right device selected in the hardware.conf now so restart lircd sudo /etc/init.d/lirc restart now test again irw Nore: I tried 2 pre made lircd.conf files that I found online meant for this remote and it did not work I had to make my own lircd.conf from scratch which seemed like a real hassle but ended up taking less time than messing around trouble shooting other lircd.conf files if you cannot get irw to produce a nice result irw 0000000000010160 00 ok DViCO_Dual_Digital 000000000001001c 00 start DviCO_Dual_Digital then you need to generate one yourself type irrecord --driver=dev/input --device=/dev/input/event4 lircdgen.txt

then follow the prompts be careful to pay attention to instructions it took me a few goes as I missed some semi obvious things.

Adding irexec events

I only have 2 irexec events configured im sure if you find a need for you more you can add them using the info provided and maybe some googleing.

power off monitor

this is handy for when im using mythtv in bed I switch to the main menu then click the power off button in the lircrc file provided I have made the following entry

begin prog = irexec button = power config = sleep 1 ; xset dpms force off end then reason I added “sleep 1 ; “ to the command is that I use dual monitors and for some reason it only turns then off for one second then they go back on again or only one monitor turns back on with a key press adding that line seems to fix this however occasionally only one monitor still powers back on as a work around I ctl-alt-f1 and back to ctl-alt-f7 this reinitilizes the monitor


the second irexec event is pretty handy andy a bit tricky

Starting mythtv with start button I like to start mythtv with the start button but also whiile im using mythtv I dont want to accidently start a second instance of mythtv also it would be good if I could use the start button for something else while mythtv is running so I found this script its in the tarball under remote its called start-myth it checks for any instances of mythfrontend and if there is any it does nothing if there isnt it loads mythfrontend so sudo cp start-myth /usr/bin sudo chmod a+x /usr/bin/start-myth

here are the entrys in lircrc that make this happen

begin prog = irexec button = start config = start-myth& end begin prog = mythtv button = start config = Alt+Home end

adding irexec to start up is necessary for this all to work I tried putting irxec -d in /etc/rc.local and various other start up scripts but I think it dies cause it would get launched before lircd which irrexec needs to bind to, I also found some scripts that didnt work so I ended up getting it to start with X this works well I use KDE if you use gnome im sure there is a easy way of doing this and you probably already now how but I dont, to add irexec to kde start up do the following.

ln -s /usr/bin/irexec ~/.kde/Autostart/

I also added the line below to mythfrontend. in /usr/bin cause sometimes irexec will die during periods of uptime the line below will kill irexec then restart it sudo joe /usr/bin/mythfrontend

  1. !/bin/sh
  2. Mario Limonciello, March 2007
  3. partially merged with startmythtv.sh by Michael Haas, October 2007

killall irexec irexec -d /home/oobe/.lircrc mythfrontend in ubuntu is just a script that points to mythfrontend.real I left the first two comments there so you can see where I added the lines you need change the home directory as appropriate


Keybindings I left comments in the lircrc config explaing the keybindings but its worth reprinting here


  1. Jump Points:
  2. TV Recording Playback: Alt+R
  3. Program Guide: Alt+G
  4. Live TV: Alt+P
  5. MythVideo -> The MythVideo default view: Alt+V
  6. Main Menu: Alt+Home
  7. DVD Menu: Alt+D
  8. JUMPTODVDROOTMENU: Alt+Q
  9. Key Bindings:
  10. TV Playback -> CHANNELDOWN: Down,PgDown
  11. TV Playback -> CHANNELUP: Up,PgUp
  12. TV Playback -> JUMPRWND: Shift+PgUp
  13. TV Playback -> JUMPFFWD: Shift+PgDown

you can change your keybindings using mythweb in http://localhost/mythweb/settings/keys or in mythfrontend under Utiltities Setup / Edit Keys __________________