Author Topic: [SOLVED] Can't get LIRC to work (LATEST:works even in kernel 2.6.38.4)  (Read 1839 times)

Offline coonhunter

  • Full Member
  • ***
  • Posts: 201
Re: Can't get LIRC to work
« Reply #15 on: May 02, 2011, 04:07:54 AM »
Well guys i downgraded the kernel to 2.6.31.12-pclos1,installed the lirc 0.8.7 package from the repos and now everything works.

It looks like i may have spoken too soon.I left my computer running overnight when everything was working fine and this morning lirc is no longer functional..the lirc daemon is still running,the device node is still there (/dev/lirc/0).Nothing in /var/log/messages.Go figure!
Well i have had enough.My computer is my TV and if i can't get the remote to work i'm booting back into pclos 2007.When i first installed pclos 2007 a few years ago remotes in Linux were considered a luxury.However in this day and age when most systems double as multimedia machines solid and consistent support for remotes must be a must.I have done alot of googling around and even though in principle the lirc architecture is fairly logical it is still very buggy.The only time i have ever got it to work first time round after installing the lirc package was in Mint8.At all other times it has been a real pain in the rear and today i just have to accept defeat and give up  >:(

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Can't get LIRC to work
« Reply #16 on: May 02, 2011, 04:30:26 AM »
Just to add here, that I set up Lirc yesterday ......  using a DVB-T dongle with built in IR .....  and it worked successfully.

On cold reboot this am the IR continued to work.

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12496
Re: Can't get LIRC to work
« Reply #17 on: May 02, 2011, 04:31:42 AM »
Just to add here, that I set up Lirc yesterday ......  using a DVB-T dongle with built in IR .....  and it worked successfully.

On cold reboot this am the IR continued to work.

What kernel are you using and are you using the lirc package from the repo?

Thanks to everyone who donates. You keep the servers running.

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Can't get LIRC to work
« Reply #18 on: May 02, 2011, 04:42:51 AM »
Just to add here, that I set up Lirc yesterday ......  using a DVB-T dongle with built in IR .....  and it worked successfully.

On cold reboot this am the IR continued to work.

What kernel are you using and are you using the lirc package from the repo?

2.6.38.4-pclos1.bfs

Yes all software is from the repo.

There are a couple of peculiarities because this is a USB device ......

1.  I had to build a keymap for it using irrecord .....  and checked the working using irw to see the key presses.

2.  The event# for the IR changed as it was plugged in at boot time, so the IR signals were not 'seen' by the device. When I unplugged the dongle, and reinserted it, it took the same event# as yesterday and worked as I had left it.

3. I set up the response to the IR within KDE CC ......  to launch Kaffeine on the last TV channel used, and to select each channel with a number key on the IR keypad, as well as a couple of others like vol up/down etc.

My only regret was there appeared to be no way I could send a channel up or down signal to Kaffeine ......  but I might figure that out at some later time.

regards.
« Last Edit: May 02, 2011, 04:58:20 AM by Just19 »

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Can't get LIRC to work
« Reply #19 on: May 02, 2011, 04:47:46 AM »
I'm using 2.3.38.2 and repo lirc 0.8.7

Status here is that I can use my remote reliably in MythTV, but not record a new remote-profile - I get different results for each irrecord session I try. I'm using an irrecord file I performed in an earlier kernel.

One darn button is not working (the exit button of all...) and I have to use a wireless keyboard to escape/exit in MythTV 0.25 (this version is sent to repo when it's stable). Beercans -are- thrown at me :-)

Issues with lirc can be due to recompilation with the current lirc-devel - I recall that MythTV 0.24 was compiled with an earlier version of lirc.

I'm not sure exactly what program the OP is using with Lirc (me tv, vlc or ...),

cheers,
MBantz


Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Can't get LIRC to work
« Reply #20 on: May 02, 2011, 05:02:49 AM »
I also have some oddities with various buttons ......  but in truth I believe my problems lie with the hardware I am using.
The USB dongle, including the tiny cheap 7 crappy 'remote' all cost about $20 delivered to my door ......  so I was not surprised that some oddities might arise with the remote.

From your post maybe I have been unkind to the remote and the problem lies elsewhere ......

Offline coonhunter

  • Full Member
  • ***
  • Posts: 201
Re: Can't get LIRC to work
« Reply #21 on: May 02, 2011, 07:09:59 AM »
I'm using 2.3.38.2 and repo lirc 0.8.7

Status here is that I can use my remote reliably in MythTV, but not record a new remote-profile - I get different results for each irrecord session I try. I'm using an irrecord file I performed in an earlier kernel.

One darn button is not working (the exit button of all...) and I have to use a wireless keyboard to escape/exit in MythTV 0.25 (this version is sent to repo when it's stable). Beercans -are- thrown at me :-)

Issues with lirc can be due to recompilation with the current lirc-devel - I recall that MythTV 0.24 was compiled with an earlier version of lirc.

I'm not sure exactly what program the OP is using with Lirc (me tv, vlc or ...),

cheers,
MBantz



I am using vlc.I gave up on kaffeine for kde4 as it doesn't have a brightness control! and MythTV is too clunky.

It appears that there is a problem with with the remote driver (lirc_mceusb) not getting its data across to the lirc daemon.But why would it suddenly stop working when nothing else about its settings has changed?.Where did this instability come from?..i have no idea but there are a couple of google postings where others have experienced a similar sudden out of the blue stoppage.When it was running normally the command "mode2" would not bind to the device node (ie:/dev/lirc/0) and would return the "socket is busy message".Running fuser would show that it would be used by lircd as one would expect.Now that lirc is no longer working mode2 binds to the device node immediately.This suggests that somehow the data pipeline between /dev/lirc/0 and lircd is bust.In user space, irw binds to lircd but its not getting any data from the key presses.

Offline coonhunter

  • Full Member
  • ***
  • Posts: 201
Finally i got lirc to work in 2.6.38.4.Just to recap kernel 2.6.33 is NOT compatible with lirc so i downgraded it to 2.6.31 which works just fine.The next challenge was to get it working in the latest 2.6.38.4.On my system i have a TV PCI card with an IR controller(which i don't use) showing up as /dev/lirc/0.My MCE usb receiver shows up as /dev/lirc/1.I have lirc 0.8.7 installed from the repos.The trouble i was having was that when i pointed lircd to /dev/lirc/1 nothing would show up on irw.I even replaced the lirc daemon (lircd) with the 0.9.0 version compiled from source and still no luck.I then changed the lircd.conf to lircd.conf.mceusb (from the compiled lirc 0.9.0 package) and again nothing showed up on irw.I ran the command ir-keytable and got the following output:

Found /sys/class/rc/rc0/ (/dev/input/event3) with:
        Driver cx88xx, table rc-hauppauge-new
        Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC
        Enabled protocols: NEC RC-5 RC-6 JVC SONY LIRC
Found /sys/class/rc/rc1/ (/dev/input/event4) with:
        Driver mceusb, table rc-rc6-mce
        Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC
        Enabled protocols: RC-6
        Repeat delay = 500 ms, repeat period = 33 ms
        Repeat delay = 500 ms, repeat period = 33 ms

This showed that my mceusb remote mapped to /sys/class/rc/rc1 and did NOT have the LIRC protocol enabled by default (instead it was RC-6).So to activate the LIRC decoding protocol for my remote i ran this command as root:

echo lirc > /sys/class/rc/rc1/protocols

Then i started lircd with "lircd -nd /dev/lirc/1" (n=non daemon mode) in one console and ran irw in the other and this time the keypresses were registered by irw.However when i rebooted,/sys/class/rc/rc1/protocols reverted to RC-6 decoding.To prevent this i added the line echo lirc >/sys/class/rc/rc1/protocols to /etc/rc.local and now i can run the remote even after rebooting.I didn't need to change my lircd.conf file from the 0.8.7 package.The only thing i had to ensure was that the device entry in /etc/sysconfig/lircd pointed to /dev/lirc/1 and not /dev/lirc/0 as was the case on the earlier kernels (this ofcourse will vary depending on one's individual setup).The ideal solution would be to have all the decoding protocols activated by default for every remote under /sys/class/rc. Perhaps there is a kernal patch for this?

Reference: https://bbs.archlinux.org/viewtopic.php?id=116515
« Last Edit: May 06, 2011, 02:54:36 PM by coonhunter »