Kodi Community Forum
[LINUX] HOW-TO set up Lirc with USB HID remote controls (Hama, Auvisio) - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
---- Thread: [LINUX] HOW-TO set up Lirc with USB HID remote controls (Hama, Auvisio) (/showthread.php?tid=63484)

Pages: 1 2 3


- Bobby Blixberg - 2010-05-19

Trying to apply all this to my Hama 00052451, at the moment the remote does not do anything when pressing most of the keys Sad

Before I will try with another remote, could someone please put all the info here together for a linux newbie?

jbernardo Wrote:For me it still doesn't work. If I change line 83 and 84 in /etc/lircd, commenting them both, then the lirc instance for the "transmitter" won't start:
Code:
$ sudo /etc/init.d/lirc restart                                                                                                  
* Stopping remote control daemon(s): LIRC                                                                                                [ OK ]
* Loading LIRC modules                                                                                                                   [ OK ]
* Starting remote control daemon(s) : LIRC                                                                                               [ OK ]
lircd: there seems to already be a lircd process with pid 11060                                                                                  
lircd: otherwise delete stale lockfile /var/run/lirc/lircd.pid

I am getting the same error message.

jbernardo Wrote:Also, the remote gets ignored by XBMC, seems like it doesn't see the Lircmap.xml in .xbmc/userdata.
EDIT: My Lircmap was corrupted. Now all I need to do is fix the detection of mouse and power button

How did you know that your Lircmap.xml was corrupted?

I used nano to edit the file (in /home/xbmc/.xbmc/userdata), here is hwo it looks like:

Code:
<lircmap>
<remote device="linux-input-layer">
<power>SLEEP</power>
<start>HOMEPAGE</start>
<myTV>T</myTV>
<mymusic>M</mymusic>
<mypictures>I</mypictures>
<myvideo>E</myvideo>
<pause>PLAYPAUSE</pause>
<stop>STOPCD</stop>
<reverse>B</reverse>
<forward>F</forward>
<skipplus>NEXTSONG</skipplus>
<skipminus>PREVIOUSSONG</skipminus>
<record>R</record>
<back>BACKSPACE</back>
<info>BTN_RIGHT</info>
<left>LEFT</left>
<right>RIGHT</right>
<up>UP</up>
<down>DOWN</down>
<select>ENTER</select>
<title>BTN_MOUSE</title>
<volumeplus>VOLUMEUP</volumeplus>
<volumeminus>VOLUMEDOWN</volumeminus>
<mute>MUTE</mute>
<pageplus>PAGEUP</pageplus>
<pageminus>PAGEDOWN</pageminus>
<one>KP1</one>
<two>KP2</two>
<three>KP3</three>
<four>KP4</four>
<five>KP5</five>
<six>KP6</six>
<seven>KP7</seven>
<eight>KP8</eight>
<nine>KP9</nine>
<zero>KP0</zero>
<display>KPASTERISK</display>
<clear>ESC</clear>
</remote>
</lircmap>

I am pretty sure I missed something, maybe someone could give me a hint...


conceptronic - redman5087 - 2010-07-21

Please, could someone post the all the configuration files for lirc and xbmc for the
conceptronic lounge.
The lounge remote works out of the box for some buttons,
so I followed this tutorial to program the other buttons.
Following this tutorial I get two things with "irw"
1 irw : connection refused.
or
2 irw : just a blank line, the remotes codes are not seen on the screen

So please post the configuration files for this remote.

Thanks .


- redman5087 - 2010-07-24

redman5087 Wrote:Please, could someone post the all the configuration files for lirc and xbmc for the
conceptronic lounge.
The lounge remote works out of the box for some buttons,
so I followed this tutorial to program the other buttons.
Following this tutorial I get two things with "irw"
1 irw : connection refused.
or
2 irw : just a blank line, the remotes codes are not seen on the screen

So please post the configuration files for this remote.

Thanks .

Ok , I got irw working now:

00000000000100cf 00 PLAY linux-input-layer
0000000000010077 00 PAUSE linux-input-layer
00000000000100a6 00 STOPCD linux-input-layer
00000000000100d0 00 FASTFORWARD linux-input-layer
00000000000100a3 00 NEXTSONG linux-input-layer
00000000000100a5 00 PREVIOUSSONG linux-input-layer
00000000000100a8 00 REWIND linux-input-layer
00000000000100a7 00 RECORD linux-input-layer
0000000000010067 00 UP linux-input-layer
000000000001006a 00 RIGHT linux-input-layer
000000000001006c 00 DOWN linux-input-layer
0000000000010069 00 LEFT linux-input-layer
000000000001001c 00 ENTER linux-input-layer
000000000001009e 00 BACK linux-input-layer
0000000000010082 00 PROPS linux-input-layer
0000000000010073 00 VOLUMEUP linux-input-layer
0000000000010072 00 VOLUMEDOWN linux-input-layer
0000000000010193 00 CHANNELDOWN linux-input-layer
0000000000010192 00 CHANNELUP linux-input-layer
0000000000010071 00 MUTE linux-input-layer
0000000000010002 00 1 linux-input-layer
0000000000010003 00 2 linux-input-layer
0000000000010004 00 3 linux-input-layer
0000000000010005 00 4 linux-input-layer
0000000000010006 00 5 linux-input-layer
0000000000010007 00 6 linux-input-layer
0000000000010008 00 7 linux-input-layer
0000000000010009 00 8 linux-input-layer
000000000001000a 00 9 linux-input-layer
000000000001002a 00 LEFTSHIFT linux-input-layer
0000000000010009 00 8 linux-input-layer
000000000001000b 00 0 linux-input-layer
000000000001002a 00 LEFTSHIFT linux-input-layer
0000000000010004 00 3 linux-input-layer
0000000000010001 00 ESC linux-input-layer
000000000001001c 00 ENTER linux-input-layer


hardware.conf:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="gyration"
REMOTE_MODULES=""
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/by-id/usb-TopSeed_Technology_Corp._USB_RF_Combo_Devic$
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf"
REMOTE_LIRCD_ARGS=""

#REMOTE="gyration"
#REMOTE_MODULES=""
#REMOTE_DRIVER="devinput"
#REMOTE_DEVICE="/dev/input/by-id/usb-TopSeed_Technology_Corp._USB_RF_Combo_Devi$
#REMOTE_SOCKET=""
#REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf"
#REMOTE_LIRCD_ARGS=""


#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER="devinput"
TRANSMITTER_DEVICE="/dev/input/by-id/usb-TopSeed_Technology_Corp._USB_RF_Combo_$
TRANSMITTER_LIRCD_CONF="/etc/lirc/lircd.conf"
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

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

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""


But now the remote completely doesn't work anymore, even the standard buttons.
I changed some keys for Lircmap.xml but doesn't help.

Any help, please


irw - redman5087 - 2010-07-25

I got all the irw codes for event-kbd and event-mouse and changed Lircmap.xml.
But xbmc is only listening to event-kbd and irw is listening to the event-kbd and event-mouse.


lounge - redman5087 - 2010-07-26

I got irw working with this tutorial and make changes to Lircmap but now xbmc totaly doesn't respond anymore.

I really appreciate if someone could help!!!!


linux-input-layer - redman5087 - 2010-07-27

I got this from xbmc.log

22:02:55 T:3079337872 M:1859227648 DEBUG: LIRC: Update - NEW at 60672:0000000000010069 00 LEFT linux-input-layer (LEFT)
22:02:56 T:3079337872 M:1859227648 DEBUG: LIRC: Update - NEW at 61022:000000000001006a 00 RIGHT linux-input-layer (RIGHT)
22:02:56 T:3079337872 M:1859227648 DEBUG: LIRC: Update - NEW at 61423:0000000000010067 00 UP linux-input-layer (UP)
22:02:58 T:3079337872 M:1859235840 DEBUG: LIRC: Update - NEW at 63606:00000000000100cf 00 PLAY linux-input-layer (PLAY)
22:03:01 T:3079337872 M:1859244032 DEBUG: LIRC: Update - NEW at 66123:0000000000010067 00 UP linux-input-layer (UP)
22:03:01 T:3079337872 M:1859244032 DEBUG: LIRC: Update - NEW at 66623:000000000001006c 00 DOWN linux-input-layer (DOWN)
22:03:02 T:3079337872 M:1859244032 DEBUG: LIRC: Update - NEW at 67090:0000000000010067 00 UP linux-input-layer (UP)
22:03:02 T:3079337872 M:1859244032 DEBUG: LIRC: Update - NEW at 67573:000000000001006c 00 DOWN linux-input-layer (DOWN)
22:03:03 T:3079337872 M:1859244032 DEBUG: LIRC: Update - NEW at 67958:0000000000010067 00 UP linux-input-layer (UP)
22:03:04 T:3079337872 M:1859244032 DEBUG: LIRC: Update - NEW at 68958:000000000001006a 00 RIGHT linux-input-layer (RIGHT)
22:03:04 T:3079337872 M:1859244032 DEBUG: LIRC: Update - NEW at 69424:0000000000010069 00 LEFT linux-input-layer (LEFT)
22:03:05 T:3079337872 M:1859244032 DEBUG: LIRC: Update - NEW at 69908:000000000001001c 00 ENTER linux-input-layer (ENTER)
22:03:05 T:3079337872 M:1859244032 DEBUG: LIRC: Update - NEW at 70357:000000000001006c 00 DOWN linux-input-layer (DOWN)
22:03:05 T:3079337872 M:1859244032 DEBUG: LIRC: Update - NEW at 70707:0000000000010067 00 UP linux-input-layer (UP)
22:05:01 T:3079337872 M:1859153920 DEBUG: LIRC: Update - NEW at 186197:00000000000100cf 00 PLAY linux-input-layer (PLAY)
22:05:02 T:3079337872 M:1859035136 DEBUG: LIRC: Update - NEW at 186798:00000000000100cf 00 PLAY linux-input-layer (PLAY)
22:05:02 T:3079337872 M:1859035136 DEBUG: LIRC: Update - NEW at 187297:00000000000100cf 00 PLAY linux-input-layer (PLAY)
22:05:02 T:3079337872 M:1859035136 DEBUG: LIRC: Update - NEW at 187580:00000000000100cf 00 PLAY linux-input-layer (PLAY)
22:05:07 T:3079337872 M:1859035136 DEBUG: LIRC: Update - NEW at 192148:00000000000100a6 00 STOPCD linux-input-layer (STOPCD)


But whatever I do change in Lircmap, xbmc is not responding.

A little help please,
Thanks


keyboard.xml - redman5087 - 2010-08-01

Thanks to the lirc mailinglist iI now realise that I don't have to use lirc for the remote and adjusted keyboard.xml and now most of the buttons are working.


- WBFT - 2010-08-11

This is for the Conceptronic MCE RF Lounge'n'LOOK remote but should work for other RF remotes as well.

For people who are struggling with this i wrote a small tutorial..
The Conceptronic Lounge'n'LOOK is an RF remote wich doesn't use IR codes, it uses keypresses like from a keyboard. That's why keyboard.xml should be used.

Enable debugging in XBMC->system

Then restart and open up Putty (ssh)

$ sudo -s
$ apt-get install nano
$ nano /home/*****/.xbmc/temp/xbmc.log (*****= user)

pagedown to the End and you should see entries like this:

22:05:07 T:3079337872 M:1859035136 DEBUG: LIRC: Update - NEW at 192148:00000000000100a6 00 STOPCD linux-input-layer (STOPCD)

Write down the codes (like the one I made red) and CTRL + x to close nano

then

$ nano /usr/share/xbmc/system/keymaps/keyboard.xml

and make entries like the red one with the codes from the debugging.


<keymap>
<global>
<keyboard>
<key id="1111111">ParentDir</key>
<p>Play</p>

111111 = code from debugging

Couldn't find codes for the top buttons or the colored buttons. I used * for ContextMenu and configured the back button for ParentDir wich was all I was missing.. With the new Dharma my OK button wouldn't show OSD while watching movies. All I had to do for that was add: <fullscreenvideo>
<enter>OSD</enter>
<return>OSD</return>
</fullscreenvideo>

@redman5087 maby an idea to put your keyboard.xml on here for future reference.


- Gujs - 2010-12-05

Does anybody have updated version of lirc startup script for Ubuntu Maverick (10.10)?
I have Topseed remote control with two HID devices.
Thank You.


- Redsandro - 2011-01-28

It's been almost a year and I'm still stuck here:

Redsandro Wrote:@jbernardo:

Looks like we have the exact same remote (PCremote), so I copied your variation of lircd.conf.

But no matter what, I keep getting this:
Code:
$ irw
connect: Connection refused

jbernardo, are you still using that remote? Do you or anyone using /dev/input/by-id/usb-073a_2230-event-mouse care to post the files involved?

/etc/lirc/lircd.conf
/etc/lirc/hardware.conf

Here are mine:

/etc/lirc/hardware.conf:
Code:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="None"
REMOTE_MODULES=""
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/input/by-id/usb-073a_2230-event-mouse"
REMOTE_SOCKET="/dev/lircd"
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE="/dev/input/by-id/usb-073a_2230-mouse"
TRANSMITTER_SOCKET="/dev/lircd"
TRANSMITTER_LIRCD_CONF="/etc/lirc/lircd.conf"
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"
#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"
LOAD_MODULES="true"
LIRCMD_CONF=""
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""

/etc/lirc/lircd.conf: see http://linux.bytesex.org/v4l2/linux-input-layer-lircd.conf

If I try through inputlirc instead using this guide, I get this, which makes more sense to me, because the remote is active as a mouse and keyboard as soon as the usb receiver is plugged in.
Code:
sudo /etc/init.d/inputlirc restart
Restarting inputlirc configuration
Failed to grab /dev/input/event5: Device or resource busy
Failed to grab /dev/input/irremote0: Device or resource busy



- jbernardo - 2011-01-28

Hi,
I am still using that remote, I'll post my configuration files this weekend.


- Redsandro - 2011-01-28

Thanks, I'd appreciate it!


Different solution - keny - 2011-01-29

Hi,
during time I found a better solution for XBMC than using LIRC for this remote. It is an event client driver for XBMC which can be found at http://trac.xbmc.org/ticket/8827. The biggest advantage is that it is gives me faster responses to XBMC.


- Redsandro - 2011-01-29

Sounds interesting. But quoting the latest version:
Quote: ToDo
======

* Add some documentation
I haven't got the slightest clue how to go from downloading the archive to customizing my remote control in XBMC.

Apart from the make && sudo make install, where can I change my vendor/device id, and how do I know what my keycode table is?


- jbernardo - 2011-01-29

/etc/lirc/hardware.conf:
Code:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Linux input layer (/dev/input/eventX)"
REMOTE_MODULES=""
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/event7"
REMOTE_SOCKET=""
#REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput"
#REMOTE_LIRCD_CONF="asus/lircd.conf.asusxpc"
REMOTE_LIRCD_CONF="packard_bell/lircd.conf.packard_bell_xpc"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

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

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""

/usr/share/lirc/remotes/packard_bell/lircd.conf.packard_bell_xpc
Code:
begin remote
  name            XPC-RC01
  bits            16
  eps             30
  aeps            100
  one             0     0
  zero            0     0
  gap             107977
  pre_data_bits   16
  pre_data        0x8001

  begin codes
       1               0x0002
       2               0x0003
       3               0x0004
       4               0x0005
       5               0x0006
       6               0x0007
       7               0x0008
       8               0x0009
       9               0x000A
       0               0x000B
       mute            0x0071
       record          0x00A7
       vol-up          0x0073
       vol-down        0x0072
       ch-up           0x0192
       ch-down         0x0193
       prev-track      0x00A5
       next-track      0x00A3
       play-pause      0x00A4
       rewind          0x00A8
       ff-wind         0x00D0
       stop            0x00A6
       back            0x000E
       ok              0x001C
       left            0x0069
       right           0x006A
       up              0x0067
       down            0x006C
       music           0x0187
       photo           0x00E2
       video           0x0189
       dvd             0x0185
       tv              0x0179
       teletext        0x0184
       radio           0x0081
       home            0x0081

  end codes

end remote

/etc/lirc/lircd.conf:
Code:
#This configuration has been automatically generated via
#the Ubuntu LIRC package maintainer scripts.
#
#It includes the default configuration for the remote and/or
#transmitter that you have selected during package installation.
#
#Feel free to add any custom remotes to the configuration
#via additional include directives or below the existing
#Ubuntu include directives from your selected remote and/or
#transmitter.

#Configuration for the Linux input layer (/dev/input/eventX) remote:
include "/usr/share/lirc/remotes/packard_bell/lircd.conf.packard_bell_xpc"

What doesn't work properly - the menu key doesn't work while watching a film.
I'll have to check that event layer driver.