Lirc problem

Hi All,

I’m using my Vero 4k+ for some time, but as I didn’t have any problem I didn’t post on the support forum. Now I’m struggling with IR remote control. :frowning_face:

I’m using the Vero’s builtin receiver with a universal remote (OneForAll Contour 4 / URC-1240), programmed to emulate WDTV Live Remote. It is working properly most of the time, but sometimes it slows down and lags a lot, so I have to press the same button 2-3 times to have the desired effect.

My question is: is there any way to debug what is going on between the remote and the receiver? Is there a detailed log (or can be turned on) showing what codes has been received?

Thank you in advance!
Best Regards,
TiceRex

EDIT: I’m using this remote for 3 other devices without any negative effect, so the problem must be in Vero somewhere…

You can turn debug logging in Kodi (settings>system>logging) and then look at the handlekey events in Kodi’s log (~/.kodi/temp/kodi.log) but if the signal is working after several attempts and inconsistently then I think that most likely your issue is physical in nature with the infrared signal. I would look when it happens to see if there is sunlight hitting the front of the Vero or perhaps something else reflecting or emitting infrared light where it may be making the signal received less optimal.

I assume you also have checked to make sure there is a clear line of sight. You could also try using the optional IR sensor that came with the Vero to see if that helps.

Thank you for the hints!

In order to rule out any physical issues I tested it in complete darkness and from about 3cm, both with the internal and the external IR receiver. I tried it by placing the Vero away from other IR receivers/emitters (TV, ampliflier, etc.). I also tested it with another remote (OneForAll Streamer / URC-7935).

Unfortunately the result is the same: some of the keystrokes are not received, those do not appear in the log either. Both remotes flash while transmitting, so I can tell if they send the commands.

I suspect two things: (1) some kind of performance issue, e.g. osmc is busy and not able to process incoming commands. Or (2) the lirc is broken, and cannot forward requests to osmc.
Is there any hardware level log of the lirc process, where I could see if the transfer reaches lirc?

I would try emulating a different remote.

Is it happening while you watch a Video? If so check this thread

If this is only an issue during video playback, then we are aware of the issue.

Can you confirm where you see the performance regression?

Cheers

Sam

Unfortunately it could happen any time, even if the Vero is completely idle, browsing remote (samba) folders.

Following BanditRider’s post (thank you!) I came up thinking it could be a kind of timing issue in the remote’s lirc config. I’ve found (at least) three different timing definitions for the very same WDTV Live remote.

osmc default:

  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 on JP1 remote’s forum:

  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:

  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

I tried all of them without significant improvement.

I know it’s not in the scope of osmc (as lirc is an operation system module), but could anybody help me to fine-tune these settings?

I’m quite familiar with JP1 universal remotes, so I know it’s a NEC1 protocol with device code 0x84 0x79 (132 121). What should be the exact timing in this case?

I don’t think it’s related then.

Do you have another remote you can try? We usually test with the Xbox 360 media centre remote.

I asked for help on the JP1 remotes forum, and got the following (for WDTV Live remote) theoretical exact timing. It is a little bit better, but still not perfect.

  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

I’ve tested it with OFA Contour 4 (URC-1240) and OFA Streamer (URC-7935) remotes, both in WDTV Live remote mode. (EDIT: and with OFA URC-8350 and OFA URC-7950 - same result.)

I don’t have Xbox 360 remote, but I re-programmed the OFA Contour 4 to emulate Xbox 360 commands. The result is the same: several codes are not received by Vero.

One more thing:
It seems to me that the problem occurs during browsing, if there is a thumbnail for the folder or file.
There are lot of messages like this in debug log:

2022-03-17 16:17:23.825 T:2670    DEBUG <general>: LIRC: - NEW 6c 0 KEY_DOWN linux-input-layer (KEY_DOWN)
2022-03-17 16:17:23.840 T:2598    DEBUG <general>: HandleKey: 167 (0xa7, obc88) pressed, action is Down
2022-03-17 16:17:23.843 T:3436    DEBUG <general>: ffmpeg[0xb309fbe8X]: [image2] Custom AVIOContext makes no sense and will be ignored with AVFMT_NOFILE format.
2022-03-17 16:17:23.844 T:2598    DEBUG <general>: [Warning] CGUITextureManager::GetTexturePath: could not find texture 'noop'
2022-03-17 16:17:23.852 T:3437    DEBUG <general>: ffmpeg[0xb2ca7c88X]: [image2] Custom AVIOContext makes no sense and will be ignored with AVFMT_NOFILE format.
2022-03-17 16:17:23.858 T:2598    DEBUG <general>: [Warning] CGUITextureManager::GetTexturePath: could not find texture 'noop'
2022-03-17 16:17:23.864 T:3437    DEBUG <general>: ffmpeg[0xb2ca7c88X]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra.
2022-03-17 16:17:23.864 T:3436    DEBUG <general>: ffmpeg[0xb309fbe8X]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra.

In case there is no picture for the folder the next keystroke works normally, if there is a picture then (the error message above comes, and) the next keystroke is lost.

The Kodi wiki page shows a way to test the transmission, so I started irw. I found that usually the key codes come in pairs, probably these are button press/release pairs:

74 0 KEY_POWER linux-input-layer
74 1 KEY_POWER linux-input-layer

But sometimes there is only press (“0”) code without the corresponding release (“1”). According to the log this doesn’t reach osmc…

If you use irw I believe you need to stop the LIRC helper.

I thought so also, but it seems to be working in parallel…