I search keymap.xml & lircmap.xml for MEDION X10
i search urgent a keymap.xml and lircmap.xml for my Medion X10 (P/N 20017670).

I use ubuntu 9.04 and XBMC!

Please help me Sad
Thank you!

same here.
First try to configure lirc to work with X10 remote, This link may help.
Second remap the keys to a Lircmap.xml file.
Good luck and sorry for my bad english Smile
What do you mean with remap?

I have copy my lirc.conf and paste it in lircmap.xml
What is with the keymap.xml?

Greezz Laugh
I have the same RC but it did not work properly with the normal "medion setting".

I works fine using "nVidia_UR88A" ... check this link http://linuxundich.de/de/ubuntu/pc-funkf...-mit-lirc/ for details. In short

sudo dpkg-reconfigure lirc

and select above nVdia remote control
I know this is an old thread, but I have the same remote and had some problems with it for which I want to share my solution.
Note that this solution can work for any remote that exhibits the same problem with lirc. Look at the python script for some parameters you might modify.

First of all, I use this config, which is slightly modified from the ati one, with all the correct names for each button: my lirc config file

More important, I had problems with this remote in that I couldn't quickly press the same button multiple times. It would interpret it as a long held press instead of different single button presses. I think not everyone has this problem, but since I had it, some other people with the same remote might have it.

In irw, I would get something like:
00000014f41f0000 00 right Medion_X10
00000014f41f0000 01 right Medion_X10
00000014f41f0000 02 right Medion_X10
00000014f41f0000 03 right Medion_X10
00000014f41f0000 04 right Medion_X10
00000014f41f0000 05 right Medion_X10
00000014f41f0000 06 right Medion_X10
00000014f41f0000 07 right Medion_X10
00000014f41f0000 08 right Medion_X10
00000014f41f0000 09 right Medion_X10
when quickly pressing the same button continuously.

Notice that the counter just keeps increasing instead of resetting to 0.
Normally, a single button press for this remote should result in 5 events (meaning the counter goes from 00 to 04 and would then reset to 00)

This meant that I had to wait like a second between each button press before I could press it again, or it would start scrolling verry quickly, like when the button was held.

I fixed this by creating a python daemon that has to be started after starting lirc, it reads from the socket that lirc sends its data to, changes it and sends it to another socket. The output socket of the python program is the one that xbmc has to connect to, so you need to make sure that lirc outputs to a different socket than /dev/lircd, and make the python script output to /dev/lircd instead.
To test it, you can do this:

sudo lircd -n --output /dev/lircd_orig
python lirc_adapter.py
irw /dev/lircd

Try pressing quickly or holding a button on the remote. The counter will only go to 4 and then reset to 0.

Now quick key presses will work in xbmc. The negative is that you cannot change the repeat rate or delay of held buttons, but I quite like the values how they are. Anyway, for me this makes the remote much more usable in xbmc. (and any other program for that matter) It's a hack, but at least I'm not hacking the lirc code.

You can find the script here: lirc adapter script

To use this solution permanently, you might want to edit your /etc/init.d/lirc script to use the right options and start the python adapter alongside it.

Update: modified URLs to make sure they remain on the web
i have the exact same issue with too many button presses.
i'm still looking for a fix.

could u post your lirc init script aswell?
i prolly modified it in the way it should be right?

Elf1sh Wrote:i have the exact same issue with too many button presses.
i'm still looking for a fix.

could u post your lirc init script aswell?
i prolly modified it in the way it should be right?


Try this.

My problems existed already on Ubuntu 10.04 and don't seem to have anything to do with the latest kernel update.
After having fiddled with both lirc and xbmc timeout and other settings, and having tried different kernel modules, I gave up and fixed it this way.

I'm still not exactly sure whether my problem is the same as the other threads indicate. It seems different, because with my remote keypresses aren't doubled when you press once, you just cannot press the same button twice within a second or XBMC starts scrolling like a madman.
I know one thing, setting higher delay times doesn't solve anything because at a lower level multiple keypresses keep being transmitted as an ever increasing counter.

After I solved it this way, I can tell you that I'm happily using my medion remote control with XBMC and never had a problem since. I guess that's what counts.
Here is the startup script. It's a very simple and stupid mod and I didn't make scripts to stop or restart it.

#! /bin/sh
# Provides:          lirc
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts LIRC daemon.
# Description:       LIRC is used to control different
#                    infrared receivers and transceivers.

load_modules ()

    log_daemon_msg "Loading LIRC modules"
    for mod in $*; do
        if [ $mod = "udev" ]; then
            log_end_msg 0
            log_success_msg "Restarted via udev, don't reload modules"
            modprobe $mod 2> /dev/null || MODULES_MISSING=true
    log_end_msg $?

    if $MODULES_MISSING; then
        log_failure_msg "Unable to load LIRC kernel modules. Verify your"
        log_failure_msg "selected kernel modules in /etc/lirc/hardware.conf"

build_remote_args ()

    #For remote only detection support, we need
    if [ -z "$REMOTE_DEVICE" ] && [ -z "$TRANSMITTER_DEVICE" ] && [ -c $dev ]; then

    #If we have a REMOTE_DEVICE or REMOTE_DRIVER defined (either because no devices
    #were defined, OR if we explicitly did), then populate REMOTE_ARGS
    if [ ! -z "$REMOTE_DEVICE" ] || [ ! -z "$REMOTE_DRIVER" ]; then
        if [ -n "$REMOTE_DEVICE" ] && [ "$REMOTE_DEVICE" != "none" ]; then
    ## MODDED by duststorm: force driver
    #   if [ -n "$REMOTE_DRIVER" ] && [ "$REMOTE_DRIVER" != "none" ]; then
    #   fi
        REMOTE_ARGS="--driver=atilibusb $REMOTE_ARGS"

        #Now, if we ALSO have a transmitter defined, add some args
        #To make the first lircd listen up
        if [ ! -z "$TRANSMITTER_DEVICE" ] || [ ! -z "$TRANSMITTER_DRIVER" ]; then
            REMOTE_ARGS="$REMOTE_ARGS --listen"
        ## MODDED by duststorm: use different socket
        REMOTE_ARGS="--output=/dev/lircd_orig $REMOTE_ARGS"
    echo $REMOTE_ARGS

build_transmitter_args ()

    #Transmitters must be explicitly be defined
    if [ ! -z "$TRANSMITTER_DEVICE" ] || [ ! -z "$TRANSMITTER_DRIVER" ]; then
        if [ -n "$TRANSMITTER_DEVICE" ] && [ "$TRANSMITTER_DEVICE" != "none" ]; then
        if [ -n "$TRANSMITTER_DRIVER" ] && [ "$TRANSMITTER_DRIVER" != "none" ]; then

        #Now, if we ALSO have a remote defined, add some args
        #To make the second lircd connect
        if [ ! -z "$REMOTE_DEVICE" ] || [ ! -z "$REMOTE_DRIVER" ]; then
            TRANSMITTER_ARGS="$TRANSMITTER_ARGS --connect=localhost:8765 --pidfile=/var/run/lirc/lircd1.pid"

. /lib/lsb/init-functions

test -f /usr/sbin/lircd || exit 0
test -f /usr/sbin/lircmd || exit 0


if [ -f /etc/lirc/hardware.conf ];then
    . /etc/lirc/hardware.conf

if [ ! -f /etc/lirc/lircd.conf ] || grep -q "^#UNCONFIGURED" /etc/lirc/lircd.conf; then
    if [ "$1" = "start" ]; then
        log_success_msg "No valid /etc/lirc/lircd.conf has been found."
        log_success_msg "Remote control support has been disabled."
        log_success_msg "Reconfigure LIRC or manually replace /etc/lirc/lircd.conf to enable."


if [ ! -f /etc/lirc/lircmd.conf ] || grep -q "^#UNCONFIGURED" /etc/lirc/lircmd.conf; then

if [ ! -f /etc/lirc/lircrc ] || grep -q "^#UNCONFIGURED" /etc/lirc/lircrc; then

#We need default socket locations
if [ -z "$REMOTE_SOCKET" ]; then
if [ -z "$TRANSMITTER_SOCKET" ]; then
    #Now, if we ALSO have a remote defined,
    #change the default transmitter socket
    if [ ! -z "$REMOTE_DEVICE" ] || [ ! -z "$REMOTE_DRIVER" ]; then

case "$1" in
        if [ "$LOAD_MODULES" = "true" ] && [ "$START_LIRCD" = "true" ]; then

        if [ "$START_LIRCD" = "true" ]; then
            [ -d "/var/run/lirc" ] || mkdir -p "/var/run/lirc"
            log_daemon_msg "Starting remote control daemon(s) : LIRC "
            REMOTE_LIRCD_ARGS=`build_remote_args $REMOTE_LIRCD_ARGS`
            TRANSMITTER_LIRCD_ARGS=`build_transmitter_args $TRANSMITTER_LIRCD_ARGS`

            #if we have a remote defined, it is primary process
            if [ ! -z "$REMOTE_LIRCD_ARGS" ]; then
                start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/lircd -- $REMOTE_LIRCD_ARGS < /dev/null
                log_end_msg $?
# MODDED by duststorm
             #  if [ -S "$REMOTE_SOCKET" -a "$OLD_SOCKET" != "$REMOTE_SOCKET" ]; then
             #      rm -f $OLD_SOCKET && ln -s $REMOTE_SOCKET $OLD_SOCKET
             #  fi
# Start in-between-daemon and make symlink to new socket location
            sleep 2
            chmod 666 /dev/lircd_orig
            python /home/duststorm/projects/lirc_medion_remote_fix/lirc_adapter.py &
            sleep 2
            chmod 666 /dev/lircd
            if [ ! -f "/var/run/lirc/lircd" ]; then
                ln -s /dev/lircd /var/run/lirc/lircd
            sleep 1
            chmod 666 /var/run/lirc/lircd

                #now if we additionally have a transmitter defined, it is secondary process
                if [ ! -z "$TRANSMITTER_LIRCD_ARGS" ]; then
                    /usr/sbin/lircd $TRANSMITTER_LIRCD_ARGS < /dev/null
                    if [ -S "$TRANSMITTER_SOCKET" ]; then
                        rm -f ${OLD_SOCKET}1 && ln -s $TRANSMITTER_SOCKET ${OLD_SOCKET}1
            elif [ ! -z "$TRANSMITTER_LIRCD_ARGS" ]; then
                start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/lircd -- $TRANSMITTER_LIRCD_ARGS < /dev/null
                log_end_msg $?
                if [ -S "$TRANSMITTER_SOCKET" -a "$OLD_SOCKET" != "$TRANSMITTER_SOCKET" ]; then
                    rm -f $OLD_SOCKET && ln -s $TRANSMITTER_SOCKET $OLD_SOCKET
                log_end_msg 1

        if [ "$START_LIRCMD" = "true" ]; then
            [ -d "/var/run/lirc" ] || mkdir -p "/var/run/lirc"
            log_daemon_msg "Starting remote control mouse daemon : LIRCMD "
            start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/lircmd < /dev/null
            log_end_msg $?

        if [ "$START_IREXEC" = "true" ]; then
            [ -d "/var/run/lirc" ] || mkdir -p "/var/run/lirc"
            log_daemon_msg "Starting execution daemon: irexec"
            start-stop-daemon --start --quiet --oknodo --exec /usr/bin/irexec -- -d /etc/lirc/lircrc < /dev/null
            log_end_msg $?
        if [ "$START_IREXEC" = "true" ]; then
            log_daemon_msg "Stopping execution daemon: irexec"
            start-stop-daemon --stop --quiet --exec /usr/bin/irexec
            log_end_msg $?

        if [ "$START_LIRCMD" = "true" ]; then
            log_daemon_msg "Stopping remote control mouse daemon: LIRCMD"
            start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd
            log_end_msg $?

        if [ "$START_LIRCD" = "true" ]; then
            log_daemon_msg "Stopping remote control daemon(s): LIRC"
            start-stop-daemon --stop --quiet --exec /usr/sbin/lircd
            log_end_msg $?
            [ -h "$OLD_SOCKET" ] && rm -f $OLD_SOCKET
            [ -h "${OLD_SOCKET}1" ] && rm -f ${OLD_SOCKET}1
        if [ "$START_IREXEC" = "true" ]; then
            start-stop-daemon --stop --quiet --signal 1 --exec /usr/bin/irexec

        if [ "$START_LIRCD" = "true" ]; then
            start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd

        if [ "$START_LIRCMD" = "true" ]; then
            start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircmd
        $0 stop
        #passes parameter $2 which is possibly our udev paramater
        $0 start $2
        echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}"
    exit 1

exit 0
It's the original lirc daemon startup script with two changes: force override the configuration to use atiusb driver, and startup the intermediary script and move around the proper socket files.
You will need to change "/home/duststorm/projects/lirc_medion_remote_fix/lirc_adapter.py" into the location where your script resides.
For reference I will inline the code of the links in this forum, in case the hosting might ever go down. These are the two same files as linked to in my previous post.

#! /usr/bin/env python

# Patching script for fixing faulty Medion X10 remote
# input (or similar)
# This fixes the issue where quickly  repeatet short key presses
# are read like a continuous press.
# This script must run in the background while using lirc (start it
# after starting lircd) and will read from the lircd socket, transform
# the data to eliminate the problem, and send it to a different output
# socket. This output socket contains the corrected signals and is the
# one that should be fed to any program using lirc.
import socket,os,sys,threading,thread

class MainServer(object):
    '''Main class of the server'''

    #Settings (change if necessary)
    REPEAT_COUNT = 5    # max sequence number (set to number of repeats for one keypress)
    LIRC_SOCKET = "/dev/lircd_orig"    # input: socket that lirc writes to
    OUTPUT_SOCKET = "/dev/lircd"    # output: socket to output to, let your programs listen to this
    DAEMONIZE = True
    DEBUG = False

    def __init__(self):
        self.connectedClients = []

    def start(self):
        '''Start server'''
        # Connect to input socket
        self.s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
        print "Listening to socket %s" % MainServer.LIRC_SOCKET

        # Create worker for input processing
        inputWorker = InputWorker(self.s,self)

        # Create output socket
        self.o = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
        except OSError as e:
            print e
        print "Sending output to socket %s" % MainServer.OUTPUT_SOCKET
        os.chmod(MainServer.OUTPUT_SOCKET, 666)
        self.o.listen(5)  # queue up to 5 connect requests before refusing new ones

        # Main loop, wait for incoming connections
            while True:
                (clientSocket, address) = self.o.accept()
                print "Client connected"
                # add clientsocket to list of clients
        except (KeyboardInterrupt, SystemExit):
            print "Received keyboard interrupt, quitting."

    def broadcastMessage(self, message):
        '''Broadcast message to all connected clients'''
        newClients = []
        for client in self.connectedClients:
            except Exception:
                print "Error sending to client, disconnect"
        self.connectedClients = newClients

    def quit(self):
        '''Stop main thread and quit server'''
        print "Closing connections"
        [c.close() for c in self.connectedClients ]

class InputWorker(threading.Thread):
    '''Worker process for handling input'''

    def __init__(self,inputSocket,mainServer):
        self.inputSocket = inputSocket
        self.mainServer = mainServer
        self.daemon = True

    def run(self):
        while True:
            # Listen for new input
            inp = self.inputSocket.recv(1024)
            if not inp:
                print "Connection with lirc socket lost, quitting"
            if MainServer.DEBUG:
                print "Received: %s" % inp
            output = self.processInput(inp)
            if MainServer.DEBUG:
                print "Sending: %s" % output
    def processInput(self,inp):
        '''This is where the magic happens.
        This function transforms the lirc input into the output format we want.'''
            parts = inp.split(" ")
            seqNb = int(parts[1], 16)
            seqNb = seqNb % MainServer.REPEAT_COUNT
            parts[1] = str(hex(seqNb).lstrip("0x")).rjust(2,"0")
            return " ".join(parts)
        except Exception:
            return inp

def daemonize():
    '''Daemonize this server (fork in background)'''
    # Dual fork hack to make process run as a daemon
    # from: http://motomastyle.com/daemonizing-a-python-script/
    if __name__ == "__main__":
            pid = os.fork()
            if pid > 0:
        except OSError, e:
            pid = os.fork()
            if pid > 0:
        except OSError, e:

## MAIN ##

if MainServer.DAEMONIZE:

print 'Starting LIRC adapter server'
server = MainServer()
print 'Stopping server'

# Please make this file available to others
# by sending it to <[email protected]>
# this config file was automatically generated
# using lirc-0.7.0(atiusb) on Fri Feb 18 01:53:46 2005
# contributed by FUX 2005-02-17
# brand: Medion
# model no. of remote control: RF Remote Control
#                              FCC ID: B4S20016398
# devices being controlled by this remote:
  begin remote
  name  Medion_X10
  bits           16
  eps            30
  aeps          100
  one             0     0
  zero            0     0
  pre_data_bits   8
  pre_data       0x14
  post_data_bits  16
  post_data      0x0
  gap          235996
  toggle_bit_mask 0x80800000
begin codes
tv                       0x000000000000012C
vcr                      0x000000000000022D
dvd                      0x000000000000D904
music                    0x000000000000DB06
radio                    0x000000000000032E
photo                    0x000000000000DA05
preview                  0x000000000000042F
list                     0x0000000000000530
setup                    0x000000000000F01B
desktop                  0x0000000000000631
vol-                     0x000000000000DD08
vol+                     0x000000000000DE09
mute                     0x000000000000D500
ch-                      0x000000000000E10C
ch+                      0x000000000000E00B
red                      0x0000000000000732
green                    0x0000000000000833
yellow                   0x0000000000000934
blue                     0x0000000000000A35
txt                      0x000000000000EB16
1                        0x000000000000E20D
2                        0x000000000000E30E
3                        0x000000000000E40F
4                        0x000000000000E510
5                        0x000000000000E611
6                        0x000000000000E712
7                        0x000000000000E813
8                        0x000000000000E914
9                        0x000000000000EA15
0                        0x000000000000EC17
chsearch                 0x000000000000F11C
del                      0x000000000000F520
ren                      0x0000000000000B36
snapshot                 0x000000000000ED18
left                     0x000000000000F21D
up             0x6F9A
up2                      0xEF1A
right                    0x000000000000F41F
down                     0x000000000000F722
ok                       0x000000000000F31E
acquire                  0x0000000000000C37
editimage                0x0000000000000D38
rewind                   0x000000000000F924
play                     0x000000000000FA25
forward                  0x000000000000FB26
rec                      0x000000000000FC27
stop                     0x000000000000FD28
pause                    0x000000000000FE29
skipr                    0x000000000000F621
fullscreen               0x0000000000000E39
skipf                    0x000000000000F823
dvdmenu                  0x000000000000EE19
off                      0x000000000000D702
dvdaudio                 0x0000000000000F3A
end codes
end remote

Logout Mark Read Team Forum Stats Members Help
I search keymap.xml & lircmap.xml for MEDION X101
This forum uses Lukasz Tkacz MyBB addons.