# lirc isn't working

## mrpringle

[EDITED]

Hi,

I cannot get lirc to work. I have a leadtek remote control which came with my tv capture card, it generates event under /dev/input/eventX, but I cannot get lirc, irw, or irrecord to recognise any of the events.

I compiled lirc with the devinput device, but there is no /dev/lirc0 or /dev/lirc/0 device, only a /dev/lircd device? I'm not sure whether this is supposed to happen.

Also I cannot find where the debugging events from lirc are logged. There doesn't seem to be anything stored under /var/log/ to help my try and diagnose the problem.

How can I get lirc set up with my remote? The remote partially works without lirc, but there are some buttons which have a scan code greater than 255, and hence cannot be mapped to a keycode, hence I need lirc to make full use of all the buttons.Last edited by mrpringle on Tue Jul 29, 2008 2:29 am; edited 4 times in total

----------

## kg4ojl

Also won't compile with the devinput module. I am going to try modify the ebuild and comment out the kernel 2.6.26 patch sense in this case were not running 2.6.26 kernel, and see if that makes a difference or not.

----------

## mrpringle

Some progress. I've managed to successfully build the serial module against my kernel (2.6.25-gentoo-r7).

I tried the 0.8.3 ebuild which works for some reason.

ebuild 

```
ebuild lirc-0.8.3.ebuild merge
```

The lirc_serial module is in my lib/modules path but I can't load it because it says the device or resource is busy. I'm guessing this explains why the remote was partially working without lirc, there is already an in-built kernel module which is using the port.

The problem is I have a whole bunch of modules compiled for the realtek DVT1000-T (cx88) video capture card, but I don't know which ones I need to remove to disable the in-build kernel support for this remote.

lsmod

```

cx22702                 8964  1 

cx88_dvb               15620  0 

cx88_vp3054_i2c         6272  1 cx88_dvb

videobuf_dvb            8324  1 cx88_dvb

dvb_core               66432  1 videobuf_dvb

cx8800                 29584  0 

snd_hda_intel         303252  1 

cx8802                 16644  1 cx88_dvb

snd_pcm                60420  2 snd_pcm_oss,snd_hda_intel

compat_ioctl32          5120  1 cx8800

v4l2_common            12672  1 cx8800

cx88xx                 58920  3 cx88_dvb,cx8800,cx8802

videodev               31104  2 cx8800,cx88xx

v4l1_compat            15620  1 videodev

ir_common              35844  1 cx88xx

i2c_algo_bit            8836  2 cx88_vp3054_i2c,cx88xx

tveeprom               16912  1 cx88xx

```

----------

## kg4ojl

taking the 2.6.26 patch out of the ebuild also worked.

----------

## mrpringle

 *kg4ojl wrote:*   

> taking the 2.6.26 patch out of the ebuild also worked.

 

kg4ojl, did you have any luck with the devinput module after removing the patch? I also tried modifying the lirc-0.8.3-r2.ebuild   to remove the epatch line, but after recompiling lirc still doesn't work on the /dev/input/event4 (ir remote) device. 

I used a configuration file for my remote from the lirc website, but irw reports no button events.

I can't even figure out where lirc stores its log file, or how to turn on any useful debugging information, starting lircd manually with the -L switch just tells me it's an unrecognised option. Kind of strange considering it's listed in the man page and should allow me to specify a location for the log file.

I also tried running irrecord on my event device. This is the kind of output  I get with lirc-0.8.2-r2. Interestingly with 0.8.3-r2 compiled I just get a full stop after every button press, but I end up getting the same message about no gap found.

```

Press RETURN to continue.

Hold down an arbitrary button.

irrecord: devinput_rec

irrecord: time 1217295863.356039  type 1  code 407  value 1

irrecord: code 80010197

irrecord: decoding failed for all remotes

irrecord: devinput_rec

irrecord: time 1217295863.356044  type 0  code 0  value 0

irrecord: code 00000000

irrecord: devinput_rec

irrecord: time 1217295863.358025  type 1  code 407  value 0

irrecord: code 00010197

irrecord: decoding failed for all remotes

irrecord: devinput_rec

irrecord: time 1217295863.358028  type 0  code 0  value 0

irrecord: code 00000000

1 x 1825 [1825,1825]

.irrecord: devinput_rec

irrecord: time 1217295869.855027  type 1  code 164  value 1

irrecord: code 800100a4

irrecord: decoding failed for all remotes

irrecord: devinput_rec

irrecord: time 1217295869.855031  type 0  code 0  value 0

irrecord: code 00000000

1 x 1825 [1825,1825]

1 x 6496902 [6496902,6496902]

irrecord: devinput_rec

irrecord: time 1217295869.857037  type 1  code 164  value 0

irrecord: code 000100a4

irrecord: decoding failed for all remotes

irrecord: devinput_rec

irrecord: time 1217295869.857040  type 0  code 0  value 0

irrecord: code 00000000

2 x 1863 [1825,1902]

1 x 6496902 [6496902,6496902]

.irrecord: devinput_rec

irrecord: time 1217295872.985027  type 1  code 128  value 1

irrecord: code 80010080

irrecord: decoding failed for all remotes

irrecord: devinput_rec

irrecord: time 1217295872.985032  type 0  code 0  value 0

irrecord: code 00000000

2 x 1863 [1825,1902]

1 x 6496902 [6496902,6496902]

1 x 3127880 [3127880,3127880]

irrecord: devinput_rec

irrecord: time 1217295872.986026  type 1  code 128  value 0

irrecord: code 00010080

irrecord: decoding failed for all remotes

irrecord: devinput_rec

irrecord: time 1217295872.986029  type 0  code 0  value 0

irrecord: code 00000000

2 x 1863 [1825,1902]

1 x 6496902 [6496902,6496902]

1 x 3127880 [3127880,3127880]

1 x 850 [850,850]

irrecord: devinput_rec

irrecord: time 1217295876.767027  type 1  code 28  value 1

irrecord: code 8001001c

irrecord: decoding failed for all remotes

irrecord: devinput_rec

irrecord: time 1217295876.767031  type 0  code 0  value 0

irrecord: code 00000000

2 x 1863 [1825,1902]

1 x 6496902 [6496902,6496902]

1 x 3127880 [3127880,3127880]

1 x 850 [850,850]

1 x 3780888 [3780888,3780888]

irrecord: devinput_rec

irrecord: time 1217295876.768026  type 1  code 28  value 0

irrecord: code 0001001c

irrecord: decoding failed for all remotes

irrecord: devinput_rec

irrecord: time 1217295876.768029  type 0  code 0  value 0

irrecord: code 00000000

2 x 1863 [1825,1902]

1 x 6496902 [6496902,6496902]

1 x 3127880 [3127880,3127880]

2 x 866 [850,882]

1 x 3780888 [3780888,3780888]

irrecord: devinput_rec

irrecord: time 1217295879.097027  type 1  code 28  value 1

irrecord: code 8001001c

irrecord: decoding failed for all remotes

irrecord: devinput_rec

irrecord: time 1217295879.097031  type 0  code 0  value 0

irrecord: code 00000000

2 x 1863 [1825,1902]

1 x 6496902 [6496902,6496902]

1 x 3127880 [3127880,3127880]

2 x 866 [850,882]

1 x 3780888 [3780888,3780888]

1 x 2328896 [2328896,2328896]

irrecord: devinput_rec

irrecord: time 1217295879.098027  type 1  code 28  value 0

irrecord: code 0001001c

irrecord: decoding failed for all remotes

irrecord: devinput_rec

irrecord: time 1217295879.098029  type 0  code 0  value 0

irrecord: code 00000000

2 x 1863 [1825,1902]

1 x 6496902 [6496902,6496902]

1 x 3127880 [3127880,3127880]

3 x 863 [850,882]

1 x 3780888 [3780888,3780888]

1 x 2328896 [2328896,2328896]

.irrecord: gap not found, can't continue

irrecord: closing '/dev/input/event4'

```

Always ends with gap not found. Even if I hold the same button for the entire time.

kg4ojl, would you be able to show me your conf.d/lircd file so I can compare it with mine. What kernel are you using? vanilla or gentoo-sources?

Any help would be awesome

lirc is one f****d piece of software

Cheers

----------

## mrpringle

holy crap it works. I just used the lirc.conf file from here, which states it's for use with the linux input layer http://linux.bytesex.org/v4l2/faq.html#lircd . Previously I was using the config file someone generated for my remote.

All the keys are correctly mapped, I'm interested how it maps the keys properly given it's a generic devinput config file? How does it know what the buttons on my remote are?

Anyway, I suppose the next step is getting the button mapping into mythtv.

----------

