Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LIRC Hauppauge Walkthrough/Solution (Finally)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
abarlam
n00b
n00b


Joined: 22 Jul 2003
Posts: 9

PostPosted: Wed Jul 30, 2003 5:35 pm    Post subject: LIRC Hauppauge Walkthrough/Solution (Finally) Reply with quote

Well it has certainly been a very entertaining few days to get LIRC to work with my Hauppauge WinTV card and remote, but finally I got it to work! I followed all the methods people posted on these forums but nothing worked (even with building the ebuild specifying the driver to use). Also, I could never get the ebuild to properly create a /dev/lirc entry.

For anyone else who is experiencing issues with LIRC, try this method!

First, compile in i2c support into your kernel. These are the options I selected:

Character Devices --> I2C Support -->

<M> I2C support
<M> I2C bit-banging interfaces
<M> I2C PCF 8584 interfaces
<M> I2C device interface
<M> I2C /proc interface (required for hardware sensors)

Next we need Video For Linux support for my WinTV card (bttv module)

Multimedia Devices -->

<M> Video For LInux

Video For Linux -->

<*> V4L information in proc filesystem

-- Video Adapters

<M> BT848 Video For Linux


Next recompile your kernel (make dep && make clean bzImage modules modules_install)

Reboot into your new kernel, load newly created modules (bttv, i2c-core, etc) and download the newest lirc release from www.lirc.org. DO NOT DOWNLOAD THE EBUILD (don't emerge lirc)!

Extract the lirc archive and run ./setup.sh. This will bring you to a curses based screen with configuration options.

For the first section, select your driver as hauppauge, and for the second option for software configuration select compile for X-Windows if you plan on using LIRC in X. Click save configuration and exit. Now run make and make install to compile and install lirc and the modules for the hauppauge remote. You should notice that it made an entry for /dev/lirc (unlike the ebuild), /dev/lircd, and /dev/lircmd.

Next, we need to load the newly created modules that lirc installed. cd /lib/modules/kernel-dir/misc and insmod lirc_dev and lirc_i2c (You can add an entry to modules.autoload if you choose).

Now we are ready to download the lircd.conf for our remote. Go to www.lirc.org and go to the supported remotes section and grab the hauppauge lircd.conf file. I noticed there were a few hauppauge lircd.conf configs, and it turned out that the older conf file worked and the newer one didnt. To determine what config you need, load lircd /usr/local/sbin/lircd -n (Or wherever you installed it to). It should load up and inform you it is loading using the hauppauge driver. Next run irrecord testfile, and proceed with the instructions they tell you to determine your gap rate and toggle bit. Once it asks you to press a button repeatedly as fast as you can and completes that part you can exit the utility. Now cat testfile and see what values irrecord determined for gap rate and toggle_bit and bits and compare it to the config files they have on lirc.org for hauppauge remotes. For me the later config was the right one (the one with a gap rate of 199995 and bits of 13).

Once you have downloaded your config file, save it as /etc/lircd.conf and restart lircd with the -n flag. Now run irw and press some buttons on the remote. You should see output indicating the button your pressed on the remote and its address. If you don't see any output, you selected the wrong lircd.conf. If you do see proper output then you selected the right config.

Now you are done and you can create a .lircrc file in your home dir to allow lirc to interface with supported apps. For the time being I only have tvtime configured to work with lirc, but I plan to add the xmms-lirc plugin. Here is a sample of my .lircrc for tvtime for hauppauge remotes.

Code:

begin
  prog = irexec
  button = TV
  config = tvtime &
  config = tvtime-command QUIT
end

begin
  prog = irexec
  button = CH+
  config = tvtime-command CHANNEL_UP
end

begin
  prog = irexec
  button = CH-
  config = tvtime-command CHANNEL_DOWN
endbegin
  prog = irexec
  button = VOL+
  config = tvtime-command MIXER_UP
end

begin
  prog = irexec
  button = VOL-
  config = tvtime-command MIXER_DOWN
end


etc etc. You can find the full tvtime command list on their sourceforge website if you wish to bind other buttons. Now you should be able to load up tvtime by simply hitting the tv button on your remote. You may have to have irexec loaded in the background for it to work, i don't recall and I am at my work so I will have to check when i get home

I hope this walkthrough helps some people out as it took me literally days of endless searching to get a working configuration.

P.S - If you emerged tvtime before installing lirc, you will need to recompile it so it builds with lirc support. This goes for all apps that support lirc.

Adam
Back to top
View user's profile Send private message
aakepley
n00b
n00b


Joined: 29 Jul 2003
Posts: 4
Location: Madison, WI

PostPosted: Sat Aug 02, 2003 7:03 pm    Post subject: Problems: irrecord: could not open /dev/lirc Reply with quote

This is a very nice writeup. I've gotten about halfway through the instructions and am having some problems getting irrecord to open /dev/lirc. See the error message below.

Code:

# irrecord testfile
 
irrecord -  application for recording IR-codes for usage with lirc
 
Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)
 
