Re: Questions about ir-keytable and ir-ctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vince,

On Sat, Oct 28, 2023 at 01:21:15PM +0000, Vince Ricosti wrote:
> I have described my experiments on linux with a rpi and I am a bit surprised that nothing works as it should.
> I have posted here my tests https://forums.raspberrypi.com/viewtopic.php?t=358522
> And I would like to discuss the different issues.
> 
> 1) Why when enabling all protocols a sony15 is not properly recognized ?
> 
> Testing events. Please, press CTRL-C to abort.
> 557.572052: lirc protocol(rc5_sz): scancode = 0x2fff toggle=1
> 557.572077: event type EV_MSC(0x04): scancode = 0x2fff
> 557.572077: event type EV_SYN(0x00).

That's a "suprious" decode. You can ignore it.

This is a case where the same IR can be decoded in multiple ways, if all
the decoders are enabled. The Sony/rc5_sz protocols are "non-robust", see
http://hifi-remote.com/wiki/index.php/Spurious_decodes_and_non-robust_protocols

> 557.572138: event type EV_MSC(0x04): scancode = 0x970026
> 557.572138: event type EV_SYN(0x00).
> 557.572130: lirc protocol(sony15): scancode = 0x970026
> 
> and when I enable only sony protocol it's properly recognized:
> 1236.384059: lirc protocol(sony15): scancode = 0x970026
> 1236.384082: event type EV_MSC(0x04): scancode = 0x970026
> 1236.384082: event type EV_SYN(0x00).

Only enabling the sony protocol is the right solution, or simply ignoring
the spurious decode. This works in most cases, because the resulting scancode
is not something you would expect.

> 2) When sending a sony scancode it doesn't work because the scancode is sent only once while for it work it need to be sent 3 times (or at least 2 times separated with a space of 43 * 600ms = 28500. Is there any flags to do that because I had to patch ir-ctl to make it work.

Yes, you are right about this. My sony system also needs the IR repeated at
least twice or else it ignores it.

> If nothing exists can I submit some patches to fix it ?

Sure, I think this is a useful addition to ir-ctl. 

On the other hand, I have been working on a new tool that replaces ir-ctl
and ir-keytable called cir: https://github.com/seanyoung/cir/ It might be
interesting to use this instead.

Using cir you would describe the sony protocol in IRP and send it that way,
and the IRP says that it should be repeated 3 times, rather than building 
this into the IR tool itself:

	cir transmit irp -fD=1,F=1 '{40k,600}<1,-1|2,-1>(4,-1,F:7,D:8,^45m)3[D:0..255,F:0..127]'

Alternatively you can also specify IRP repeats like so:

	cir transmit irp -fD=1,F=1 -r 3 '{40k,600}<1,-1|2,-1>(4,-1,F:7,D:8,^45m)*[D:0..255,F:0..127]'

cir transmit works very well and can also transmit lircd.conf files and
pronto hex, that is well tested and stable. However decoding needs work,
and the day-job is keeping me very busy lately. When I have some time I want
convert the decoding DFA to BPF and generate an IR decoder for the IRP.


Sean



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux