Author Topic: Vomp 0.4.0 and HAMA MCE REMOTE  (Read 5636 times)

Offline yotom

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
    • Email
Vomp 0.4.0 and HAMA MCE REMOTE
« on: April 17, 2013, 22:08:47 »
Hi,

I'm trying to set up the yellow/blue/green/red buttons of my HAMA REMOTE to their correct functions Teletext/EPG/Audio/Summary.

It is (at least for me ;-) not possible to set more than 1 of those keys via the Options-Menu "Remote Control". The key is added as "RemoteKey96", and added to the "RemoteKeyNum" parameter in vomp-MAC-ADDR.conf. From then on, all colored buttons activate the Teletext (that's not exactly what I want).

Is there a description somewhere on how to find out, which RemoteKey[0..95] is the equivalent to which remote control button, to be able to change/set the button in the vomp-MAC-DDR.conf files themselves?

Thanks,
Tom
 


Offline MartenR

  • Hero Member
  • *****
  • Posts: 789
    • View Profile
Re: Vomp 0.4.0 and HAMA MCE REMOTE
« Reply #1 on: April 18, 2013, 07:18:12 »
I suspect, the driver reports all keys with the same scan code.
Test it by using cat on the /dev/input/event device of your remote, unfortunetely for some remotes the kernel module does not contain all keys. (Maybe look for Kernel patches).
Then manually editing the config will not help.

Anyway RemoteKey96, says nothing, it only says, that it is the 96th remote translation rule. The rule itself is encoded in the heaxdecimal number.

Marten

Offline woz

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
Re: Vomp 0.4.0 and HAMA MCE REMOTE
« Reply #2 on: October 02, 2013, 09:07:04 »
Hi there,

I'm facing the same problems with the HAMA - remote. There are several reasons:

  • The HAMA remote creates 2 devices: /dev/input/by-id/usb-05a4_9881-event-kbd  and  /dev/input/by-id/usb-05a4_9881-event-mouse
  • When pressing the colour - keys a key sequence is generated e.g. Ctrl-, Shift-,  t-Event and unfortunately no CTRL_SHIFT_KEY_T Event

What I've done so far:
I created a lirc device using inputlirc according to this howto http://wiki.xbmc.org/index.php?title=HOW-TO:Configure_VRC-1100_remote_for_Ubuntu
When starting irw, I get different events for the different keys.

The good question now:
How can I use (input)lirc - events for the VOMPCLIENT?
One solution might be unsing IREXEC and netcat connecting via socket similar to http://forum.loggytronic.com/index.php?topic=658.0.

Might there be any other possibility, because this approach seems to be really intricately?

@Marten
When having a look at your sources, might there be a possibility to use native LIRC?

Regards
Wolfgang
« Last Edit: October 02, 2013, 09:30:22 by woz »

Offline woz

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
Re: Vomp 0.4.0 and HAMA MCE REMOTE
« Reply #3 on: October 02, 2013, 18:25:26 »
Ok guys,

attached my solution for the HAMA MCE REMOTE.

First installing inputlirc
Code: [Select]
sudo apt-get install inputlirc
Configure inputlirc
Edit /etc/default/inputlirc
Code: [Select]
# Options to be passed to inputlirc.
# EVENTS="/dev/input/event0 /dev/input/event1"
EVENTS="/dev/input/by-id/usb-05a4_9881-event-kbd /dev/input/by-id/usb-05a4_9881-event-mouse"
OPTIONS="-g -c -m0"

This maps all IR-remote events to LIRC

Now all LIRC events have to be mapped to remote socket:

Second installing lirc
Code: [Select]
sudo apt-get install lirc
Edit /etc/lirc/hardware.conf
Code: [Select]
# /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=true

#Try to load appropriate kernel modules
#LOAD_MODULES=true

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

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


Edit /etc/lirc/lircd.conf
Code: [Select]
#
#
# To find out how to get a proper configuration file please read:
#
#       /usr/share/doc/lirc/README.Debian

START_IREXEC=true

Next edit /etc/lir/lircrc

Code: [Select]
begin
        prog = irexec
        button = KEY_UP
        config = echo "20" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_DOWN
        config = echo "21" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_LEFT
        config = echo "22" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_RIGHT
        config = echo "23" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = CTRL_SHIFT_KEY_T
        config = echo "56" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_BACKSPACE
        config = echo "31" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = CTRL_KEY_M
        config = echo "41" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = CTRL_KEY_I
        config = echo "46" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = CTRL_KEY_E
        config = echo "11" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_ENTER
        config = echo "37" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_VOLUMEUP
        config = echo "16" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_VOLUMEDOWN
        config = echo "17" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KP0
        config = echo "0" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KP1
        config = echo "1" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KP2
        config = echo "2" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KP3
        config = echo "3" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KP4
        config = echo "4" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KP5
        config = echo "5" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KP6
        config = echo "6" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KP7
        config = echo "7" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KP8
        config = echo "8" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KP9
        config = echo "9" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = CTRL_SHIFT_KEY_B
        config = echo "50" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = CTRL_SHIFT_KEY_F
        config = echo "52" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_PREVIOUSSONG
        config = echo "36" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_NEXTSONG
        config = echo "30" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_PLAYPAUSE
        config = echo "48" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_HOMEPAGE
        config = echo "59" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_PAGEUP
        config = echo "32" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_PAGEDOWN
        config = echo "33" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = BTN_RIGHT
        config = echo "13" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_MUTE
        config = echo "15" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_KPASTERISK
        config = echo "10" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_NUMLOCK
        config = echo "14" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = ALT_META_KEY_ENTER
        config = echo "18" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = KEY_SLEEP
        config = echo "61" |nc -w0 -u 127.0.0.1 2000
end
begin
        prog = irexec
        button = CTRL_KEY_R
        config = echo "55" |nc -w0 -u 127.0.0.1 2000
end

I use netcat to transfer the keys according the remote.h to the local vompclient - socket.

... remarks welcome  :)