irrecord: could not open /dev/lirc
irrecord: default_init(): No such device
irrecord: could not init hardware (lircd running ? --> close it, check permissions)


The dmesg command tells me
Code:

i2c-dev.o: i2c /dev entries driver module version 2.7.0 (20021208)
i2c-dev.o: unable to get major 89 for i2c bus


However, my modules.d/lircd is
Code:

#lirc remote control stuff
alias   char-major-61           lirc_i2c
alias   /dev/lirc* lirc_i2c


I'm thinking that the problem has something to do with not being able to load the i2c-dev module right after recompiling my kernel. (i2c_dev loads fine later on.)
Code:

 #insmod i2c-dev
Using /lib/modules/2.4.20-gentoo-r5/kernel/drivers/i2c/i2c-dev.o
/lib/modules/2.4.20-gentoo-r5/kernel/drivers/i2c/i2c-dev.o: init_module: Input/output error
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
      You may find more information in syslog or the output from dmesg


Code:

# dmesg
i2c-dev.o: i2c /dev entries driver module version 2.7.0 (20021208)
i2c-dev.o: unable to get major 89 for i2c bus


i2c-dev seems to be trying to get major 89 for my i2c bus when I want major 61. Is there some way to specify this?

P.S. Here's the output of lsmod if it will help (note that I compiled the V4L stuff right into the kernel):

Code:

Module                  Size  Used by    Tainted: P
lirc_i2c                3360   0  (unused)
lirc_dev                8352   0  [lirc_i2c]
i2c-proc                7440   0  (unused)
i2c-algo-pcf            5628   0  (unused)
i2c-algo-bit            8360   0
i2c-core               15816   0  [lirc_i2c i2c-proc i2c-algo-pcf i2c-alg o-bit]
snd-mixer-oss          13848   1  (autoclean)
nvidia               1536864  10  (autoclean)
snd-cs46xx             70100   1
snd-pcm                64736   0  [snd-cs46xx]
snd-timer              15880   0  [snd-pcm]
snd-ac97-codec         37888   0  [snd-cs46xx]
snd-rawmidi            15072   0  [snd-cs46xx]
snd-seq-device          4448   0  [snd-rawmidi]
snd                    31812   0  [snd-mixer-oss snd-cs46xx snd-pcm snd-t imer snd-ac97-codec snd-rawmidi snd-seq-device]
snd-page-alloc          5164   0  [snd-cs46xx snd-pcm]
Back to top
View user's profile Send private message
abarlam
n00b
n00b


Joined: 22 Jul 2003
Posts: 9

PostPosted: Sun Aug 03, 2003 3:20 am    Post subject: Reply with quote

Did you download the ebuild, or are you using the tarball from lirc.org?

I guess you dont need i2c_dev, this is my lsmod.


Code:

