From: Stefan L. <hoi...@gm...> - 2003-09-26 09:38:41
|
> > Hi, > > I'm playing around with the saa7134 driver and my Flyvideo3000 - this > driver is unusual in that it generates events (e.g. like a keyboard or > mouse would) on /dev/input/event0 rather than passing the timing info >from > the IR-rx to userspace. LIRC-cvs contains a '/dev/input/event' option >(in > the configure menu) - I was wondering how one goes about setting up > configuration files for this? irrecord doesn't work because it's > expecting timing info - so how do I tie events into the rest of LIRC? >I > think these events can simply be thought of 'keyboard input' even >though > the real source is the IR-rx on the card. > Hi, yesterday I was going through almost the same problems, and I finally got it running :) I'm using a bt878-card (hauppauge) with Gerd Knorr's 2.6.0-test5-1 patch (the newer version wouldn't compile, but that's another story), but as these drivers are from the same person as yours (and also share common code in ir-common.ko i assume they work quite similarly. First of all make sure that your remote is properly working. A "cat /dev/input/eventX" should produce output on your console when you press remote buttons. Also Gerd Knorr's input-tools are quite useful for diagnostics (get them at http://bytesex.org/snapshot/input-20030820.tar.gz). "events X" (X=number of the device) should show you the names of the remote buttons you pressed. OK, now I assume the remote itself is working. As Gerd Knorr's events-Tool already shows the names of the buttons instead of the raw signals i first assumed that lircd doesn't need to decode those signals anymore, which is _not_ true obviously. If you look at lircd's log file you'll see errors about unknown hex-codes. All you've got to do now is start "lircd" (best with debug mode for more verbose output), then "irw", press each button of your remote once, monitor the lirc log at the same time ( "tail -f /var/log/lircd" ) and then copy the codes from the log into your /etc/lircd.conf . OK, let me give you an example: Your log will look something like this if you press a button: Sep 26 11:29:19 harkpabst lircd 0.7.0pre1: initializing '/dev/input/event2' Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: devinput_rec Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: time 1064568562.869025 type 1 code 258 value 1 Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: code 80010102 Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: trying "Hauppauge" remote Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: devinput_decode Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: failed "Hauppauge" remote Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: decoding failed for all remotes Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: devinput_rec Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: time 1064568562.869026 type 0 code 0 value 0 Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: code 00000000 Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: trying "Hauppauge" remote Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: devinput_decode Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: failed "Hauppauge" remote Sep 26 11:29:22 harkpabst lircd 0.7.0pre1: decoding failed for all remotes Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: devinput_rec Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: time 1064568563.071022 type 1 code 258 value 0 Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: code 00010102 ^^^^^^^^^^^^^^^^^^^^^^ This is the code you'll need. Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: trying "Hauppauge" remote Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: devinput_decode Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: found: BTN_2 Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: writing to client 0 Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: devinput_rec Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: time 1064568563.071023 type 0 code 0 value 0 Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: code 00000000 Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: trying "Hauppauge" remote Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: devinput_decode Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: failed "Hauppauge" remote Sep 26 11:29:23 harkpabst lircd 0.7.0pre1: decoding failed for all remotes Sep 26 11:29:47 harkpabst lircd 0.7.0pre1: removed client Sep 26 11:29:47 harkpabst lircd 0.7.0pre1: closing '/dev/input/event2' As you can see there's lot of "code 0000000" messages, but honestly I don't know if these are errors or normal. Then take the underlined code and paste it into your /etc/lircd.conf together with a trailing "0x" and an identifier name for the button. So a minimal lircd.conf for just this one button will look like that. begin remote name Whateveryoulike begin codes BUTTONNAME 0x00010102 end codes end remote Now proceed to add all your other buttons, restart lircd, and it should hopefully work. I hope my bttv-results can be useful for saa7134 also. Good luck! regards, Stefan > Cheers, > David. |
From: David A. <dav...@pa...> - 2003-09-26 22:20:45
|
Hi Stefan, Thank you very much! That's exactly the info I was looking for. I'd got as far as using the 'events 0' program myself, but was at a loss as to where I should go from there. Your explanation is clear and I'm going to try it out now. Thanks again, David. > Date: Fri, 26 Sep 2003 11:38:38 +0200 > From: Stefan Lange <hoi...@gm...> > To: lir...@li... > Subject: Re: LIRC and /dev/input/eventX [snip] > Hi, yesterday I was going through almost the same problems, and I > finally got it running :) [snipped useful stuff] |
From: David A. <dav...@pa...> - 2003-09-27 05:34:21
|
Stefan and list, I have had great success with the method you proposed. For the record, here is my /etc/lircd.conf: begin remote name flyvideo3000 begin codes AIR_CATV 0x00010182 VIDEO 0x00010189 AUDIO 0x00010188 POWER 0x00010074 AV_SOURCE 0x000100b0 FULLSCREEN 0x00010174 STEREO 0x00010079 MUTE 0x00010071 VOLUME_UP 0x00010073 VOLUME_DOWN 0x00010072 CHANNEL_UP 0x00010192 CHANNEL_DOWN 0x00010193 RECALL 0x00010081 ENTER 0x00010060 1 0x0001004f 2 0x00010050 3 0x00010051 4 0x0001004b 5 0x0001004c 6 0x0001004d 7 0x00010047 8 0x00010048 9 0x00010049 0 0x00010052 end codes end remote I have a Lifeview Flyvideo 3000 and I've had a ball setting up Mplayer, xmms, xawtv and smartmenu. Thanks very much! David. Stefan Lange wrote on Fri, 26 Sep 2003 11:38:38 +0200: > Now proceed to add all your other buttons, restart lircd, and it should > hopefully work. > > I hope my bttv-results can be useful for saa7134 also. Good luck! |
From: Stefan L. <hoi...@gm...> - 2003-09-28 18:17:10
|
David Antliff wrote: > Stefan and list, > > I have had great success with the method you proposed. For the record, > here is my /etc/lircd.conf: [...] > > Thanks very much! > You're welcome, I'm glad I could help ;-) Here's my lircd.conf for a "hauppauge win-tv pci" remote, if anyone is interested. begin remote name Hauppauge begin codes BTN_0 0x00010100 BTN_1 0x00010101 BTN_2 0x00010102 BTN_3 0x00010103 BTN_4 0x00010104 BTN_5 0x00010105 BTN_6 0x00010106 BTN_7 0x00010107 BTN_8 0x00010108 BTN_9 0x00010109 KEY_MUTE 0x00010071 KEY_VOLUMEUP 0x00010073 KEY_VOLUMEDOWN 0x00010072 KEY_COFFEE 0x00010098 KEY_CYCLEWINDOWS 0x0001009a KEY_RADIO 0x00010181 KEY_TV 0x00010179 KEY_CHANNELUP 0x00010192 KEY_CHANNELDOWN 0x00010193 KEY_CHANNEL 0x0001016b KEY_ZOOM 0x00010174 end codes end remote > David. > [...] |