From: Tom H. <tom...@ad...> - 2007-01-25 01:35:53
|
On Thu, 25 Jan 2007 00:40:37 +0000 Laurence Darby <ld...@tu...> wrote: > Tom Horsley wrote: > > > Lots of folks (including me) have no problem getting their remotes > > to show nice output from mode2 with unique strings of pulses > > of various lengths identifying button presses. > > For me, that was the most difficult and satisfying part of setting up > lirc. Once the data link is there, everything else follows. > > > Yet the config file wants much more arcane information that > > imposes some sort of "protocol" on the data. > > Do you have any better way of making the computer know that > 0x0000000000001029 from my remote is the PAUSE button? mode2 doesn't generate any data which has any obvious or even non-obvious relationship to something that might be written as 0x0000000000001029, or to anything that shows up in any lircd.conf file. > Or, for another random remote, it might be PLAY? > > Or, the PAUSE button for a 3rd remote sends 0x0000000000000027 ? > > > Getting from the > > one to the other seems to involve much cryptic mysticism :-). > > > > No, it doesn't. Nobody is asking you to manually convert a stream of > bits into hex codes, then decode what button it corresponds to. > That's what irrecord is for. All irrecord does is complain that it can't deal with the data it sees. > > Is there any reason not to drive button recognition directly > > off the sort of data that mode2 prints? > > > > Huh? That's what lirc.conf is for. > > > The different pulses could easily map to an "alphabet", and the > > buttons to strings in that alphabet. > > What, like button names in the English alphabet? > > > Recognizing fixed constant > > strings in a stream of data is something computers are pretty good > > at - there are well known string matching algorithms which are > > quite efficient. > > > > Try to guess what lircd does with lirc.conf. I've not only tried to guess, I've looked at the code to try and understand it, which is where the comment about cryptic mysticism comes from :-). > If you've got a specific problem you think could be fixed, say it > instead of vague philosophing which invites sarcastic answers. The specific problem is that if mode2 works, that should be enough to recognize the unique string of pulses that identify remote keypresses, yet irrecord is unable to understand the data for many remotes where mode2 works fine (just look through the archives of this list for plenty of posts from people who have mode2 output but can't get irrecord to function). Examination of the code seems to indicate that (for USB interfaces anyway), the USB interface is placed into some entirely different mode of operation via ioctl calls when running lircd than when running mode2. > Laurence > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |