imon internal IR receiver and mce external IR receiver in mythbuntu 8.10
#1
hi all can any one help me too disable imon internal IR receiver or how to make the mce IR receiver my default receiver
in mythbuntu 8.10 i have a mce remote with external IR receiver witch i use but on boot up the remote does not work the reason for this is the system is picking up two IR receiver but if i unplug then plug the usb IR receiver back in to the usb port and restart the system then the remote works i do not want to use the imon remote & internal IR receiver only the mce remote & external IR receiver

thanks
hitman936
Reply
#2
Blacklist the lirc_imon module, so it doesn't get loaded at boot.
As far as i know adding it to /etc/modprobe.d/blacklist should do the trick.
Reply
#3
Hi ronie by Blacklist lirc_imon module will this stop the imon vfd display loading i need the imon vfd display to load but not the IR receiver

Thanks
hitman936
Reply
#4
That's correct, your display won't work that way.

So here's a better solution:
First look up the vendor-id of the MCE IR receiver (you can use lsusb for that).

I have a Philips MCE remote and lsusb will output someting similar to this:
Bus 004 Device 003: ID 0471:060d Philips

So in my case the vendor id is 0471. Now add the next line to /etc/udev/rules.d/90-lirc.rules

KERNEL=="lirc[0-9]*", SYSFS{idVendor}=="0471", SYMLINK+="lirc_mceusb2"

(Replace the vendor-id with the one you've found.)


Next, open /etc/init.d/lirc and change the device entry to: --device=/dev/lirc_mceusb2


The problem you're having is that devices are assigned at random at boot time.
So sometimes your MCE IR receiver will be assigned /dev/lircd0 and the imon receiver will be /dev/lircd1 and other times it will be the other way round.

The above will create a /dev/lirc_mceusb2 symlink to the MCE receiver and by editing /etc/init.d/lirc, you're telling lircd to listen to that device instead.
Reply
#5
Hi ronie thanks for the quick reply but still got the problem will post so you can see if i went wrong any where the OS is 8.10 64bit if that makes any difference

Bus 002 Device 003: ID 059f:0c41 LaCie, Ltd
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 05fe:0003 Chic Technology Corp. Cypress USB Mouse
Bus 001 Device 004: ID 15c2:ffdc SoundGraph Inc. iMON PAD Remote Controller
Bus 001 Device 003: ID 0471:0815 Philips eHome Infrared Receiver
Bus 001 Device 002: ID 062a:0102 Creative Labs
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
has you can see my remote ID 0471 is the same as yours i add the KERNEL=="lirc[0-9]*", SYSFS{idVendor}=="0471", SYMLINK+="lirc_mceusb2"

to the /etc/udev/rules.d/90-lirc.rules witch was blank untill i added that line i all so edited the /etc/init.d/lirc

#! /bin/sh
### BEGIN INIT INFO
# Provides: lirc
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# 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.
### END INIT INFO

load_modules ()
{
local MODULES_MISSING=false

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"
break
else
modprobe -k $mod 2> /dev/null || MODULES_MISSING=true
fi
done
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"
START_LIRCMD=false
START_LIRCD=false
fi
}

build_remote_args ()
{
local REMOTE_ARGS="$*"

#For remote only detection support, we need
#both REMOTE_DEVICE and TRANSMITTER_DEVICE undefined
if [ -z "$REMOTE_DEVICE" ] && [ -z "$TRANSMITTER_DEVICE" ]; then
for dev in /dev/lirc0; do
if [ -c $dev ]; then
REMOTE_DEVICE="$dev"
break
fi
done
fi

#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
REMOTE_ARGS="--device=$REMOTE_DEVICE $REMOTE_ARGS"
fi
if [ -n "$REMOTE_DRIVER" ] && [ "$REMOTE_DRIVER" != "none" ]; then
REMOTE_ARGS="--driver=$REMOTE_DRIVER $REMOTE_ARGS"
fi

#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 --output=/dev/lircd --listen"
fi
fi
echo $REMOTE_ARGS
}

build_transmitter_args ()
{
local TRANSMITTER_ARGS="$*"

#Transmitters must be explicitly be defined
if [ ! -z "$TRANSMITTER_DEVICE" ] || [ ! -z "$TRANSMITTER_DRIVER" ]; then
if [ -n "$TRANSMITTER_DEVICE" ] && [ "$TRANSMITTER_DEVICE" != "none" ]; then
TRANSMITTER_ARGS="--device=/dev/lirc_mceusb2"
fi
if [ -n "$TRANSMITTER_DRIVER" ] && [ "$TRANSMITTER_DRIVER" != "none" ]; then
TRANSMITTER_ARGS="--driver=$TRANSMITTER_DRIVER $TRANSMITTER_ARGS"
fi

#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 --output=/dev/lircd1 --connect=localhost:8765 --pidfile=/var/run/lircd1.pid"
fi
fi
echo $TRANSMITTER_ARGS
}

. /lib/lsb/init-functions

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

START_LIRCMD=true
START_LIRCD=true

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

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."
fi
START_LIRCD=false
START_LIRCMD=false
fi
if [ ! -f /etc/lirc/lircmd.conf ] \
|| grep -q "^#UNCONFIGURED" /etc/lirc/lircmd.conf;then
START_LIRCMD=false
fi

case "$1" in
start)
if [ "$LOAD_MODULES" = "true" ] && [ "$START_LIRCD" = "true" ]; then
load_modules $2 $REMOTE_MODULES $TRANSMITTER_MODULES $MODULES
fi
if $START_LIRCD; then
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 --exec /usr/sbin/lircd -- $REMOTE_LIRCD_ARGS < /dev/null
log_end_msg $?

#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
fi
elif [ ! -z "$TRANSMITTER_LIRCD_ARGS" ]; then
start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- $TRANSMITTER_LIRCD_ARGS < /dev/null
else
log_end_msg 1
fi
fi
if $START_LIRCMD; then
log_daemon_msg "Starting remote control mouse daemon : LIRCMD "
start-stop-daemon --start --quiet --exec /usr/sbin/lircmd < /dev/null
log_end_msg $?
fi
;;
stop)
if $START_LIRCMD; then
log_daemon_msg "Stopping remote control mouse daemon: LIRCMD"
start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd
log_end_msg $?
fi
if $START_LIRCD; then
log_daemon_msg "Stopping remote control daemon(s): LIRC"
start-stop-daemon --stop --quiet --exec /usr/sbin/lircd
log_end_msg $?
fi
;;
reload|force-reload)
if $START_LIRCD; then
start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd
fi
if $START_LIRCMD; then
start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircmd
fi
;;
restart)
$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
esac

exit 0

Thanks
hitman936
Reply
#6
Your /etc/init.d/lirc script is pretty different from the one i'm using.
Try if this one works for you:
Code:
#! /bin/sh
### BEGIN INIT INFO
# 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.
### END INIT INFO


. /lib/lsb/init-functions

case "$1" in
    start)
            log_daemon_msg "Starting remote control daemon(s) : LIRC "
            /usr/sbin/lircd --device=/dev/lirc_mceusb2 /etc/lirc/lircd.conf
            log_end_msg $?
        ;;
    stop)
            log_daemon_msg "Stopping remote control daemon(s): LIRC"
            start-stop-daemon --stop --quiet --exec /usr/sbin/lircd
            log_end_msg $?
        ;;
    reload|force-reload)
            start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd
        ;;
    restart)
        start-stop-daemon --stop --quiet --exec /usr/sbin/lircd &&
        /usr/sbin/lircd --device=/dev/lirc_mceusb2 /etc/lirc/lircd.conf
        ;;
    *)
        echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}"
        exit 1
esac

exit 0
Reply
#7
Hi,

I had the same issue, what I ended up doing, was using a 2nd instance of LIRC for the 2nd reciever (MCE in my case).

There's a fairly good howto here:
http://www.lirc.org/html/configure.html

For me, i've added:
Code:
/usr/sbin/lircd -d /dev/lirc1 --output=/dev/lircd --connect=localhost:8765 --pidfile=/var/run/lircd2.pid
to my /etc/init.d/xbmc script, which just spawns a second lirc that listens for the MCE remote.
Reply
#8
Hi ronie thanks for the reply tried your script and it works now my mce remote & external IR receiver is all ways the default one once again thanks too every one

Thanks
hitman936
Reply
#9
Is it possible to use an MCE remote with the iMon IR receiver?

Basically, i cannot learn the iMon PAD remote to my universal remote but I can do it with an MCE remote...

My idea would be to use the receiver in the box with the MCE one.
Is there any way to do this? Is there any other remote that is known to work with this receiver?
Reply
#10
hi Jaco2k some mce remotes work with the imon ir receiver when i was running windows i could get my mce remote to work with imon ir receiver but not sure how to get it to work in ubuntu if even possible
Reply
#11
I have built two Antec 430 fusion cases, Well I have one and I built my dad's as well. They have the imon LCD with ir rcvr and when building them I had tested a M$ MCE remote, MediaGate MCE remote, PVR-150 MCE KIT Remote and they all work fine with the imon ir sensor. I have mine setup now with and M$ mce remote using the Imon IR sensor and then the M$ USB donge tucked in behind the case for transmitting to the Stb, and the TV.

It took a while to set it up and working properly. But I posted a how-to on the Mythbuntu site and in the soundgraph sticky page here.

Dave
Reply

Logout Mark Read Team Forum Stats Members Help
imon internal IR receiver and mce external IR receiver in mythbuntu 8.100