Module                  Size  Used by    Not tainted
smbfs                  39344   2  (autoclean)
snd-pcm-oss            40324   0  (autoclean)
snd-mixer-oss          13880   1  (autoclean) [snd-pcm-oss]
tuner                  10688   1  (autoclean)
tvaudio                13916   1  (autoclean)
msp3400                18060   1  (autoclean)
bttv                   78528   2  (autoclean)
videodev                6304   3  (autoclean) [bttv]
i2c-algo-bit            8200   1  (autoclean) [bttv]
lirc_i2c                3264   1  (autoclean)
i2c-core               15848   0  (autoclean) [tuner tvaudio msp3400 bttv i2c-algo-bit lirc_i2c]
lirc_dev                8240   1  (autoclean) [lirc_i2c]
snd-intel8x0           20260   2
snd-pcm                68320   0  [snd-pcm-oss snd-intel8x0]
snd-timer              16840   0  [snd-pcm]
snd-ac97-codec         38240   0  [snd-intel8x0]
snd-page-alloc          5616   0  [snd-intel8x0 snd-pcm]
snd-mpu401-uart         4096   0  [snd-intel8x0]
snd-rawmidi            15392   0  [snd-mpu401-uart]
snd-seq-device          4452   0  [snd-rawmidi]
snd                    34052   1  [snd-pcm-oss snd-mixer-oss snd-intel8x0 snd-pcm snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]
ntfs                   77996   2  (autoclean)
bcm4400                27360   1
sg                     29356   0
ide-scsi                8624   0
sr_mod                 16152   0  (autoclean)
Back to top
View user's profile Send private message
DeadMonkey
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jul 2002
Posts: 81
Location: Sitting in a Chair

PostPosted: Wed Aug 20, 2003 3:06 pm    Post subject: LIRC and the mess I'm in... Reply with quote

Thanks for the writeup, I'll give it a try when I get home.

Wondering, though, what remote you're doing this for? Most of the docs I've seen have to do with getting the grey remote to work; I have the black one from Hauppauge.

I'm trying to get my PVR-250 to work with MythTV and so far the only issues are with LIRC. Then again I'm using the ebuild, although I tried the CVS version and for some reason it won't make. Maybe I'm doing something wrong.

At any rate, the point I'm at now is that I can't get irw or irxevent to work. I have a config file for it, but I want to see what the output is from the remote (see if I'm actually getting any signals from it at all!). All I get are connection refused messages on both accounts.

But like I said, I'll give it a shot!

BTW, if you load lirc_i2c, it should automagically load lirc_dev. At least it does in my case!
Back to top
View user's profile Send private message
abarlam
n00b
n00b


Joined: 22 Jul 2003
Posts: 9

PostPosted: Thu Aug 21, 2003 11:33 pm    Post subject: Reply with quote

I have the black hauppauge remote with the TV, RADIO, MINIMIZE, RESERVED, etc buttons. I had problems with lirc recognizing the remote until I used the proper config file from lirc.org
Back to top
View user's profile Send private message
tressi
n00b
n00b


Joined: 20 Aug 2003
Posts: 11

PostPosted: Sun Aug 24, 2003 9:40 am    Post subject: Reply with quote

Thanks for the instructions, they actually work :)

Luckily I only spent umm, 1 night desperately trying to get the ebuild work..
Back to top
View user's profile Send private message
vrih
n00b
n00b


Joined: 05 Dec 2002
Posts: 69
Location: London, England

PostPosted: Sun Aug 24, 2003 10:07 am    Post subject: Reply with quote

It worked fine for me running the ebuild then downloading the relevant config files for my card. My remote appeared fine at /dev/lirc/0 . The only problem I had was that the lirc programs seem to look for just /dev/lirc by default.
Back to top
View user's profile Send private message
handsomepete
Guru
Guru


Joined: 21 Apr 2002
Posts: 548
Location: Kansas City, MO

PostPosted: Sun Aug 24, 2003 12:48 pm    Post subject: Reply with quote

Replying to bookmark. Thanks for the writeup.
Back to top
View user's profile Send private message
theonlymcc
Apprentice
Apprentice


Joined: 16 Sep 2003
Posts: 274
Location: NC

PostPosted: Thu Sep 25, 2003 12:08 pm    Post subject: Reply with quote

I did all that, and it worked up until testing tvtime. I dont get anything. I emerged it again. What next?
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Fri Sep 26, 2003 7:00 am    Post subject: Reply with quote

I've got my remote working with irw, I started lircd like this:
/usr/sbin/lircd -n --device=/dev/lirc/0

I was looking at the settings.pro in the file in my /usr/portage/distfiles and it has the lirc stuff commented out that they say to use on the MythTV site to have it natively support lirc. It says you can also use a .lircrc file, however it doesn't seem to use that. Has anyone gotten MythTV to use this file?
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Fri Sep 26, 2003 5:10 pm    Post subject: Reply with quote

kmj0377 wrote:
I've got my remote working with irw, I started lircd like this:
/usr/sbin/lircd -n --device=/dev/lirc/0

I was looking at the settings.pro in the file in my /usr/portage/distfiles and it has the lirc stuff commented out that they say to use on the MythTV site to have it natively support lirc. It says you can also use a .lircrc file, however it doesn't seem to use that. Has anyone gotten MythTV to use this file?


Nevermind, it's irxevent that I forgot to run :oops:
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Fri Sep 26, 2003 5:10 pm    Post subject: Reply with quote

kmj0377 wrote:
I've got my remote working with irw, I started lircd like this:
/usr/sbin/lircd -n --device=/dev/lirc/0

I was looking at the settings.pro in the file in my /usr/portage/distfiles and it has the lirc stuff commented out that they say to use on the MythTV site to have it natively support lirc. It says you can also use a .lircrc file, however it doesn't seem to use that. Has anyone gotten MythTV to use this file?


Nevermind, it's irxevent that I forgot to run :oops:
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Fri Sep 26, 2003 5:11 pm    Post subject: Reply with quote

kmj0377 wrote:
I've got my remote working with irw, I started lircd like this:
/usr/sbin/lircd -n --device=/dev/lirc/0

I was looking at the settings.pro in the file in my /usr/portage/distfiles and it has the lirc stuff commented out that they say to use on the MythTV site to have it natively support lirc. It says you can also use a .lircrc file, however it doesn't seem to use that. Has anyone gotten MythTV to use this file?


Nevermind, it's irxevent that I forgot to run :oops:
Back to top
View user's profile Send private message
Rroet
Apprentice
Apprentice


Joined: 27 May 2002
Posts: 176
Location: The Hague, The Netherlands

PostPosted: Mon Nov 24, 2003 8:54 am    Post subject: Reply with quote

Which kernel version where you using.

Every body keeps posting without kernel versions, i2c and ivtv versions. And I'm currently having much trouble getting the modules compiled without errors. so specific versions would help a big load.

Thanks
_________________
Workstation: Shuttle SN85G4v2, AMD64 3200+, 512MB, 250GB sata, Radeon 9800 Pro.
Server 1: here
Server 2: here
Back to top
View user's profile Send private message
badcherry
n00b
n00b


Joined: 29 Apr 2004
Posts: 8
Location: Medford, WI

PostPosted: Thu Apr 29, 2004 2:12 am    Post subject: Version Numbers Reply with quote

One thing that people failed to mention so far is that you cannot use a tainted gentoo kernel. You must download a kernel fresh from kernel.org (I am using 2.4.26) and compile it with the required options. I then got lirc-0.6.6 to comipile and work. It is a bit of messing around, but I got it working in an hour's time.
Back to top
View user's profile Send private message
Neo_0815
l33t
l33t


Joined: 24 Feb 2003
Posts: 815
Location: Leipzig

PostPosted: Mon Aug 16, 2004 8:45 pm    Post subject: Reply with quote

It seemed i cant find the proper config file on lirc.org ... i must be blind ... anyone can help me, i've searching for haupauge win tv card ... but i cant find anything on www.lirc.org.

best regards

edit: few seconds after writing this i got it ;)
_________________
[img:76661e22b8]http://www.biersekte.de/biersektebanner.gif[/img:76661e22b8]
Back to top
View user's profile Send private message
eGore911
Apprentice
Apprentice


Joined: 11 Mar 2003
Posts: 290

PostPosted: Tue Sep 14, 2004 4:17 pm    Post subject: Reply with quote

Here is what I did to get lirc working for a Hauppauge 878 (bttv). The first part is preparation:
Code:

emerge config-kernel
config-kernel --allow-writeable=yes
emerge -C gentoo-dev-sources && emerge gentoo-dev-sources

Well, since gentoo now supports external modules to be build (and access files OUTSIDE the sandbox) after using config-kernel a little bit, I used it. The allow-writeable option is considered a security risk, but I don't have any problem with that. Also you have to reemerge the sources you had (I think to get the right permissions). Since I use gentoo dev sources, I reemerged them.
Now let's install lirc and load the module
Code:

LIRC_OPTS="--with-driver=hauppauge" emerge lirc
modprobe lirc-i2c
echo "lirc-i2c" >> /etc/modules.autoload.de/kernel-2.6


