# PCTV DVB-S2 Stick + Lirc probleme [solved]

## sm0ker

Hi,

Geraet: http://www.pctvsystems.com/Products/ProductsEuropeAsia/Satelliteproducts/PCTVDVBS2Stick/tabid/236/language/de-DE/Default.aspx

Fernbedienung: http://s1.directupload.net/file/d/2769/7ba7ndef_png.htm

Ich bastle nun schon seit einigen Tagen wegen dieser Fernbedienung. Ich habe Fernsehempfang und soweit klappt auch alles, ausser das mit der Fernbedienung. Wenn ich in Xorg bin, kann ich 'out of the box' laut und leise machen, bzw den Rechner herunterfahren. Wenn ich Gnome Mplayer nutze, kann ich Pause druecken und auf den Ziffertasten diverse Farb/Kontrast einstellungen aendern. Soweit scheint die Fernbedienung also zu funktionieren. Ich moechte aber gerne alle Funktionen der FB nutzen und zwar so wie sie draufstehen  :Wink: 

Ich habe schon eine lircd.conf erstellt mit irrecord:

```

sm0ker@spacken ~ $ cat /etc/lirc/lircd.conf 

# 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(devinput) on Sun Dec  9 17:48:43 2012

#

# contributed by 

#

# brand:                       /tmp/ir.txt

# model no. of remote control: 

# devices being controlled by this remote:

#

begin remote

  name  /tmp/ir.txt

  bits           56

  eps            30

  aeps          100

  one             0     0

  zero            0     0

  pre_data_bits   8

  pre_data       0x0

  gap          249892

  toggle_bit_mask 0x0

      begin codes

          KEY_CHANNELUP            0x04000400000706 0x01019200000001

          KEY_CHANNELDOWN          0x0400040000070C 0x01019300000001

          KEY_VOLUMEUP             0x04000400000703 0x01007300000001

          KEY_VOLUMEDOWN           0x04000400000709 0x01007200000001

          KEY_1                    0x0400040000070F 0x01000200000001

          KEY_2                    0x04000400000715 0x01000300000001

          KEY_3                    0x04000400000710 0x01000400000001

          KEY_4                    0x04000400000718 0x01000500000001

          KEY_5                    0x0400040000071B 0x01000600000001

          KEY_6                    0x0400040000071E 0x01000700000001

          KEY_7                    0x04000400000711 0x01000800000001

          KEY_8                    0x04000400000721 0x01000900000001

          KEY_9                    0x04000400000712 0x01000A00000001

          KEY_0                    0x04000400000727 0x01000B00000001

          KEY_OK                   0x04000400000705 0x01016000000001

          KEY_MUTE                 0x04000400000700 0x01007100000001

          KEY_PLAYPAUSE            0x04000400000730 0x0100A400000001

          KEY_FASTFORWARD          0x04000400000733 0x0100D000000001

          KEY_REWIND               0x0400040000072D 0x0100A800000001

          KEY_STOP                 0x0400040000073C 0x01008000000001

      end codes

end remote

```

'lircd' ist auch gestartet und mit 'irw' kann ich die von mir eingestellten Einstellungen nutzen/angezeigt bekommen:

```

sm0ker@spacken ~ $ irw

000400040000071b 00 KEY_5 /tmp/ir.txt

000400040000071b 01 KEY_5 /tmp/ir.txt

0004000400000727 00 KEY_0 /tmp/ir.txt

0004000400000730 00 KEY_PLAYPAUSE /tmp/ir.txt

0004000400000706 00 KEY_CHANNELUP /tmp/ir.txt

0004000400000703 00 KEY_VOLUMEUP /tmp/ir.txt

0004000400000709 00 KEY_VOLUMEDOWN /tmp/ir.txt

0004000400000715 00 KEY_2 /tmp/ir.txt

0004000400000721 00 KEY_8 /tmp/ir.txt

0004000400000733 00 KEY_FASTFORWARD /tmp/ir.txt

000400040000072d 00 KEY_REWIND /tmp/ir.txt

0004000400000730 00 KEY_PLAYPAUSE /tmp/ir.txt

0004000400000727 00 KEY_0 /tmp/ir.txt

0004000400000721 00 KEY_8 /tmp/ir.txt

...

```

Wenn ich 'cat /proc/bus/input/devices' ausfuehre, bekomme ich folgendes:

```

sm0ker@spacken ~ $ cat /proc/bus/input/devices

...

I: Bus=0003 Vendor=2013 Product=024c Version=0001

N: Name="em28xx IR (em28xx #0)"

P: Phys=usb-0000:00:02.1-9.3.1/input0

S: Sysfs=/devices/pci0000:00/0000:00:02.1/usb1/1-9/1-9.3/1-9.3.1/rc/rc0/input16

U: Uniq=

H: Handlers=kbd event16 

B: PROP=0

B: EV=100013

B: KEY=c0000 14000100000000 0 10000 19000000c01 1e000000000000 ffc

B: MSC=10

```

also habe ich /etc/conf.d/lircd auch noch angepasst:

```

sm0ker@spacken ~ $ cat /etc/conf.d/lircd 

# Options to pass to the lircd process

# for devices with lirc-kernel-module

#LIRCD_OPTS="-d /dev/lirc0"

#LIRCD_OPTS="-d /dev/lirc"

# for devices using the input-layer

LIRCD_OPTS="-H dev/input -d /dev/input/event16"

# This should work, Bug #235107

#LIRCD_OPTS="-H devinput -d name=*DVB*"

# set default protocol to 'lirc' for in-kernel IR decoding

# for the following entries in /sys/class/rc/

# (space-separated list if there is more than one)

LIRCD_SET_SYSCLASSRCS="rc0"

# If running mulitple instances of lircd, the following

# can be used to override the default socket path and

# socket symlink

#LIRCD_SOCKET="/var/run/lirc/lircd"

#LIRCD_SYMLINKFILE="/dev/lircd"

sm0ker@spacken ~ $ 

```

Mir kommt es irgendwie so vor, als ob die Kiste die lircd.conf gar nicht benutzt. Dann hatte ich folgendes in /var/log/Xorg.0.log entdeckt

```

sm0ker@spacken ~ $ cat /var/log/Xorg.0.log

...

[   124.227] (II) Using input driver 'evdev' for 'em28xx IR (em28xx #0)'

[   124.227] (**) em28xx IR (em28xx #0): always reports core events

[   124.227] (**) evdev: em28xx IR (em28xx #0): Device: "/dev/input/event16"

[   124.227] (--) evdev: em28xx IR (em28xx #0): Vendor 0x2013 Product 0x24c

[   124.227] (--) evdev: em28xx IR (em28xx #0): Found keys

[   124.227] (II) evdev: em28xx IR (em28xx #0): Configuring as keyboard

[   124.227] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:02.1/usb1/1-9/1-9.3/1-9.3.1/rc/rc0/input16/event16"

[   124.227] (II) XINPUT: Adding extended input device "em28xx IR (em28xx #0)" (type: KEYBOARD, id 12)

[   124.227] (**) Option "xkb_rules" "evdev"

[   124.227] (**) Option "xkb_model" "evdev"

[   124.227] (**) Option "xkb_layout" "us"

```

und dachte zuerst, der erkennt die FB als Tastatur und macht deswegen solche Probleme, aber wenn ich das via xinput ausschalte geht gar nix mehr:

```

spacken sm0ker # xinput list-props 12

Device 'em28xx IR (em28xx #0)':

   Device Enabled (137):   1

   Coordinate Transformation Matrix (139):   1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000

   Device Product ID (254):   8211, 588

   Device Node (255):   "/dev/input/event16"

spacken sm0ker # xinput set-prop 12 137 0

sm0ker@spacken ~ $ xinput list-props 12

Device 'em28xx IR (em28xx #0)':

   Device Enabled (137):   0

   Coordinate Transformation Matrix (139):   1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000

   Device Product ID (254):   8211, 588

   Device Node (255):   "/dev/input/event16"

```

Was mache ich falsch? Wo koennte der Fehler liegen? Ich bin fuer jeden Hinweis dankbar.Last edited by sm0ker on Wed Dec 12, 2012 1:13 am; edited 1 time in total

----------

## musv

lirc als Treiber ist deprecated. Im Kernel gibt es die Treiber für InputLirc. Scheinbar hast du das bei Dir auch aktiviert, denn InputLirc stellt Dir das Gerät über /dev/input/eventX zur Verfügung. Dir Lirc.conf usw. brauchst du dann nicht mehr.

Ich hatte vor einem Jahr ein ähnliches Problem:

https://forums.gentoo.org/viewtopic-t-903326-start-0.html

Setz mal: 

```
LIRC_DEVICES="devinput"
```

----------

## sm0ker

Danke erstmal fuer deine Antwort. Ich werd damit nun mal "rumspielen" und mich dann nochmal melden..

----------

## sm0ker

So, habe das nunmal so probiert wie du gesagt hast, aber die Situation hat sich nicht geaendert. Eher das Gegenteil, mir ist gerad was seltsames aufgefallen. Selbst wenn ich lircd bzw. inputlircd stoppe, reagiert der Gnome auf die Laut/Leise bzw. Mute/Poweroff Taste. Das bedeutet doch, dass da irgendwie schon was geladen wird, was Gnome dann auch benutzt, oder denke ich da falsch? Also koennte meine Vermutung, dass er das als Tastatur erkannt hat ja doch stimmen? Wenn jemand noch Infos brauch oder ich irgendwas ergaenzen soll/kann, lasst es mich bitte wissen.

Danke!

----------

## bell

Wie musv bereits geschrieben hat, erzeugen die neuen Lirc-Treiber ein Event-Device, wie Tastatur oder Maus auch. Dabei gibt es mehr oder weniger standardisierte Keys. Bestimmte Keys kann der X-Server also bereits nutzen, wenn er die kennt. Du kannst mit app-misc/evtest auf dem /dev/input/eventX prüfen was Deine Fernbedienung so alles von sich gibt.

Um das ganze wie früher über lircd nutzen zu können, musst Du den Lircd für die "devinput" Verwendung konfigurieren.

----------

## sm0ker

Ok, soweit habe ich das verstanden mit  *Quote:*   

> erzeugen die neuen Lirc-Treiber ein Event-Device

  In /etc/conf.d/lircd steht folgendes drinne:

```

spacken sm0ker # cat /etc/conf.d/lircd 

# Options to pass to the lircd process

# for devices with lirc-kernel-module

#LIRCD_OPTS="-d /dev/lirc0"

#LIRCD_OPTS="-d /dev/lirc"

# for devices using the input-layer

LIRCD_OPTS="-H devinput -d /dev/input/event16"

#LIRCD_OPTS=""

# This should work, Bug #235107

#LIRCD_OPTS="-H devinput -d name=*DVB*"

# set default protocol to 'lirc' for in-kernel IR decoding

# for the following entries in /sys/class/rc/

# (space-separated list if there is more than one)

LIRCD_SET_SYSCLASSRCS="rc0"

# If running mulitple instances of lircd, the following

# can be used to override the default socket path and

# socket symlink

#LIRCD_SOCKET="/var/run/lirc/lircd"

#LIRCD_SYMLINKFILE="/dev/lircd"

```

irw output:

```

spacken sm0ker # irw

0000000080010192 00 KEY_CHANNELUP devinput

0000000080010192 00 KEY_CHANNELUP devinput

0000000080010160 00 KEY_OK devinput

0000000080010003 00 KEY_2 devinput

0000000080010003 00 KEY_2 devinput

0000000080010006 00 KEY_5 devinput

0000000080010005 00 KEY_4 devinput

00000000800100a4 00 KEY_PLAYPAUSE devinput

00000000800100d0 00 KEY_FASTFORWARD devinput

0000000080010009 00 KEY_8 devinput

0000000080010006 00 KEY_5 devinput

0000000080010003 00 KEY_2 devinput

^C

spacken sm0ker # 

```

Wenn ich /etc/init.d/lircd starte verhaelt es sich nicht anders als wenn es gestoppt ist, soll heissen ich kann laut/leise machen usw. Habe dann nach dem tip von musv inputlirc probiert:

```

spacken sm0ker # cat /etc/conf.d/inputlircd 

# Options to pass to the lircd process

INPUTLIRCD_OPTS="-m 0 /dev/input/event16"

spacken sm0ker # 

```

Lircd gestoppt und 

```
ln -s /dev/lircd /var/run/lirc/lircd
```

 und danach dann 

```
/etc/init.d/inputlircd start
```

```

spacken sm0ker # irw

193 0 KEY_CHANNELDOWN event16

193 0 KEY_CHANNELDOWN event16

6 0 KEY_5 event16

5b 0 KEY_0 event16

0b 0 KEY_0 event16

0174 0 KEY_ZOOM event16

172 0 KEY_SUBTITLE event16

9 0 KEY_8 event16

86 0 KEY_5 event16

53 0 KEY_2 event16

2193 0 KEY_CHANNELDOWN event16

72 0 KEY_VOLUMEDOWN event16

3 0 KEY_2 event16

273 0 KEY_VOLUMEUP event16

73 0 KEY_VOLUMEUP event16

^C

spacken sm0ker # 

```

Aber das bringt mich genau an den gleichen Punkt wie mit lircd bzw ohne lircd und inputlircd.

Dann habe ich nun mal app-misc/evtest ( @bell, danke fuer den tip ) installiert.

```

spacken sm0ker # evtest

No device specified, trying to scan all of /dev/input/event*

Available devices:

/dev/input/event0:   Power Button

/dev/input/event1:   Power Button

/dev/input/event10:   HDA NVidia Line Out Surround

/dev/input/event11:   HDA NVidia Line Out Front

/dev/input/event12:   Logitech Logitech Illuminated Keyboard

/dev/input/event13:   Logitech Logitech Illuminated Keyboard

/dev/input/event14:   Logitech G500

/dev/input/event15:   Logitech G500

/dev/input/event16:   em28xx IR (em28xx #0)

/dev/input/event2:   PC Speaker

/dev/input/event3:   HDA Digital PCBeep

/dev/input/event4:   HDA NVidia Line

/dev/input/event5:   HDA NVidia Front Mic

/dev/input/event6:   HDA NVidia Rear Mic

/dev/input/event7:   HDA NVidia Front Headphone

/dev/input/event8:   HDA NVidia Line Out Side

/dev/input/event9:   HDA NVidia Line Out CLFE

Select the device event number [0-16]: 16

Input driver version is 1.0.1

Input device ID: bus 0x3 vendor 0x2013 product 0x24c version 0x1

Input device name: "em28xx IR (em28xx #0)"

Supported events:

  Event type 0 (EV_SYN)

  Event type 1 (EV_KEY)

    Event code 2 (KEY_1)

    Event code 3 (KEY_2)

    Event code 4 (KEY_3)

    Event code 5 (KEY_4)

    Event code 6 (KEY_5)

    Event code 7 (KEY_6)

    Event code 8 (KEY_7)

    Event code 9 (KEY_8)

    Event code 10 (KEY_9)

    Event code 11 (KEY_0)

    Event code 113 (KEY_MUTE)

    Event code 114 (KEY_VOLUMEDOWN)

    Event code 115 (KEY_VOLUMEUP)

    Event code 116 (KEY_POWER)

    Event code 128 (KEY_STOP)

    Event code 138 (KEY_HELP)

    Event code 139 (KEY_MENU)

    Event code 164 (KEY_PLAYPAUSE)

    Event code 167 (KEY_RECORD)

    Event code 168 (KEY_REWIND)

    Event code 208 (KEY_FASTFORWARD)

    Event code 352 (KEY_OK)

    Event code 370 (KEY_SUBTITLE)

    Event code 372 (KEY_ZOOM)

    Event code 402 (KEY_CHANNELUP)

    Event code 403 (KEY_CHANNELDOWN)

  Event type 4 (EV_MSC)

    Event code 4 (MSC_SCAN)

  Event type 20 (EV_REP)

Testing ... (interrupt to exit)

Event: time 1355243065.707608, type 4 (EV_MSC), code 4 (MSC_SCAN), value 706

Event: time 1355243065.707612, type 1 (EV_KEY), code 402 (KEY_CHANNELUP), value 1

Event: time 1355243065.707614, -------------- SYN_REPORT ------------

Event: time 1355243065.957505, type 1 (EV_KEY), code 402 (KEY_CHANNELUP), value 0

Event: time 1355243065.957507, -------------- SYN_REPORT ------------

Event: time 1355243066.007606, type 4 (EV_MSC), code 4 (MSC_SCAN), value 706

Event: time 1355243066.007609, type 1 (EV_KEY), code 402 (KEY_CHANNELUP), value 1

Event: time 1355243066.007611, -------------- SYN_REPORT ------------

Event: time 1355243066.257505, type 1 (EV_KEY), code 402 (KEY_CHANNELUP), value 0

Event: time 1355243066.257506, -------------- SYN_REPORT ------------

Event: time 1355243067.707606, type 4 (EV_MSC), code 4 (MSC_SCAN), value 705

Event: time 1355243067.707609, type 1 (EV_KEY), code 352 (KEY_OK), value 1

Event: time 1355243067.707610, -------------- SYN_REPORT ------------

Event: time 1355243067.907605, type 4 (EV_MSC), code 4 (MSC_SCAN), value 705

Event: time 1355243067.907607, -------------- SYN_REPORT ------------

Event: time 1355243068.157505, type 1 (EV_KEY), code 352 (KEY_OK), value 0

Event: time 1355243068.157507, -------------- SYN_REPORT ------------

Event: time 1355243069.507608, type 4 (EV_MSC), code 4 (MSC_SCAN), value 705

Event: time 1355243069.507611, type 1 (EV_KEY), code 352 (KEY_OK), value 1

Event: time 1355243069.507612, -------------- SYN_REPORT ------------

Event: time 1355243069.757505, type 1 (EV_KEY), code 352 (KEY_OK), value 0

Event: time 1355243069.757507, -------------- SYN_REPORT ------------

Event: time 1355243069.807606, type 4 (EV_MSC), code 4 (MSC_SCAN), value 705

Event: time 1355243069.807610, type 1 (EV_KEY), code 352 (KEY_OK), value 1

Event: time 1355243069.807611, -------------- SYN_REPORT ------------

Event: time 1355243070.007604, type 1 (EV_KEY), code 352 (KEY_OK), value 0

Event: time 1355243070.007608, type 4 (EV_MSC), code 4 (MSC_SCAN), value 703

Event: time 1355243070.007610, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1

Event: time 1355243070.007611, -------------- SYN_REPORT ------------

Event: time 1355243070.257508, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0

Event: time 1355243070.257509, -------------- SYN_REPORT ------------

Event: time 1355243070.307608, type 4 (EV_MSC), code 4 (MSC_SCAN), value 703

Event: time 1355243070.307612, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1

Event: time 1355243070.307613, -------------- SYN_REPORT ------------

Event: time 1355243070.557506, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0

Event: time 1355243070.557508, -------------- SYN_REPORT ------------

Event: time 1355243074.507611, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70c

Event: time 1355243074.507615, type 1 (EV_KEY), code 403 (KEY_CHANNELDOWN), value 1

Event: time 1355243074.507617, -------------- SYN_REPORT ------------

Event: time 1355243074.757513, type 1 (EV_KEY), code 403 (KEY_CHANNELDOWN), value 0

Event: time 1355243074.757515, -------------- SYN_REPORT ------------

Event: time 1355243074.807608, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70c

Event: time 1355243074.807612, type 1 (EV_KEY), code 403 (KEY_CHANNELDOWN), value 1

Event: time 1355243074.807613, -------------- SYN_REPORT ------------

Event: time 1355243074.907610, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70c

Event: time 1355243074.907612, -------------- SYN_REPORT ------------

Event: time 1355243075.007607, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70c

Event: time 1355243075.007609, -------------- SYN_REPORT ------------

Event: time 1355243075.107608, type 1 (EV_KEY), code 403 (KEY_CHANNELDOWN), value 0

Event: time 1355243075.107611, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70c

Event: time 1355243075.107613, type 1 (EV_KEY), code 403 (KEY_CHANNELDOWN), value 1

Event: time 1355243075.107614, -------------- SYN_REPORT ------------

Event: time 1355243075.357507, type 1 (EV_KEY), code 403 (KEY_CHANNELDOWN), value 0

Event: time 1355243075.357509, -------------- SYN_REPORT ------------

Event: time 1355243075.407607, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70c

Event: time 1355243075.407611, type 1 (EV_KEY), code 403 (KEY_CHANNELDOWN), value 1

Event: time 1355243075.407612, -------------- SYN_REPORT ------------

Event: time 1355243075.657490, type 1 (EV_KEY), code 403 (KEY_CHANNELDOWN), value 0

Event: time 1355243075.657492, -------------- SYN_REPORT ------------

Event: time 1355243075.708490, type 4 (EV_MSC), code 4 (MSC_SCAN), value 715

Event: time 1355243075.708494, type 1 (EV_KEY), code 3 (KEY_2), value 1

Event: time 1355243075.708495, -------------- SYN_REPORT ------------

2Event: time 1355243075.958488, type 1 (EV_KEY), code 3 (KEY_2), value 0

Event: time 1355243075.958489, -------------- SYN_REPORT ------------

Event: time 1355243076.008610, type 4 (EV_MSC), code 4 (MSC_SCAN), value 715

Event: time 1355243076.008613, type 1 (EV_KEY), code 3 (KEY_2), value 1

Event: time 1355243076.008614, -------------- SYN_REPORT ------------

2Event: time 1355243076.258489, type 1 (EV_KEY), code 3 (KEY_2), value 0

Event: time 1355243076.258490, -------------- SYN_REPORT ------------

Event: time 1355243077.608609, type 4 (EV_MSC), code 4 (MSC_SCAN), value 71b

Event: time 1355243077.608613, type 1 (EV_KEY), code 6 (KEY_5), value 1

Event: time 1355243077.608614, -------------- SYN_REPORT ------------

5Event: time 1355243077.808606, type 4 (EV_MSC), code 4 (MSC_SCAN), value 71b

Event: time 1355243077.808608, -------------- SYN_REPORT ------------

Event: time 1355243078.058489, type 1 (EV_KEY), code 6 (KEY_5), value 0

Event: time 1355243078.058491, -------------- SYN_REPORT ------------

Event: time 1355243079.208612, type 4 (EV_MSC), code 4 (MSC_SCAN), value 71e

Event: time 1355243079.208616, type 1 (EV_KEY), code 7 (KEY_6), value 1

Event: time 1355243079.208617, -------------- SYN_REPORT ------------

6Event: time 1355243079.408605, type 4 (EV_MSC), code 4 (MSC_SCAN), value 71e

Event: time 1355243079.408607, -------------- SYN_REPORT ------------

Event: time 1355243079.658490, type 1 (EV_KEY), code 7 (KEY_6), value 0

Event: time 1355243079.658491, -------------- SYN_REPORT ------------

Event: time 1355243080.508608, type 4 (EV_MSC), code 4 (MSC_SCAN), value 712

Event: time 1355243080.508610, type 1 (EV_KEY), code 10 (KEY_9), value 1

Event: time 1355243080.508612, -------------- SYN_REPORT ------------

9Event: time 1355243080.708605, type 4 (EV_MSC), code 4 (MSC_SCAN), value 712

Event: time 1355243080.708607, -------------- SYN_REPORT ------------

Event: time 1355243080.958489, type 1 (EV_KEY), code 10 (KEY_9), value 0

Event: time 1355243080.958490, -------------- SYN_REPORT ------------

Event: time 1355243081.308607, type 4 (EV_MSC), code 4 (MSC_SCAN), value 727

Event: time 1355243081.308610, type 1 (EV_KEY), code 11 (KEY_0), value 1

Event: time 1355243081.308612, -------------- SYN_REPORT ------------

0Event: time 1355243081.408607, type 4 (EV_MSC), code 4 (MSC_SCAN), value 727

Event: time 1355243081.408609, -------------- SYN_REPORT ------------

Event: time 1355243081.508609, type 4 (EV_MSC), code 4 (MSC_SCAN), value 727

Event: time 1355243081.508611, -------------- SYN_REPORT ------------

Event: time 1355243081.608607, type 4 (EV_MSC), code 4 (MSC_SCAN), value 727

Event: time 1355243081.608609, -------------- SYN_REPORT ------------

0Event: time 1355243081.809490, type 1 (EV_KEY), code 11 (KEY_0), value 2

Event: time 1355243081.809492, -------------- SYN_REPORT ------------

0Event: time 1355243081.858493, type 1 (EV_KEY), code 11 (KEY_0), value 0

Event: time 1355243081.858495, -------------- SYN_REPORT ------------

Event: time 1355243082.208609, type 4 (EV_MSC), code 4 (MSC_SCAN), value 724

Event: time 1355243082.208612, type 1 (EV_KEY), code 372 (KEY_ZOOM), value 1

Event: time 1355243082.208613, -------------- SYN_REPORT ------------

Event: time 1355243082.308607, type 4 (EV_MSC), code 4 (MSC_SCAN), value 724

Event: time 1355243082.308609, -------------- SYN_REPORT ------------

Event: time 1355243082.558488, type 1 (EV_KEY), code 372 (KEY_ZOOM), value 0

Event: time 1355243082.558489, -------------- SYN_REPORT ------------

Event: time 1355243083.308610, type 4 (EV_MSC), code 4 (MSC_SCAN), value 730

Event: time 1355243083.308613, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 1

Event: time 1355243083.308615, -------------- SYN_REPORT ------------

Event: time 1355243083.508610, type 4 (EV_MSC), code 4 (MSC_SCAN), value 730

Event: time 1355243083.508613, -------------- SYN_REPORT ------------

Event: time 1355243083.758487, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 0

Event: time 1355243083.758488, -------------- SYN_REPORT ------------

Event: time 1355243084.208611, type 4 (EV_MSC), code 4 (MSC_SCAN), value 73c

Event: time 1355243084.208614, type 1 (EV_KEY), code 128 (KEY_STOP), value 1

Event: time 1355243084.208615, -------------- SYN_REPORT ------------

Event: time 1355243084.308614, type 4 (EV_MSC), code 4 (MSC_SCAN), value 73c

Event: time 1355243084.308617, -------------- SYN_REPORT ------------

Event: time 1355243084.408608, type 4 (EV_MSC), code 4 (MSC_SCAN), value 73c

Event: time 1355243084.408610, -------------- SYN_REPORT ------------

Event: time 1355243084.508609, type 4 (EV_MSC), code 4 (MSC_SCAN), value 73c

Event: time 1355243084.508611, -------------- SYN_REPORT ------------

Event: time 1355243084.709510, type 1 (EV_KEY), code 128 (KEY_STOP), value 2

Event: time 1355243084.709512, -------------- SYN_REPORT ------------

Event: time 1355243084.758489, type 1 (EV_KEY), code 128 (KEY_STOP), value 0

Event: time 1355243084.758490, -------------- SYN_REPORT ------------

...

```

was fuer mich soviel heisst, dass die FB erkannt wird, egal ob nun mit lircd, inputlircd oder gar ohne lirc. Wie kann ich nun die keys 'mappen', sodass ich die FB benutzen kann..? Geht das irgendwie? Oder frage ich mal anders, ich versuche das zu testen, indem ich mit Gnome Mplayer einen Film starte und vor- oder zurueckspulen will, oder stoppen. Das einzige worauf Mplayer reagiert ist: laut/leise, pause und auf den Ziffertasten irgendwelche Kontrast/helligkeits Geschichten. Kaffein reagiert garnicht auf die FB und Me-tv auch nicht. VLC bzw. Gxine reagieren auch nicht auf die FB. Muss ich fuer Gnome Mplayer noch irgendwelche anderen configs anlegen/anpassen damit der sich per FB bedienen laesst?

In XBMC reagiert die FB schonmal auf ein paar mehr tasten, aber ziemlich wirr..  :Very Happy: 

----------

## musv

 *sm0ker wrote:*   

> was fuer mich soviel heisst, dass die FB erkannt wird, egal ob nun mit lircd, inputlircd oder gar ohne lirc.

 

Lirc brauchst du nur noch für irw. Als Service verwendest du inputlirc

 *sm0ker wrote:*   

> Wie kann ich nun die keys 'mappen', sodass ich die FB benutzen kann..?

 

Wie bell schon gesagt hat, sind diverse Keys standardisiert. Z.B. XF86AudioRaiseVolume, XF86AudioLowerVolume und XF86AudioMute funktionieren meist schon out of the box. Die werden auch bei Deiner Fernbedienung zum Einsatz kommen. 

Die Keycodes, die Dir die Fernbedienung über /dev/input/eventX liefert, entsprechen eigentlich normalen Tastatur-Codes, die aus der lircd.conf ausgelesen werden. Dazu kopierst du Dir die default-config rüber:

```
cp /usr/share/lirc/remotes/devinput/lircd.conf.devinput /etc/lirc/lircd.conf
```

Da ich mit der Fernbedienung nur XBMC steuer, war die Sache bei mir etwas anders. XBMC bietet direkt eine Configdatei, in der man die Keys, die du per irw bekommst, direkt auf XBMC-Funktionen mappen kann.

----------

## sm0ker

Ich danke euch beiden soweit erstmal!! Das mit den services hatte ich schon verstanden, dennoch danke nochmal fuer die Erklaerung. Also kann ich davon ausgehen die FB tut wie sie sollte ( siehe irw output ) nur muss ich das nun noch den Programmen beibringen die mit der FB zusammen arbeiten sollen?

----------

## sm0ker

?Hab nun eine .lircrc im $HOME des Users und es scheint zu funktionieren. Zumidest nen Stueck weit..  :Wink: 

```

sm0ker@spacken ~ $ cat .lircrc 

### mplayer lirc setup

# Pause playback

begin

prog = mplayer

button = KEY_PLAYPAUSE

repeat = 5

config = pause

end

# Rewind

begin

prog = mplayer

button = KEY_REWIND

repeat = 3

config = seek -10

end

# Forward

begin

prog = mplayer

button = KEY_FASTFORWARD

repeat = 3

config = seek +10

end

...

```

----------

## musv

Jetzt wo du die lircrc erwähnst, fällt mir wieder ein, dass ich ganz früher mal mit einer Win-TV-Fernbedienung diverse Programme ferngesteuert hab. Die Config-Datei (etc/lircrc oder /etc/lirc/lircrc):

```
# auf TV        tvtime an/aus

# auf Radio     xmms an/aus

# Src   1       tvtime 

#       2       xmms

#       3       mplayer

#       4       xawtv

#       5       Alevt

begin

        prog    = irexec

        button  = TV

        config  = tvtime &

        mode    = tvtime

        repeat  = 0

end

begin

        prog    = irexec

        button  = RADIO

        config  = xmms &

        mode    = xmms

        repeat  = 0

end

begin 

        button  = SOURCE

        mode    = conf

end 

####################################### Ende global #########################

####################################### SOURCE Section ######################

begin conf

begin 

        prog    = irexec

        button  = 1

        config  = tvtime-command QUIT

        mode    = tvtime

        repeat  = 0

end

begin

        button  = 2

        prog    = xmms

        config  = QUIT

        mode    = xmms

        repeat  = 0

end

begin

        button  = 3

        mode    = mplayer

end

begin   

        button  = 4

        prog    = irexec

        mode    = xawtv 

        config  = xawtv -device /dev/video0

        config  = killall xawtv

        repeat  = 1

end

begin

        button = 5

        prog    = irexec

        mode    = alevt

        config  = alevt -vbi /dev/v4l/vbi0  100 -geometry 410x250 &

        config  = killall alevt

        repeat  = 1

end

end conf

#################################### Ende Belegung SOURCE #############################

#################################### Section tvtime ###########################

begin tvtime

begin 

    prog        = irexec

    button      = FULL_SCREEN

    config      = tvtime-command TOGGLE_FULLSCREEN

end 

begin 

    prog        = irexec

    button      = MUTE

    config      = tvtime-command TOGGLE_MUTE

end 

begin 

    prog        = irexec

    button      = CH+

    config      = tvtime-command UP

    repeat      = 1

end 

begin 

    prog        = irexec

    button      = CH-

    config      = tvtime-command DOWN

    repeat      = 1

end 

begin 

    prog        = irexec

    button      = VOL+

    config      = tvtime-command RIGHT

    repeat      = 1

end 

begin 

    prog        = irexec

    button      = VOL-

    config      = tvtime-command LEFT

    repeat      = 1

end 

begin 

    prog        = irexec

    button      = RESERVED

    config      = tvtime-command CHANNEL_PREV

    repeat      = 1

end 

begin 

    prog        = irexec

    button      = 1

    config      = tvtime-command CHANNEL_1

end 

begin 

    prog        = irexec

    button      = 2

    config      = tvtime-command CHANNEL_2

end 

begin 

    prog        = irexec

    button      = 3

    config      = tvtime-command CHANNEL_3

end 

begin 

    prog        = irexec

    button      = 4

    config      = tvtime-command CHANNEL_4

end 

begin 

    prog        = irexec

    button      = 5

    config      = tvtime-command CHANNEL_5

end 

begin 

    prog        = irexec

    button      = 6

    config      = tvtime-command CHANNEL_6

end 

begin 

    prog        = irexec

    button      = 7

    config      = tvtime-command CHANNEL_7

end 

begin 

    prog        = irexec

    button      = 8

    config      = tvtime-command CHANNEL_8

end 

begin 

    prog        = irexec

    button      = 9

    config      = tvtime-command CHANNEL_9

end 

begin 

    prog        = irexec

    button      = 0

    config      = tvtime-command CHANNEL_0

end 

begin  

    prog        = irexec

    button      = MINIMIZE

    config      = ENTER

    repeat      = 1

end 

end tvtime

############################################# Ende tvtime ###########################

############################################ Section xmms ###########################

begin xmms

begin 

        prog    = xmms

        button  = VOL+

        config  = VOL_UP 8

end 

begin 

        prog    = xmms

        button  = VOL-

        config  = VOL_DOWN 8

end 

begin 

        prog    = xmms

        button  = FULL_SCREEN

        config  = PLAY

        config = STOP

end 

begin 

        prog    = xmms

        button  = CH+

        config  = NEXT

        repeat  = 1 

end 

begin

        prog    = xmms

        button  = CH-

        config  = PREV

        repeat  = 1

end 

begin

        prog    = xmms

        button  = MUTE

        config  = MUTE

end

begin

        prog    = xmms

        button  = MINIMIZE

        config  = SHUFFLE

        repeat  = 1

end

begin

        prog    = xmms

        button  = RESERVED

        config  = REPEAT

end

begin

        prog    = xmms

        button  = 0

        config  = sleep 10

end

begin

        prog    = xmms

        button  = 5

        config  = PLAYPAUSE

end

begin

        prog    = xmms

        button  = 1

        config  = PREV 10

end

begin

        prog    = xmms

        button  = 3

        config  = NEXT 10

end

begin

        prog    = xmms

        button  = 4

        config  = PREV 100

end

begin

        prog    = xmms

        button  = 6

        config  = NEXT 100

end

begin

        prog    = xmms

        button  = 7

        config  = PREV 500

end

begin

        prog    = xmms

        button  = 9

        config  = NEXT 500

end

begin

        prog    = xmms

        button  = 2

        config  = FWD 10

end

begin

        prog    = xmms

        button  = 8

        config  = BWD 10

end

end xmms

########################################################### Ende xmms ################################

####################################### Mplayer ###########################

begin mplayer

begin

        prog    = mplayer

        button  = MUTE

        config  = mute

        repeat  = 1

end

begin

        prog    = mplayer

        button  = CH+

        config  = brightness +2

        repeat  = 1

end

begin

        prog    = mplayer

        button  = CH-

        config  = brightness -2

        repeat  = 1

end

begin

        prog    = mplayer

        button  = VOL+

        config  = volume +1

        repeat  = 1

end

begin

        prog    = mplayer

        button  = VOL-

        config  = volume -1

        repeat  = 1

end

begin

        prog    = mplayer

        button  = FULL_SCREEN

        config  = vo_fullscreen

end

begin

        prog    = mplayer

        button  = 5

        config  = pause

end

begin

        prog    = mplayer

        button  = 1

        config  = seek -10

        repeat  = 1

end

begin

        prog    = mplayer

        button  = 3

        config  = seek +10

        repeat  = 1

end

begin

        prog    = mplayer

        button  = 4

        config  = seek -60

        repeat  = 1

end

begin

        prog    = mplayer

        button  = 6

        config  = seek +60

        repeat  = 1

end

begin

        prog    = mplayer

        button  = 7

        config  = seek -600

        repeat  = 1

end

begin

        prog    = mplayer

        button  = 9

        config  = seek +600

        repeat  = 1

end

begin

        prog    = mplayer

        button  = 2

        config  = contrast +2

        repeat  = 1

end

begin

        prog    = mplayer

        button  = 8

        config  = contrast -2

        repeat  = 1

end

begin

        prog    = mplayer

        button  = 0

        config  = quit

end

begin

        prog    = mplayer

        button  = RESERVED

        config  = osd

        repeat  = 1

end

end mplayer

############################################## Section Mplayer Ende ####################
```

Wenn du jetzt die Buttons noch korrigierst, hast du zumindest schon mal eine Basis, wie du die Fernbedienung für mehrere Anwendungen konfigurieren kannst.

----------

