Multiple codes in code section for Roku remote

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple codes in code section for Roku remote

Joel Ebel
What do multiple codes in one line of the code section of lircd.conf mean? Are those two codes sent sequentially, and then repeated?

For background, I am trying to get an idea of how the Roku remote works, in hopes of figuring out how to directly access channels. I have a Roku, but it came with an RF remote. I have a Harmony remote, which I loaded with IR codes for the Roku, and I've recorded those with irrecord. It uses the NEC protocol with pre-data of 0x5743 and no detected toggle bit mask. For example, here is the Home button:

Home                     0xC03F 0xC13E

For each code the second code appears to be obtained by adding 0x00FF to the first code. I haven't seen this sort of behavior for the NEC protocol before, so I'm wondering if this is common. Is this something specific to Roku? Or is this some anomaly of recording from the Harmony remote, and if I had a real Roku remote it wouldn't behave this way.

My goal was to generate a series of codes using the same protocol as the Roku remote and seeing if any of them, when transmitting, trigger a channel to operate. I know that there is at least a code for the Amazon channel, because you can apparently purchase an IR remote which includes a button for Amazon.

Out of curiosity, anyone have one of these Roku remotes, and care to irrecord it and see if it also produces these same double codes, or even better, can detect the code for some of the direct-access buttons?

Thanks,
Joel

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
Reply | Threaded
Open this post in threaded view
|

Re: Multiple codes in code section for Roku remote

ozzy.lash (Bugzilla)


On Thu, Apr 24, 2014 at 10:40 AM, Joel Ebel <[hidden email]> wrote:
What do multiple codes in one line of the code section of lircd.conf mean? Are those two codes sent sequentially, and then repeated?

For background, I am trying to get an idea of how the Roku remote works, in hopes of figuring out how to directly access channels. I have a Roku, but it came with an RF remote. I have a Harmony remote, which I loaded with IR codes for the Roku, and I've recorded those with irrecord. It uses the NEC protocol with pre-data of 0x5743 and no detected toggle bit mask. For example, here is the Home button:

Home                     0xC03F 0xC13E

For each code the second code appears to be obtained by adding 0x00FF to the first code. I haven't seen this sort of behavior for the NEC protocol before, so I'm wondering if this is common. Is this something specific to Roku? Or is this some anomaly of recording from the Harmony remote, and if I had a real Roku remote it wouldn't behave this way.

My goal was to generate a series of codes using the same protocol as the Roku remote and seeing if any of them, when transmitting, trigger a channel to operate. I know that there is at least a code for the Amazon channel, because you can apparently purchase an IR remote which includes a button for Amazon.

Out of curiosity, anyone have one of these Roku remotes, and care to irrecord it and see if it also produces these same double codes, or even better, can detect the code for some of the direct-access buttons?

Thanks,
Joel

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform

Note that for your Home button, 0x3f == ~0xc0 and 0x3e == ~0xc1.  In one of the online references for the NEC protocol I found said that it will send an address byte, followed by its logical inverse, then an command byte followed by its logical inverse.  So if that is true, this would be address 0xc0 command 0xc1.  Here is a link to that reference:

http://techdocs.altium.com/display/ADRR/NEC+Infrared+Transmission+Protocol

I'm not sure that that is what you are seeing, but if other codes follow the same pattern, it may make sense.

Bill


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
Reply | Threaded
Open this post in threaded view
|

Re: Multiple codes in code section for Roku remote

Bengt Martensson-2
In reply to this post by Joel Ebel
On 04/24/14 17:40, Joel Ebel wrote:
> What do multiple codes in one line of the code section of lircd.conf
> mean? Are those two codes sent sequentially, and then repeated?

I have also been asking this question. And no-one on the mailing list
knows either...


> For background, I am trying to get an idea of how the Roku remote works,
> in hopes of figuring out how to directly access channels. I have a Roku,
> but it came with an RF remote. I have a Harmony remote, which I loaded
> with IR codes for the Roku, and I've recorded those with irrecord. It
> uses the NEC protocol with pre-data of 0x5743 and no detected toggle bit
> mask. For example, here is the Home button:
>
> Home                     0xC03F 0xC13E

Is it this device here:
http://www.hifi-remote.com/forums/viewtopic.php?t=14040&postdays=0&postorder=asc&&start=0

Please post what you have, so that we can have a look at it.


Greetonations,

Bengt

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
Reply | Threaded
Open this post in threaded view
|

Re: Multiple codes in code section for Roku remote

Joel Ebel
On Sun, Apr 27, 2014 at 5:04 AM, Bengt Martensson <[hidden email]> wrote:
>
> On 04/24/14 17:40, Joel Ebel wrote:
> > What do multiple codes in one line of the code section of lircd.conf
> > mean? Are those two codes sent sequentially, and then repeated?
>
> I have also been asking this question. And no-one on the mailing list
> knows either...
>
>
> > For background, I am trying to get an idea of how the Roku remote works,
> > in hopes of figuring out how to directly access channels. I have a Roku,
> > but it came with an RF remote. I have a Harmony remote, which I loaded
> > with IR codes for the Roku, and I've recorded those with irrecord. It
> > uses the NEC protocol with pre-data of 0x5743 and no detected toggle bit
> > mask. For example, here is the Home button:
> >
> > Home                     0xC03F 0xC13E
>
> Is it this device here:
> http://www.hifi-remote.com/forums/viewtopic.php?t=14040&postdays=0&postorder=asc&&start=0
>
> Please post what you have, so that we can have a look at it.

It seems like they are discussing the same problem in that forum, but I'm not sure how to translate the syntax they are describing into an lircd.conf. In any case, Ozzy was right about the second byte being the inverse of the first. Given that the first byte was always an even number, that limited it to 128 possible codes. I generate a full list and sent them all to the Roku. I found several direct channel access codes, a channel store code, and one code that I'm not sure about, but it seems to just kill the active channel. I'm still unclear about whether the second set of codes is necessary, or whether the official Roku remote sends them or not, since I figured out the protocol from my Harmony remote and its idea of the Roku codes. I'd be happy to submit these codes to the lirc database, but I'd like to be certain of how a real Roku remote works before I submit it.

begin remote

  name  roku
  bits           16
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       9000  4500
  one           563  1687
  zero          563   562
  ptrail        563
  pre_data_bits   16
  pre_data       0x5743
  gap          108000
  toggle_bit_mask 0x0
  frequency    38000
  duty_cycle   33

      begin codes
          Blockbuster              0x04fb 0x05fa
          Amazon                   0x08f7 0x09f6
          Vudu                     0x10ef 0x11ee
          InstReplay               0x1ee1 0x1fe0
          KillChannel              0x20df 0x21de
          Rewind                   0x2CD3 0x2DD2
          Play/Pause               0x32CD 0x33CC
          Pandora                  0x4AB5 0x4BB4
          OK                       0x54AB 0x55AA
          Back                     0x6699 0x6798
          Left                     0x7887 0x7986
          Info                     0x8679 0x8778
          Up                       0x9867 0x9966
          FastForward              0xAA55 0xAB54
          Right                    0xB44B 0xB54A
          Home                     0xC03F 0xC13E
          Down                     0xCC33 0xCD32
          Netflix                  0xD22D 0xD32C
          ChannelStore             0xe817 0xe916
          M-Go                     0xF00F 0xF10E
          Crackle                  0xFE01 0xFF00

      end codes

end remote
>
>
> Greetonations,
>
> Bengt
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
Reply | Threaded
Open this post in threaded view
|

Re: Multiple codes in code section for Roku remote

Bengt Martensson-2
On 04/28/14 04:47, Joel Ebel wrote:

> On Sun, Apr 27, 2014 at 5:04 AM, Bengt Martensson
> <[hidden email] <mailto:[hidden email]>> wrote:
>>
>> On 04/24/14 17:40, Joel Ebel wrote:
>> > What do multiple codes in one line of the code section of lircd.conf
>> > mean? Are those two codes sent sequentially, and then repeated?
>>
>> I have also been asking this question. And no-one on the mailing list
>> knows either...
>>
>>
>> > For background, I am trying to get an idea of how the Roku remote works,
>> > in hopes of figuring out how to directly access channels. I have a Roku,
>> > but it came with an RF remote. I have a Harmony remote, which I loaded
>> > with IR codes for the Roku, and I've recorded those with irrecord. It
>> > uses the NEC protocol with pre-data of 0x5743 and no detected toggle bit
>> > mask. For example, here is the Home button:
>> >
>> > Home                     0xC03F 0xC13E
>>
>> Is it this device here:
>>
> http://www.hifi-remote.com/forums/viewtopic.php?t=14040&postdays=0&postorder=asc&&start=0
>>
>> Please post what you have, so that we can have a look at it.
>
> It seems like they are discussing the same problem in that forum, but
> I'm not sure how to translate the syntax they are describing into an
> lircd.conf. In any case, Ozzy was right about the second byte being the
> inverse of the first. Given that the first byte was always an even
> number, that limited it to 128 possible codes. I generate a full list
> and sent them all to the Roku. I found several direct channel access
> codes, a channel store code, and one code that I'm not sure about, but
> it seems to just kill the active channel. I'm still unclear about
> whether the second set of codes is necessary, or whether the official
> Roku remote sends them or not, since I figured out the protocol from my
> Harmony remote and its idea of the Roku codes. I'd be happy to submit
> these codes to the lirc database, but I'd like to be certain of how a
> real Roku remote works before I submit it.
>
> begin remote
>
>   name  roku
>   bits           16
>   flags SPACE_ENC|CONST_LENGTH
>   eps            30
>   aeps          100
>
>   header       9000  4500
>   one           563  1687
>   zero          563   562
>   ptrail        563
>   pre_data_bits   16
>   pre_data       0x5743
>   gap          108000
>   toggle_bit_mask 0x0
>   frequency    38000
>   duty_cycle   33
>
>       begin codes
>           Blockbuster              0x04fb 0x05fa
>           Amazon                   0x08f7 0x09f6
...

The codes in the file corresponds to the so-called NEC2-protocol: this
is the same as the NEC1-protocol, except for that the entire "payload"
repeats, not just a "ditto" signal consisting of two pulses as in NEC1.
 The signals are all NEC2 with device number = 234 and subdevice = 194.
(This is decoded in  pre_data = 0x5743, note that the NEC-protocols
interpret the parameters in LSB-first order, so that 0x57 bitreversed =
0xEA = 234, 0x43 bitreversed = 0xC2 = 194). Correspondingly, the numbers
associated with the commands are the command numbers, bitreversed, and
with the bit-inverse added. So for example "Blockbuster" has the command
numbers bitreverse(0x04) = 32 and 160. We observe that the two command
numbers all differ by 128; differently put, the first one has MSB=0, the
second one MSB=1.

Just for amusement, check out the description given by the WinLirc-ers:
http://winlirc.sourceforge.net/technicaldetails.html : "Each line in
this section contains the name of a button on the remote followed by its
hexidecimal data value."   ;-)


So, I decided to find out what the multiple code numbers meant. Turns
out that it is a feature deep within LIRC's internal structure: the
struct ir_ncode contains a code (a long integer) but also a linked list
to ir_code_nodes, each containing such a code. When transmitting such a
code, first the IR from the first code is sent, then the global variable
repeat_remote is set, and by setting an alarm, a signal handler is
transmitting the rest of the codes.

I recorded what was sent by LIRC 0.9.0 using this file: Using
"Blockbuster" and SEND_ONCE with repeat of 0, I received one 32-signal a
one 160-signal. With repeat = 1, I got exactly the same. With repeat =
3, I received 4 pairs, and it appears that with repeat = n, there will
be 2(n-1) pairs of one 32-signal and one 160 signal.

It would be nice to learn what specifications the original authors were
using...

According to the quoted forum thread, the Roku device seems to accept
both command numbers, but no-one seems to understand its "inner meaning".

Remains to find out what the original Roku really is sending (and why).
Lacking one such, I cannot directly help. Possibly you can capture some
sequences with another tool, like mode2?

Greetonations,

Bengt



------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
Reply | Threaded
Open this post in threaded view
|

Re: Multiple codes in code section for Roku remote

Joel Ebel
On Sat, May 3, 2014 at 1:06 PM, Bengt Martensson <[hidden email]> wrote:
Remains to find out what the original Roku really is sending (and why).
Lacking one such, I cannot directly help. Possibly you can capture some
sequences with another tool, like mode2?
 
I got my hands on a real roku remote, and what it's doing is surprising to me, and I'm not sure how to express it in an lircd.conf. irrecord gave me the same double codes as I got before. Looking at mode2, the roku remote sends only the first code for a momentary press, and for a held down button, it repeats the second code as long as you hold it down. For instance, for Blockbuster, which is 0x04FB 0x05FA, If I hit the button briefly, it sends only 0x04FB. If I hold it down, it sends a single 0x04FB, then 0x05FA over and over. This is very different from what lirc transmits from the same config, which you observed to be always sending and repeating the pair. A consequence of this also seems to be that lirc doesn't detect the roku remote signal unless I hold it down long enough to send the second code at least once, and then, no matter how long I hold it down, lirc only detects the code a single time.

I feel like what I would need to be able to express this is a repeat_mask. Basically similar to a toggle mask, but on repeated signals, I need to invert 0x0101. That way, only 0x04FB is detected as the code, and 0x05FA means a repeat. There's not some way to express this currently is there?

Joel

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Reply | Threaded
Open this post in threaded view
|

Re: Multiple codes in code section for Roku remote

Bengt Martensson-2
Hi Joel,

On 06/25/14 06:20, Joel Ebel wrote:

> On Sat, May 3, 2014 at 1:06 PM, Bengt Martensson
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Remains to find out what the original Roku really is sending (and why).
>     Lacking one such, I cannot directly help. Possibly you can capture some
>     sequences with another tool, like mode2?
>
>  
> I got my hands on a real roku remote, and what it's doing is surprising
> to me, and I'm not sure how to express it in an lircd.conf. irrecord
> gave me the same double codes as I got before. Looking at mode2, the
> roku remote sends only the first code for a momentary press, and for a
> held down button, it repeats the second code as long as you hold it
> down. For instance, for Blockbuster, which is 0x04FB 0x05FA, If I hit
> the button briefly, it sends only 0x04FB. If I hold it down, it sends a
> single 0x04FB, then 0x05FA over and over. This is very different from
> what lirc transmits from the same config, which you observed to be
> always sending and repeating the pair. A consequence of this also seems
> to be that lirc doesn't detect the roku remote signal unless I hold it
> down long enough to send the second code at least once, and then, no
> matter how long I hold it down, lirc only detects the code a single time.

Thanx for verifying this. It is essentially consistent with the "Pronto
Hex" signals here;
http://www.remotecentral.com/cgi-bin/mboard/complete/thread.cgi?keywords=5178&highlight=roku


The sad fact is that, at least as I understand it, LIRC cannot reproduce
this kind of signals. It can either repeat the whole payload, or it can
repeat a short "ditto" signal, (like in NEC1) given by the many
parameters. It can not, as opposed to other systems, have one reasonably
complex "intro" sequence, and another, reasonably complex "repeat sequence".

LIRC was written at a point of time when we knew much less about IR
signals than we do today. Sorry.


Bengt


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Reply | Threaded
Open this post in threaded view
|

Re: Multiple codes in code section for Roku remote

Joel Ebel



On Wed, Jun 25, 2014 at 1:44 PM, Bengt Martensson <[hidden email]> wrote:
The sad fact is that, at least as I understand it, LIRC cannot reproduce
this kind of signals. It can either repeat the whole payload, or it can
repeat a short "ditto" signal, (like in NEC1) given by the many
parameters. It can not, as opposed to other systems, have one reasonably
complex "intro" sequence, and another, reasonably complex "repeat sequence".


Given that lirc can't accurately represent the signal the roku remote can produce, is there any interest in including it in the remote database? Perhaps a well-commented version explaining the limitations as they currently stand?

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Reply | Threaded
Open this post in threaded view
|

Re: Multiple codes in code section for Roku remote

steve
Joel Ebel <lirc@...> writes:

>
>
>
> On Wed, Jun 25, 2014 at 1:44 PM, Bengt Martensson <bulk <at>
bengt-martensson.de> wrote:
>
> The sad fact is that, at least as I understand it, LIRC cannot reproduce
> this kind of signals. It can either repeat the whole payload, or it can
> repeat a short "ditto" signal, (like in NEC1) given by the many
> parameters. It can not, as opposed to other systems, have one reasonably
> complex "intro" sequence, and another, reasonably complex "repeat sequence".
>
>
> Given that lirc can't accurately represent the signal the roku remote can
produce, is there any interest in including it in the remote database?
Perhaps a well-commented version explaining the limitations as they
currently stand?

>
>
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft


A complete list would help. I sometimes code directly with a uP (note
lirc).. Thanks.. Steve



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Reply | Threaded
Open this post in threaded view
|

Re: Multiple codes in code section for Roku remote

Joel Ebel
On Tue, Jul 1, 2014 at 10:08 AM, steve <[hidden email]> wrote:
A complete list would help. I sometimes code directly with a uP (note
lirc).. Thanks.. Steve
 Attached is the complete file that I have. I added comments about the incompatibilities between LIRC and the protocol used. I used namespace codes for the normal buttons, but I wasn't sure how I could map the direct channel buttons to anything in the namespace, so they are just names. I'm happy to see this included in the LIRC remote database if others would find it useful.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft

roku.conf (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Multiple codes in code section for Roku remote

steve
Joel Ebel <lirc@...> writes:

>
> On Tue, Jul 1, 2014 at 10:08 AM, steve
<[hidden email]> wrote:
>
> A complete list would help. I sometimes code directly with a uP (note
> lirc).. Thanks.. Steve
>
>  Attached is the complete file that I have. I added comments about the
incompatibilities between LIRC and the protocol used. I used namespace codes
for the normal buttons, but I wasn't sure how I could map the direct channel
buttons to anything in the namespace, so they are just names. I'm happy to
see this included in the LIRC remote database if others would find it useful.
>
> Attachment (roku.conf): application/octet-stream, 2254 bytes
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft


Thanks..

Steve


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft