[vdr] Messages from Lirc have to be longer than 21 chars, why?
Klaus Schmidinger
Klaus.Schmidinger at tvdr.de
Sun Mar 6 15:49:14 CET 2011
On 02.03.2011 21:41, Gerald Dachs wrote:
> Hi,
>
> during my tests with eventlircd I noticed that the up key of my remote
> didn't work with vdr, but with xbmc. I debugged vdr and stumbled above
> the line lirc.c:89 (not vanilla sources):
>
> if (ready && ret > 21) {
>
> Lirc sends this to vdr:
>
> "67 0 KEY_UP devinput"
>
> So this key gets ignored, all other key have longer names and are
> working. Solution seems to be easy. Instead of 21 I could use 19, but
> with inputlircd I get this string for the same key:
>
> "67 0 KEY_UP event7"
>
> It would get ignored again.
>
> What is the intention for this condition:
>
> ret > 21?
>
> Is it to make sure to not get garbage from lirc? But why 21 chars? What
> would be a better length, or a better check?
The check for 21 characters has been in there from the very start.
Note that there is also another explicit number in
if (sscanf(buf, "%*x %x %29s", &count, KeyName) != 2) { // '29' in '%29s' is LIRC_KEY_BUF-1!
I'm not too familiar with the LIRC protocol, but I also think
that this should be changed to make it more flexible.
I guess what we need first is a specification of the strings
LIRC provides. Then we can adapt the VDR code accordingly.
I quickly searched the web, but couldn't find that information.
Anybody?
Klaus
More information about the vdr
mailing list