linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: JohnG <tardis@xnet.com>
Cc: linux-media@vger.kernel.org
Subject: Re: scancodes identified as invalid
Date: Sun, 21 Jul 2019 20:36:07 +0100	[thread overview]
Message-ID: <20190721193607.hi3ipvxyedlhii3p@gofer.mess.org> (raw)
In-Reply-To: <5370cd2b-f699-7831-e040-4b27e7f0cdaa@xnet.com>

Hi,

On Fri, Jul 19, 2019 at 06:50:05AM -0500, JohnG wrote:
> I have POWER_KEY scancodes, that work as RAW data with ir-ctl -s [file], but
> are not working with ir-ctl -S:
> 
>     0x20df10ef (POWER_KEY for my LG tv)
>     0x02FD48B7 (POWER_KEY for my Toshiba tv)

As you can see here https://www.sbprojects.net/knowledge/ir/nec.php the
nec protocol has an inverted address (2nd byte) and inverted command
(3rd byte). The inverted values are not in regular nec scancodes for ir-ctl,
as they are redundant.

So the first values would be "ir-ctl -S nec:0x2010" and the second one
"ir-ctl -s nec:0x0248".

> rc6_mce:0x800f0410 works, as does nec32:0x800f0410 (though not
> nec:0x800f0410), so it doesn't seem to be an issue with 32-bit codes.
> 
> I use AnalysIR, and it indicates the protocol is NEC for the above codes,
> though irdb.tk indicates the protocol is NEC1.
> 
> 1) is there a description of the various protocols? (how can I know if I
> should use nec or nec32, with a 32 bit value?)

There isn't any documentation, although we could really use some. I'll try
to write something up when I get some time. In the mean time, you
can see a list of the protocols to and bitmask here:

https://git.linuxtv.org/v4l-utils.git/tree/utils/common/ir-encode.c#n344

So the scancode_mask shows which bits are actually valid; if any bits
outside of the mask are set, ir-ctl will say the scancode is invalid.

So for nec any value between 0 and 0xffff is valid; necx it is 0 to 0xffffff
and nec32 it is 0 to 0xffffffff.

> 2) are my scancodes failing to work, because they are (possibly) NEC1
> protocol?

I'm not sure what the nec1 protocol is exactly. This sounds like a AnalysIR
invention.

> 
> 3) if NEC1 is not the same as nec or nec32, is it scheduled to be added to
> ir-ctl in the near future?

Please let me know how you get on with the above.

Thanks

Sean

  reply	other threads:[~2019-07-21 19:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19 11:50 JohnG
2019-07-21 19:36 ` Sean Young [this message]
     [not found]   ` <1981366943.5122868.1563752034290@mail.yahoo.com>
2019-07-22  5:22     ` Sean Young
     [not found]   ` <1881197532.5237588.1563795842895@mail.yahoo.com>
2019-07-22 13:26     ` scancodes identified as invalid (I found the problem) Sean Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190721193607.hi3ipvxyedlhii3p@gofer.mess.org \
    --to=sean@mess.org \
    --cc=linux-media@vger.kernel.org \
    --cc=tardis@xnet.com \
    --subject='Re: scancodes identified as invalid' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).