* ir-ctl: invalid scancode '0x857a3a45' for protocol 'nec32'
@ 2019-12-01 17:15 Andreas W. Wieland
2019-12-31 11:26 ` Sean Young
0 siblings, 1 reply; 2+ messages in thread
From: Andreas W. Wieland @ 2019-12-01 17:15 UTC (permalink / raw)
To: linux-media; +Cc: Andreas W. Wieland
Dear Developers!
I think I have discovered a bug in ir-ctl. My application is pretty
simple: I want to change certain settings on my Yamaha surround receiver
via a Raspberry Pi. For this, I have to transmit keycodes with ir-ctl to
the Yamaha. While this works fine for most keycodes, for some keycodes
errors are thrown.
Basically, I record the scancodes of all functions that I need with
ir-keytable, and later use the recorded scancodes for transmitting, for
example:
root@raspberrypi:~# ir-keytable -v -t
Found device /sys/class/rc/rc1/
Found device /sys/class/rc/rc0/
Parsing uevent /sys/class/rc/rc0/lirc0/uevent
/sys/class/rc/rc0/lirc0/uevent uevent MAJOR=252
/sys/class/rc/rc0/lirc0/uevent uevent MINOR=0
/sys/class/rc/rc0/lirc0/uevent uevent DEVNAME=lirc0
Input sysfs node is /sys/class/rc/rc0/input0/
Event sysfs node is /sys/class/rc/rc0/input0/event0/
Parsing uevent /sys/class/rc/rc0/input0/event0/uevent
/sys/class/rc/rc0/input0/event0/uevent uevent MAJOR=13
/sys/class/rc/rc0/input0/event0/uevent uevent MINOR=64
/sys/class/rc/rc0/input0/event0/uevent uevent DEVNAME=input/event0
Parsing uevent /sys/class/rc/rc0/uevent
/sys/class/rc/rc0/uevent uevent NAME=rc-rc6-mce
/sys/class/rc/rc0/uevent uevent DRV_NAME=gpio_ir_recv
/sys/class/rc/rc0/uevent uevent DEV_NAME=gpio_ir_recv
input device is /dev/input/event0
/sys/class/rc/rc0/protocols protocol rc-5 (enabled)
/sys/class/rc/rc0/protocols protocol nec (enabled)
/sys/class/rc/rc0/protocols protocol rc-6 (enabled)
/sys/class/rc/rc0/protocols protocol jvc (enabled)
/sys/class/rc/rc0/protocols protocol sony (enabled)
/sys/class/rc/rc0/protocols protocol rc-5-sz (enabled)
/sys/class/rc/rc0/protocols protocol sanyo (enabled)
/sys/class/rc/rc0/protocols protocol sharp (enabled)
/sys/class/rc/rc0/protocols protocol mce_kbd (enabled)
/sys/class/rc/rc0/protocols protocol xmp (enabled)
/sys/class/rc/rc0/protocols protocol imon (enabled)
/sys/class/rc/rc0/protocols protocol lirc (enabled)
Opening /dev/input/event0
Input Protocol version: 0x00010001
Testing events. Please, press CTRL-C to abort.
30063.090086: lirc protocol(nec32): scancode = 0x857a3a45
30063.140081: lirc protocol(nec32): scancode = 0x857a3a45 repeat
30063.250082: lirc protocol(nec32): scancode = 0x857a3a45 repeat
I now try to transmit exactly that keycode via ir-ctl and get an error
message. Nothing is transmitted:
root@raspberrypi:~# ir-ctl -d /dev/lirc1 -S nec32:0x857a3a45
error: invalid scancode '0x857a3a45' for protocol 'nec32'
As I said, this works fine for most of the keycodes I need, only some
cause this error message. All of the key codes that cause the error are
protocol nec32 and start with 0x8.
My hardware is a Raspberry Pi Zero (latest Raspbian Buster, freshly
updated this morning), a homebrew ir receiver with gpio_ir, a homebrew
transmitter with pwm-ir-tx and the Yamaha Remote is an RAV423 (shipped
with my RX-A3030). IR keytable and ir-ctl both have version number 1.16.3.
If you need further information, please let me know.
I'd like to thank you already in advance for your efforts, and I wish you
Good Luck in finding the problem!
Best Regards,
Andreas
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ir-ctl: invalid scancode '0x857a3a45' for protocol 'nec32'
2019-12-01 17:15 ir-ctl: invalid scancode '0x857a3a45' for protocol 'nec32' Andreas W. Wieland
@ 2019-12-31 11:26 ` Sean Young
0 siblings, 0 replies; 2+ messages in thread
From: Sean Young @ 2019-12-31 11:26 UTC (permalink / raw)
To: Andreas W. Wieland; +Cc: linux-media
Hi Andreas,
On Sun, Dec 01, 2019 at 06:15:56PM +0100, Andreas W. Wieland wrote:
> Dear Developers!
>
> I think I have discovered a bug in ir-ctl. My application is pretty
> simple: I want to change certain settings on my Yamaha surround receiver
> via a Raspberry Pi. For this, I have to transmit keycodes with ir-ctl to
> the Yamaha. While this works fine for most keycodes, for some keycodes
> errors are thrown.
>
> Basically, I record the scancodes of all functions that I need with
> ir-keytable, and later use the recorded scancodes for transmitting, for
> example:
>
> root@raspberrypi:~# ir-keytable -v -t
> Found device /sys/class/rc/rc1/
> Found device /sys/class/rc/rc0/
> Parsing uevent /sys/class/rc/rc0/lirc0/uevent
> /sys/class/rc/rc0/lirc0/uevent uevent MAJOR=252
> /sys/class/rc/rc0/lirc0/uevent uevent MINOR=0
> /sys/class/rc/rc0/lirc0/uevent uevent DEVNAME=lirc0
> Input sysfs node is /sys/class/rc/rc0/input0/
> Event sysfs node is /sys/class/rc/rc0/input0/event0/
> Parsing uevent /sys/class/rc/rc0/input0/event0/uevent
> /sys/class/rc/rc0/input0/event0/uevent uevent MAJOR=13
> /sys/class/rc/rc0/input0/event0/uevent uevent MINOR=64
> /sys/class/rc/rc0/input0/event0/uevent uevent DEVNAME=input/event0
> Parsing uevent /sys/class/rc/rc0/uevent
> /sys/class/rc/rc0/uevent uevent NAME=rc-rc6-mce
> /sys/class/rc/rc0/uevent uevent DRV_NAME=gpio_ir_recv
> /sys/class/rc/rc0/uevent uevent DEV_NAME=gpio_ir_recv
> input device is /dev/input/event0
> /sys/class/rc/rc0/protocols protocol rc-5 (enabled)
> /sys/class/rc/rc0/protocols protocol nec (enabled)
> /sys/class/rc/rc0/protocols protocol rc-6 (enabled)
> /sys/class/rc/rc0/protocols protocol jvc (enabled)
> /sys/class/rc/rc0/protocols protocol sony (enabled)
> /sys/class/rc/rc0/protocols protocol rc-5-sz (enabled)
> /sys/class/rc/rc0/protocols protocol sanyo (enabled)
> /sys/class/rc/rc0/protocols protocol sharp (enabled)
> /sys/class/rc/rc0/protocols protocol mce_kbd (enabled)
> /sys/class/rc/rc0/protocols protocol xmp (enabled)
> /sys/class/rc/rc0/protocols protocol imon (enabled)
> /sys/class/rc/rc0/protocols protocol lirc (enabled)
> Opening /dev/input/event0
> Input Protocol version: 0x00010001
> Testing events. Please, press CTRL-C to abort.
> 30063.090086: lirc protocol(nec32): scancode = 0x857a3a45
> 30063.140081: lirc protocol(nec32): scancode = 0x857a3a45 repeat
> 30063.250082: lirc protocol(nec32): scancode = 0x857a3a45 repeat
>
> I now try to transmit exactly that keycode via ir-ctl and get an error
> message. Nothing is transmitted:
>
> root@raspberrypi:~# ir-ctl -d /dev/lirc1 -S nec32:0x857a3a45
> error: invalid scancode '0x857a3a45' for protocol 'nec32'
ir-ctl is doing a test to see if the scancode can be represented as
nec-x, the 24 bit nec variant. This test is broken.
The test was fixed in v4l-utils 1.18.0, the exact commit was:
https://git.linuxtv.org/v4l-utils.git/commit/?id=be940713a6e29652d4440cebc78e8381606646bd
Possibly we should push this to the 1.16 branch. Before we do this, it would
be great if you could verify that things now work as you would expect. There
is a lot of bit fiddling in this commit which can easily be wrong.
Thank you in advance!
Best,
Sean
>
> As I said, this works fine for most of the keycodes I need, only some
> cause this error message. All of the key codes that cause the error are
> protocol nec32 and start with 0x8.
>
> My hardware is a Raspberry Pi Zero (latest Raspbian Buster, freshly
> updated this morning), a homebrew ir receiver with gpio_ir, a homebrew
> transmitter with pwm-ir-tx and the Yamaha Remote is an RAV423 (shipped
> with my RX-A3030). IR keytable and ir-ctl both have version number 1.16.3.
>
> If you need further information, please let me know.
>
> I'd like to thank you already in advance for your efforts, and I wish you
> Good Luck in finding the problem!
>
> Best Regards,
>
> Andreas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-31 11:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-01 17:15 ir-ctl: invalid scancode '0x857a3a45' for protocol 'nec32' Andreas W. Wieland
2019-12-31 11:26 ` Sean Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).