Wolfgang

« Last Edit: October 02, 2013, 19:08:51 by woz »

Offline yotom

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
    • Email
Re: Vomp 0.4.0 and HAMA MCE REMOTE
« Reply #4 on: October 26, 2013, 15:46:47 »
VERY VERY COOL!  :) :) :)

I needed some additions in hardware.conf to get it up n running:

Code: [Select]
REMOTE_MODULES="lirc_dev lirc_i2c"
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/by-id/usb-05a4_9881-event-kbd"
REMOTE_SOCKET=""

If no DRIVER is given, it complains that there's no driver called UNCONFIGURED. All other settings and procedures were working as explained.

All extra buttons are now working (REC, FF, etc.).

Once again: VERY VERY COOL  :D
« Last Edit: October 26, 2013, 15:48:21 by yotom »

Offline domaju

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Vomp 0.4.0 and HAMA MCE REMOTE
« Reply #5 on: January 25, 2014, 20:48:17 »
This is to let you know that the solution also worked for me. Just a few hints which might be helpful for others:

(1) I had to remove the substring "REMOTE_" in the variable names as intruced by yotom. Otherwise I still got the error message which he was mentioning.
(2) For some reasons, in my installation, irexec was looking to /etc/lirc/lirc/lircrc instead of /etc/lirc/lircrc. I just copied the lircrc into a newly created subdirectory (I first missed that but I came across a helpful error message when I run irexec manually  :D)
(3) Last but not least: irexec has to run while using vompclient. I put "irexec -d" into the rc.local. I could imagine that the configuration should have done that for me. But in my case, it did not.

Much better than at the beginning: even the color buttons work. Also, when pressing a key constantly, there is auto repeat now.

MANY THANKS
« Last Edit: January 26, 2014, 09:06:24 by domaju »

Offline t0bit0bsen

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
    • Email
Re: Vomp 0.4.0 and HAMA MCE REMOTE
« Reply #6 on: May 10, 2019, 21:22:24 »
Thanks a lot for this very helpful posts. They worked well for me.
I had to remove the "REMOTE_" part as well. And one pitfall for irexec is, that it does not like lircrc files edited in Windows. So be sure to remove the "^M" in the file, if you did edit it with a windows editor.