Menu

#358 lirc dosen't get repeat code

0.10.1
open
nobody
None
na
2020-04-22
2020-04-22
No

Hi Guys. I'm using Ubuntu 20.04 with lirc 0.10.1-6.1 and I'm using serial receiver. If I hold a button the lirc dosen't get the repeat code. The Lirc output with error:

lircd-0.10.1[38513]: Trace: writing to client 0: 0000000020dfd22d 00 KEY_DOWN CCE
lircd-0.10.1[38513]: Trace2: pending pulse: 0
lircd-0.10.1[38513]: Trace2: pending space: 0
lircd-0.10.1[38513]: Trace: trying "CCE" remote
lircd-0.10.1[38513]: Trace2: pending pulse: 0
lircd-0.10.1[38513]: Trace2: pending space: 0
lircd-0.10.1[38513]: Trace2: <s39840
lircd-0.10.1[38513]: Trace: sync
lircd-0.10.1[38513]: Trace2: expecting pulse: 9078
lircd-0.10.1[38513]: Trace2: +p9089
lircd-0.10.1[38513]: Trace2: pending space: 2169
lircd-0.10.1[38513]: Trace2: expecting pulse: 638
lircd-0.10.1[38513]: Trace2: +s2166
lircd-0.10.1[38513]: Trace2: pending space: 0
lircd-0.10.1[38513]: Trace2: timeout: 100000
lircd-0.10.1[38513]: Trace: no repeat

I fix it just by changing MIN_RECEIVE_TIMEOUT to 125000. I got this timeout number from mode2 output, I don't know why mode2 has a different timeout from lirc.

diff -ru lirc-0.10.1.orig/lib/lirc/receive.h lirc-0.10.1/lib/lirc/receive.h
--- lirc-0.10.1.orig/lib/lirc/receive.h 2020-04-21 21:12:20.576268751 -0300
+++ lirc-0.10.1/lib/lirc/receive.h      2020-04-21 21:58:20.975826444 -0300
@@ -32,7 +32,7 @@


 /** Min value returned by receive_timeout. */
-#define MIN_RECEIVE_TIMEOUT 100000
+#define MIN_RECEIVE_TIMEOUT 125000

Then:

lircd-0.10.1[61282]: Trace: writing to client 0: 0000000020dfd22d 00 KEY_DOWN CCE
lircd-0.10.1[61282]: Trace2: pending pulse: 0
lircd-0.10.1[61282]: Trace2: pending space: 0
lircd-0.10.1[61282]: Trace: trying "CCE" remote
lircd-0.10.1[61282]: Trace2: pending pulse: 0
lircd-0.10.1[61282]: Trace2: pending space: 0
lircd-0.10.1[61282]: Trace2: <s39859
lircd-0.10.1[61282]: Trace: sync
lircd-0.10.1[61282]: Trace2: expecting pulse: 9078
lircd-0.10.1[61282]: Trace2: +p9066
lircd-0.10.1[61282]: Trace2: pending space: 2169
lircd-0.10.1[61282]: Trace2: expecting pulse: 638
lircd-0.10.1[61282]: Trace2: +s2171
lircd-0.10.1[61282]: Trace2: pending space: 0
lircd-0.10.1[61282]: Trace2: +p652
lircd-0.10.1[61282]: Trace1: sum: 11889
lircd-0.10.1[61282]: Trace2: +s96086
lircd-0.10.1[61282]: Trace2: unget: 1
lircd-0.10.1[61282]: Trace: found: KEY_DOWN
lircd-0.10.1[61282]: Trace: 5638cbb548b0 5638cbb548b0 5638cbb548b0 1 1 0 0 1 1 1
lircd-0.10.1[61282]: Trace: release_gap: 223489
lircd-0.10.1[61282]: Trace: writing to client 0: 0000000020dfd22d 01 KEY_DOWN CCE

The mode2 output for this repeat code:

pulse 650   -> ptrail
space 39833 -> gap
pulse 9091  -> prepeat
space 2160  -> srepeat
pulse 654   -> ptrail
space 96057 -> gap
pulse 9087  -> prepeat
space 2162  -> srepeat
pulse 651   -> ptrail
space 96058 -> gap
pulse 9091  -> prepeat
space 2160  -> srepeat
pulse 654   -> ptrail
timeout 125000

The repeat code gap is 96057. That is lower than 100000. I don't know why I got timeout from lirc.
My controller config:

  name  CCE
  bits           32
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          250

  header       9078  4417
  one           641  1608
  zero          641   481
  ptrail        638
  repeat       9078  2169
  gap          107963
  toggle_bit_mask 0x0

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.