View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 4 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Sep 14, 2006 4:52 am 
Offline
Joined: Mon Aug 15, 2005 3:46 pm
Posts: 19
Hi, I have spent the last two night trying to get my new MCE(1039) remote working. The good think about the remote is that there is plenty of information on how to get it working under linux, but still I fail.

The remote is detected in "dmesg" and "lsusb", I can run "lircd -n" and connect with "irw" that will present the correct pressed keys. Rebooting the frontend(CRTL-ALT-BACKSLASH) and it's working in MythTV(!).

But the trouble is to get KnoppMyth to start "lircd" at boot!
Since I have installed my own version of lirc, i have changed to path to the daemon in /etc/init.d/lirc from /usr/sbin/lircd to /usr/local/sbin/lircd. I have tried both with and without "$ARGS..." after lircd, but still it fails to load.

Running "/usr/sbin/update-rc.d lirc defaults" will only result in "System startup links for /etc/init.d/lirc already exist."

So, any ideas why this could be failing? It feels like I'm so close to solving this, frustrating.

Here is my "lirc" and "hardware.con"-files. Could anyone send me there working copies?

Code:
#! /bin/sh
 #
 #

 load_modules ()
 {
    local MODULES_MISSING=false

    for mod in $*
    do
       modprobe -k $mod 2> /dev/null || MODULES_MISSING=true
    done

    if $MODULES_MISSING; then
       echo "#####################################################"
       echo "## I couldn't load the required kernel modules     ##"
       echo "## You should install lirc-modules-source to build ##"
       echo "## kernel support for your hardware.               ##"
       echo "#####################################################"
       echo "## If this message is not appropriate you may set  ##"
       echo "## LOAD_MODULES=false in /etc/lirc/hardware.conf   ##"
       echo "#####################################################"
       START_LIRCMD=false
       START_LIRCD=false
    fi
 }

 build_args ()
 {
    local ARGS="$*"
    if [ -n "$DEVICE" ] && [ "$DEVICE" != "none" ]; then
       if [ -d /dev/lirc ] && [ "$DEVICE" = "/dev/lirc" ];then
          #new device names
          DEVICE="/dev/lirc/0"
       fi
       ARGS="--device=$DEVICE $ARGS"
    fi
    if [ -n "$DRIVER" ] && [ "$DRIVER" != "none" ]; then
       ARGS="--driver=$DRIVER $ARGS"
    fi
    echo $ARGS
 }

 test -f /usr/local/sbin/lircd || exit 0
 test -f /usr/local/sbin/lircmd || exit 0
 #test -f /etc/lirc/lircd.conf || exit 0
 #test -f /etc/lirc/lircmd.conf || exit 0

 START_LIRCMD=true
 START_LIRCD=true

 if [ ! -f /etc/lirc/lircd.conf ] \
    || grep -q "^#UNCONFIGURED"  /etc/lirc/lircd.conf;then
    if [ "$1" = "start" ]; then
           echo "##################################################"
           echo "## LIRC IS NOT CONFIGURED                       ##"
           echo "##                                              ##"
           echo "## read /usr/share/doc/lirc/html/configure.html ##"
           echo "##################################################"
    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

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


 case "$1" in
   start)
     if [ "$LOAD_MODULES" = "true" ] && [ "$START_LIRCD" = "true" ]; then
    load_modules $MODULES
     fi
     echo -n "Starting lirc daemon:"
     if $START_LIRCD; then
       echo -n " lircd"
       LIRCD_ARGS=`build_args $LIRCD_ARGS`
       start-stop-daemon --start --quiet --exec /usr/local/sbin/lircd \
       < /dev/null
     fi
     if $START_LIRCMD; then
       echo -n " lircmd"
       start-stop-daemon --start --quiet --exec /usr/local/sbin/lircmd \
             < /dev/null
     fi
     echo "."
     ;;
   stop)
     echo -n "Stopping lirc daemon:"
     echo -n " lircmd"
     start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircmd
     echo -n " lircd"
     start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircd
     echo "."
     ;;
   reload|force-reload)
     if $START_LIRCD; then
       start-stop-daemon --stop --quiet --signal 1 --exec /usr/local/sbin/lircd
     fi
     if $START_LIRCMD; then
       start-stop-daemon --stop --quiet --signal 1 --exec /usr/local/sbin/lircmd
     fi
     ;;
   restart)
     $0 stop
     $0 start
     ;;
   *)
     echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}"
     exit 1
 esac

 exit 0


Code:
# /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

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
DEVICE="/dev/lirc"
MODULES="lirc_dev lirc_mceusb2"


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 20, 2006 10:03 am 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
For my r5c7 install I had to add these lines to the bottom of /etc/init.d/bootmisc.sh
Code:
setserial /dev/ttyS0 uart none
modprobe lirc_serial
/usr/local/sbin/lircd


For my r5d1 install:
Code:
setserial /dev/ttyS0 uart none
modprobe lirc_serial
/usr/sbin/lircd


From you message it looks like you should use the first one.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 20, 2006 5:11 pm 
Offline
Joined: Mon Aug 15, 2005 3:46 pm
Posts: 19
Thanks!

But i'm using a Microsoft USB connected remote, NOT at remote connected to the serialport as i suppose you do.

I'm still having trouble with this and have not had time to investegate it further. For the moment, after knoppmyth is up and running, i have to enter the console(CTRL-ALT-F2), run "lircd", get back to GUI(CTRL-ALT-F7), restart GUI(CTRL-ALT-BACKSPACE), and then the remote is working OK(until i reboot).

Have tested varius "/etc/init.d/lirc", including the bundled debian-version with Lirc. I guess lircd.conf and lircrc is correct since the remote is working when i manually starts lircd...

Has setup "alias char-major-61 lirc-mceusb2" in the alias-file in /etc/modutils.d

I have removed suport for USB 2.0, in-case that would affect loading of the mceusb2 driver.

The question is when does the mceusb2 driver get loaded? Is it loaded manually by knoppmyth in a config-file or does it get loaded in "/etc/lirc/harware.conf" when lircd request it. In the later case, should i supply somekind of sleep(2) to let the driver settle down before lircd is loaded?

I'm running lircd 8.0(have also tried 8.1-pre1) and a custom made linux(2.6.17)-kernel.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 1:45 am 
Offline
Joined: Mon Aug 15, 2005 3:46 pm
Posts: 19
Thanks for the sugested "bootmisc.sh"-script. I'm quite new to knoppix and having a hardtime finding the usual scripts used.(It's so much simpler in Slackware. =)

I added:
setterm -blength 0
modprobe lirc_mceusb2
lircd

And now it's working, not the best place to put it, but since the correct scripts is giving me trouble i'm happy that it's just working.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu