lirc/infrared on MacBook (black)

Asked by Turbo Fredriksson

I'm running Ubuntu Feisty (latest/just upgraded) but I can't seem to be able to use my remote control.

If I (xmod)map the 'keys', they work, but that is not universal cross programs so I'd like to have lircd working. I've followed (amongs others) the HOWTO on http://www.mythtv.org/wiki/index.php/Lirc_on_Ubuntu_Dapper and have managed to figure out that I should use the 'dev/input' driver like this:

/usr/sbin/lircd --driver=dev/input --device=/dev/input/event0 --output=/dev/lirc

I'm not sure about the lircd.conf though. I've tried:

begin remote
  name Apple_Mac
  bits 16
# flags SPACE_ENC|CONST_LENGTH
  flags SPACE_ENC
  eps 30
  aeps 100

  header 9222 4479
  one 654 1647
  zero 654 522
  ptrail 638
  pre_data_bits 16
  pre_data 0x77E1
  gap 38140
  toggle_bit 0
  repeat 9065 2139

      begin codes
# First remote
# menu 0x000000000000C07F
# plus 0x000000000000507F
# minus 0x000000000000307F
# play 0x000000000000A07F
# rew 0x000000000000907F
# ffwd 0x000000000000607F
# Second remote, slightly different
          menu 0x000000000000403F
          plus 0x000000000000D03F
          minus 0x000000000000B03F
          play 0x000000000000203F
          rew 0x000000000000103F
          ffwd 0x000000000000E03F
      end codes
end remote

Trying both 'First remote' and 'Second remote'. Lircd starts up, but 'mode2' gives:

root@turbo-laptop2:~# mode2
mode2: error opening /dev/lirc
mode2: No such device or address

It IS however created by lircd. I've tried this on linux-image-2.6.20-14-generic (version 2.6.20-14.22). I'm currently upgrading and will try the 2.6.20-14.22 that came with the upgrade...
One thing is that Volume + and - works flawlessly in ALL programs! Even if I don't load the 'appleir' module... I'm also not sure if I should have that loaded when I use lircd.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Turbo Fredriksson
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Turbo Fredriksson (turbo-bayour) said :
#1

Nope, not working with 2.6.20-14.23...

Revision history for this message
Turbo Fredriksson (turbo-bayour) said :
#2

Found out that I had to install the dvb-utils package and test with 'evtest' which is the /dev/input/eventX device to use. It was the X=2 device and 'appleir' _must_ be loaded for this to be availible.

But lircd still don't seem to work correctly. The 'irrecord' program doesn't seem to get any data, and nothing happens when I use 'irw /dev/lirc' either.

Revision history for this message
Turbo Fredriksson (turbo-bayour) said :
#3

Playing with lircd.conf, I found http://linux.bytesex.org/v4l2/linux-input-layer-lircd.conf. Now it works!

root@turbo-laptop2:/etc/lirc# irw /dev/lirc
0000000000010073 00 VOLUMEUP linux-input-layer
0000000000010072 00 VOLUMEDOWN linux-input-layer
00000000000100a5 00 PREVIOUSSONG linux-input-layer
00000000000100a3 00 NEXTSONG linux-input-layer
00000000000100a4 00 PLAYPAUSE linux-input-layer
000000000001008b 00 MENU linux-input-layer

Revision history for this message
Turbo Fredriksson (turbo-bayour) said :
#4

I might have spooken to fast. Although 'irw' worked, 'mode2' and 'xmms' didn't manage to read from /dev/lirc...

Revision history for this message
Best Turbo Fredriksson (turbo-bayour) said :
#5

Apparently (according to upstream author), mode2 won't work for input-layer devices. So i managed to get XMMS working.

Revision history for this message
Turbo Fredriksson (turbo-bayour) said :
#6

It worked even better after I installed the 'inputlirc' package...