Strona 1 z 1

LIRC - skonfigurowany prawidłowo, ale nie działa

: 13 maja 2012, 16:55
autor: giaur
Niby wszystko powinno być w porządku, a nie jest. Na początek, informacje o moim systemie:

Kod: Zaznacz cały

Linux debian 3.3-6.slh.1-aptosid-amd64 #1 SMP PREEMPT Sun May 13 00:23:59 UTC 2012 x86_64 GNU/Linux
Wyciąg z dmesg:

Kod: Zaznacz cały

# dmesg | grep input
[    1.011959] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    1.130038] input: Power Button as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0c/PNP0C0C:00/input/input1
[    1.130481] input: Lid Switch as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0c/PNP0C0D:00/input/input2
[    1.156166] input: Sleep Button as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0c/PNP0C0E:00/input/input3
[    1.156668] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input4
[    2.319340] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:01/input/input5
[    9.636963] input: PC Speaker as /devices/platform/pcspkr/input/input6
[   11.046165] input: PS/2 Mouse as /devices/platform/i8042/serio1/input/input7
[   11.078639] input: AlpsPS/2 ALPS GlidePoint as /devices/platform/i8042/serio1/input/input8
[   11.909154] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb2/2-1/rc/rc0/input9
[   12.491408] input: HDA Intel Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[   12.491556] input: HDA Intel Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[   12.491653] input: HDA Intel Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[   26.766246] input: ACPI Virtual Keyboard Device as /devices/virtual/input/input13
Widzimy, że /dev/input/event9 to pilot w naszym tunerze. Aby się jeszcze upewnić, evtest i wciśnięcie kilku przycisków na pilocie:

Kod: Zaznacz cały

Testing ... (interrupt to exit)
Event: time 1336920144.696359, type 4 (EV_MSC), code 4 (MSC_SCAN), value 866b13
Event: time 1336920144.696362, -------------- SYN_REPORT ------------
Event: time 1336920147.446361, type 4 (EV_MSC), code 4 (MSC_SCAN), value 866b11
Event: time 1336920147.446364, -------------- SYN_REPORT ------------
Event: time 1336920148.446367, type 4 (EV_MSC), code 4 (MSC_SCAN), value 866b1c
Event: time 1336920148.446370, -------------- SYN_REPORT ------------
Event: time 1336920149.196486, type 4 (EV_MSC), code 4 (MSC_SCAN), value 866b12
Event: time 1336920149.196490, -------------- SYN_REPORT ------------
Czyli urządzenie /dev/input/event9 działa. Tworzymy więc plik konfiguracyjny dla naszego pilota:

Kod: Zaznacz cały

irrecord -H devinput --device=/dev/input/event9 test.conf
Po dość długiej i żmudnej procedurze, utworzony plik jest taki:

Kod: Zaznacz cały

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0-pre1(devinput) on Sun May 13 15:11:31 2012
#
# contributed by 
#
# brand:                       test.conf
# model no. of remote control: 
# devices being controlled by this remote:
#

begin remote

  name  test.conf
  bits           56
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   8
  pre_data       0x0
  gap          749986
  toggle_bit_mask 0x0

      begin codes
          KEY_MUTE                 0x04000400866B13 0x00000000000000
          KEY_EPG                  0x04000400866B11 0x00000000000000
          KEY_TV                   0x04000400866B1C 0x00000000000000
          KEY_POWER                0x04000400866B12 0x00000000000000
          KEY_1                    0x04000400866B01 0x00000000000000
          KEY_2                    0x04000400866B02 0x00000000000000
          KEY_3                    0x04000400866B03 0x00000000000000
          KEY_AUDIO                0x04000400866B0D 0x00000000000000
          KEY_4                    0x04000400866B04 0x00000000000000
          KEY_5                    0x04000400866B05 0x00000000000000
          KEY_6                    0x04000400866B06 0x00000000000000
          KEY_PRINT                0x04000400866B19 0x00000000000000
          KEY_7                    0x04000400866B07 0x00000000000000
          KEY_8                    0x04000400866B08 0x00000000000000
          KEY_9                    0x04000400866B09 0x00000000000000
          KEY_ZOOM                 0x04000400866B10 0x00000000000000
          KEY_BACK                 0x04000400866B0A 0x00000000000000
          KEY_0                    0x04000400866B00 0x00000000000000
          KEY_CHANNELUP            0x04000400866B0B 0x00000000000000
          KEY_VOLUMEUP             0x04000400866B0C 0x00000000000000
          KEY_TEXT                 0x04000400866B1B 0x00000000000000
          KEY_RECORD               0x04000400866B1D 0x00000000000000
          KEY_CHANNELDOWN          0x04000400866B15 0x00000000000000
          KEY_VOLUMEDOWN           0x04000400866B18 0x00000000000000
          KEY_STOP                 0x04000400866B0E 0x00000000000000
          KEY_PAUSE                0x04000400866B1E 0x00000000000000
          KEY_REWIND               0x04000400866B0F 0x00000000000000
          KEY_FORWARD              0x04000400866B1A 0x00000000000000
      end codes

end remote

Jak widać, wszystko wygląda poprawnie, kody nawet zgadzają się z tymi z evtest. Kopiuję więc zawartość wygenerowanego pliku test.conf do /etc/lirc/lircd.conf. Dodatkowo, uzupełniam odpowiednio plik /etc/lirc/hardware.conf:

Kod: Zaznacz cały

# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS=""

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Don't start irexec, even if a good config file seems to exist.
#START_IREXEC=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="dev/input"
# usually /dev/lirc0 is the correct setting for systems using udev 
DEVICE="/dev/input/event9"
MODULES=""

# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""
Uruchamiam demona lirc:

Kod: Zaznacz cały

l# /etc/init.d/lirc start
[ ok ] Loading LIRC modules:.
[ ok ] Starting remote control daemon(s) : LIRC :.
Wszystko wygląda poprawnie, więc uruchamiam irw, wciskam przyciski pilota i... nic, nie odczytuje żadnych kodów. Irw informuje w standardowym strumieniu wyjścia (ang. stdout), że otwiera urządzenie /dev/input/event9, urządzenie jest otwierane i zajęte (sprawdziłem), ale żadne kody nie są wyświetlane przy wciskaniu przycisków. Pilot jest wszędzie widoczny (np. w konfiguratorze pilotów kde), ale niestety nie działa.

Macie jakiś pomysł co tutaj może być nie tak?