That was it for me. I tested it with
Code:

irrecord TESTFILE -d /dev/lirc0
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2780
Location: Pittsburgh, PA, USA

PostPosted: Tue Sep 14, 2004 8:37 pm    Post subject: Reply with quote

I got mine working with a patch
https://forums.gentoo.org/viewtopic.php?t=170205&highlight=lirc+patch
but I do admit lirc is very broken and it does not seem that anyone is working on it at all as the download from the lirc webpage is 2 years old... :evil:
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
eGore911
Apprentice
Apprentice


Joined: 11 Mar 2003
Posts: 290

PostPosted: Tue Sep 14, 2004 9:12 pm    Post subject: Reply with quote

Take a look at the snapshots (which are available in portage). Those show that people are still working on lirc.
Back to top
View user's profile Send private message
Nonus
n00b
n00b


Joined: 09 Sep 2004
Posts: 62
Location: Ontario, Canada

PostPosted: Wed Sep 15, 2004 9:18 pm    Post subject: Reply with quote

all i did was get the latest cvs snapshot and compile that with nothing special and everything worked.

the problem I have with lirc is that sometimes the command gets executed twice.
ex.
load xmms
press off on the remote (closes xmms)
run xmms
then xmms will close again.

It seems that lirc stores commands for a while and executes them again one the program is launch. I tried repeat=0 but it doesnt work so i think its something in /etc/lircd.conf that I have to configure.

EDIT: I am running the vinalla 2.6.8.1 kernel.
Back to top
View user's profile Send private message
eGore911
Apprentice
Apprentice


Joined: 11 Mar 2003
Posts: 290

PostPosted: Wed Sep 15, 2004 9:40 pm    Post subject: Reply with quote

I guess you are using a serial lirc remote, right? Because as far as I know the default is to build lirc for remotes connected via serial port.

Or maybe only the ebuild does it this way and lirc (witout ebuild) builds all drivers.
Back to top
View user's profile Send private message
Nonus
n00b
n00b


Joined: 09 Sep 2004
Posts: 62
Location: Ontario, Canada

PostPosted: Wed Sep 15, 2004 11:34 pm    Post subject: Reply with quote

Im using the hauppauge grey remote.

Actually the new cvs drivers have a menu you navigate to select the remote type when you do ./configure. Its a nice touch I might add.

Latest and greatest CVS snapshot. Works on 2.6.8.1.
http://lirc.sourceforge.net/software/snapshots/lirc-0.7.0pre7.tar.bz2
Back to top
View user's profile Send private message
`djinn`
n00b
n00b


Joined: 23 Nov 2002
Posts: 15
Location: /Texas/Dallas

PostPosted: Tue Sep 28, 2004 4:56 am    Post subject: lirc cvs Reply with quote

I noticed several people used the cvs version; some with problems, some not. However, I had problems with it. I got an error at the end of configure and could not 'make'...
Code:
config.status: error: cannot find input file: Makefile.in


using the ebuild for lirc-0.7.0_pre6 the module lirc_i2c was never built. I went and made the driver in the drivers/lirc_i2c/ directory of the cvs version and threw it i /lib/modules/`uname -r`/.../i2c/ and installed the rest with the ebuild (lirc-0.7.0_pre6). I thought I would put this on here just in case anyone else had this problem.

without lirc_i2c loaded /dev/lirc/0 will not exist, also changed the entry in /etc/conf.d/lircd:

Code:
LIRCD_OPTS="-d /dev/lirc/0"

and then irw worked like a champ!

also, http://wilsonet.com/mythtv/lircrc-haupgrey.txt is a great ready-made config for the gray remote.
Back to top
View user's profile Send private message
JanErik
Guru
Guru


Joined: 28 Oct 2002
Posts: 488
Location: Finland

PostPosted: Thu Jan 27, 2005 8:24 pm    Post subject: Reply with quote

I have followed this, but I cannot use lircd or any of the utilities as a user. All work as root though. Should I just run chmod +s on them?

Edit: Just FIY, you should run
Code:
chmod 666 /dev/lircd


I have now also put
Code:
/usr/local/sbin/lircd -n&

in /etc/conf.d/local.start, works fine.

Just put
Code:
irexec&

in your .xinitrc to get that started up aswell.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum