rmir to lirc / WDTV Live remote

If you're not a JP1 user, but would like help from the JP1 experts, post your question here.

Moderator: Moderators

Post Reply
TiceRex
Posts: 80
Joined: Thu Jun 28, 2012 11:37 pm

rmir to lirc / WDTV Live remote

Post by TiceRex »

Dear All,

I've found software to convert lirc config to rmir, but I couldn't find anything to the reverse operation.
I (suspect) have problems with timing in lirc. My config: Vero 4k+ with OFA Contour 4 (URC-1240) programmed to emulate WDTV Live remote. I've found several lirc config for this remote (NEC1 132 121), with completely different timing settings.

osmc (Vero) default:

Code: Select all

  header       9024  4456
  one           600  1646
  zero          600   524
  ptrail        598
  repeat       9028  2209
  pre_data_bits   16
  pre_data       0x219E
  gap          107883
  toggle_bit_mask 0x0
another one I found here on JP1 forum:

Code: Select all

  header       8887  4273
  one           624  1530
  zero          624   434
  ptrail        623
  repeat       8884  2092
  pre_data_bits   16
  pre_data       0x219E
  gap          104496
  toggle_bit_mask 0x0
and another one on github:

Code: Select all

  header       8955  4524
  one           530  1716
  zero          530   592
  ptrail        529
  repeat       8954  2276
  pre_data_bits   16
  pre_data       0x219E
  gap          107830
  toggle_bit_mask 0x0
Could anybody help me? How to find the exact timings for this remote?

(I've asked the same on osmc forum: https://discourse.osmc.tv/t/lirc-problem/92733/.)

Thank you in advance!
Best Regards,
TiceRex
Barf
Expert
Posts: 1524
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Re: rmir to lirc / WDTV Live remote

Post by Barf »

TiceRex wrote:I've found software to convert lirc config to rmir, but I couldn't find anything to the reverse operation.
In RMIR/RMDU, export as Girr file, then open that file with IrScrutinizer, and with IrScrutinizer export using the Lirc export format.

(You can also import Lirc files into IrScrutinizer, export as Girr, and open that file in RMIR/RMDU.
How to find the exact timings for this remote?
Yes, most Lirc files actually have pretty dirty timings. :wink: (One reason is that almost all Lirc supported receivers are using demodulating captures.) If you let IrScrutinizer generate the Lirc files for you (as per above), they will correspond to the theoretical timing values of IrpProtocols.xml.

If there are issues, or anything is unclear, just tell us.
TiceRex
Posts: 80
Joined: Thu Jun 28, 2012 11:37 pm

THANK YOU!

Post by TiceRex »

Thank you very much for your help!

Just for the reference, IrScrutinizer gave me this timing:
(Actually, the pre_data was missing and was added to all keys separately, so I fixed it.)

Code: Select all

  header        9024    4512
  one           564     1692
  zero          564     564
  ptrail        564
  repeat        9024    2256
  pre_data_bits 16
  pre_data      0x219E
  gap           108000
  toggle_bit_mask  0x0
It's still not perfect, but much better than the previous settings.
Barf
Expert
Posts: 1524
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Re: THANK YOU!

Post by Barf »

TiceRex wrote:Thank you very much for your help!

Just for the reference, IrScrutinizer gave me this timing:
(Actually, the pre_data was missing and was added to all keys separately, so I fixed it.)
Actually, the export uses all 32 bits in the command's hex numbers, so pre_data is not used or needed. If you just slam it on, you must adjust the command's hex numbers appropriately. (But there is absolutely no reason to do so.)
It's still not perfect, but much better than the previous settings.
Exactly what do you mean by that statement? Is something broken, or do you have an improvement to suggest?
TiceRex
Posts: 80
Joined: Thu Jun 28, 2012 11:37 pm

Post by TiceRex »

I meant that with this timing the fault rate is a little bit lower.
I would say (without making precise statistics) that the former timings cause about 5-6 faults out of 10 attempts, the newer one about 3-4 faults.

The description of the problem can be found here:
https://discourse.osmc.tv/t/lirc-problem/92733

I don't know if you can reach that site without registration, so here are the details:
This is the config: URC-1240, emulating WDTV remote --> Vero 4k+ / Onkyo ampliflier / LG TV
The Vero doesn't react on some of the keystrokes on the remote, while the other devices have no problems at all. According to the investigation I thought that the lirc (embedded in Vero) has wrong timing information, that's why some keystrokes are lost. But now I'm out of clues, as the timing modification didn't solve the problem.
Barf
Expert
Posts: 1524
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

Ok, so let's sum up: The issue in the thread title is solved; you have a perfect lircd.conf for the WD remote. So, with your own words,
so the problem must be in Vero somewhere
and is therefore strictly speaking a case for the "Vero support".

FYI, Lirc is IMHO one of the most overrated pieces of open-source software there is... :wink:

Here are some questions that may help you debug:

* Are you sure your lircd.conf is "taken", and that the Vero-Lirc is not using something built-in?
* Does it have anything to do with the repeat pattern? You can, as a test, change NEC1 to NEC2 on both sending and receiving end. Does it help to send the signal several times?
* By setting Lirc's loglevel high (I think 9 or 10), you can debug its decoding.
* If the receiver use a cheapie VS1838 or something, replace with a high-quality sensor, like Vishay TSPO34438 or similar.
* If you install a stand-alone Lirc, how does that perform?
TiceRex
Posts: 80
Joined: Thu Jun 28, 2012 11:37 pm

Post by TiceRex »

Thank you, Barf for your kind help!
Yes, as far as JP1 remotes concerned the problem is solved.

I really hate lirc, just look at this explanatory (?) picture:
https://kodi.wiki/view/LIRC#Historical_Information
There are too many layers, each of them has at least 3-4 configuration files hidden in various places around the operating system. :(

About your debug suggestions (thank you again!):
* I'm sure my config is in use, I can tell by using the irw command: there are some button definitions which the original WDTV remote doesn't have.
* I tried both NEC1 and NEC2 on the remote, but I don't know how could it be set up on the receiving end (lirc). Though I think the problem is not related to the repeat function.
* I've tested it with irw (as suggested on the kodi website), and found some quirks. See https://discourse.osmc.tv/t/lirc-problem/92733/10. I don't know how to change lirc log level (which config file?).
* The Vero came with two IR receivers. The internal one has no markings, only "MYS" written on the top. The external one is a VS1838B. Both fails the same way, so I think it's not hardware issue.
* Standalone lirc? You mean on some other hardware? I have it installed on a RPi (via GPIO), that can capture all the keystrokes. But that is much simpler than Vero, so it's not comparable.
Barf
Expert
Posts: 1524
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

TiceRex wrote:I really hate lirc, just look at this explanatory (?) picture:
https://kodi.wiki/view/LIRC#Historical_Information
There are too many layers, each of them has at least 3-4 configuration files hidden in various places around the operating system. :(
I am speechless! When IR decoding in the kernel was introduced, there was really no need for Lirc any more, instead they did this!!

Just a thought: It appears from the text that the kernel is decoding the signals, not lircd. If that is the case, fumbling with *.lircd.conf is ignored.
Post Reply