[mythtv-users] Re: Lirc and Mythtv (Hauppauge Gray Remote)

Harry Orenstein ho_9 at hotmail.com
Fri Feb 13 13:45:46 EST 2004


Sorry about breaking the thread.  Just finished an upgrade on my work PC.


I didn't really pour through your config files.  I have attached my own so
that you can see if they match yours.  Best thing is to take it one step
at a time and load the modules, check the logs, check for the device, load
the daemon, check the logs, fire up irw and see where you stand.  I just
realized that I didn't provide the lircd.conf file, but you should be able 
to
get one from the Myth contrib directory.  Let me know if you still have
problems after some more troubleshooting (and post any logs/errors/
messages if you do).

HTH!


-- Harry O.

_________________________________________________________________
Choose now from 4 levels of MSN Hotmail Extra Storage - no more account 
overload! http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/
-------------- next part --------------
#!/bin/sh
#
# lircd		Linux Infrared Remote Control daemon
#
# chkconfig:	2345 65 35
# description:  LIRC is a package that allows you to decode and send
#		infra-red signals of many (but not all) commonly used
#		remote controls.
#
# processname:	lircd
# pidfile:	/var/run/lircd.pid
# config:	/etc/lircd.conf
# config:	/etc/sysconfig/lircd

# Source function library
. /etc/rc.d/init.d/functions

# Get service config
[ -f /etc/sysconfig/lircd ] && . /etc/sysconfig/lircd

MODULEPATH="/lib/modules/`uname -r`/misc"

# See how we were called.
case "$1" in

  start)    # Check if the service is already running?
    	    if [ ! -f /var/lock/subsys/lircd ]; then

		# Release serial port.
		if [ "${HWMOD}" = "lirc_serial" ]; then

		    if lsmod | grep -q ^serial; then

			modprobe -r serial

		    else

			[ ! -f ${MODULEPATH}/serial.o* ] \
			&& setserial ${COM_PORT} uart none

		    fi

		fi

		# Load the hardwaredriver
		if lsmod | grep -q ${HWMOD} ; then

		    true

		else

		    [ -f ${MODULEPATH}/${HWMOD}.o* ] \
		    && modprobe ${HWMOD} > /dev/null
		    #[ -f ${MODULEPATH}/${HWMOD}.o* ] \
		    #&& insmod ${HWMOD} $DRIVER_OPTS > /dev/null

		fi

                gprintf "Starting Linux Infrared Remote Control daemon:"

		OPTIONS=""
		[ -n "${DRIVER}" ] && OPTIONS="--driver=${DRIVER}"
		[ -n "${DEVICE}" ] && OPTIONS="${OPTIONS} --device=${DEVICE}"

                daemon /usr/local/sbin/lircd ${OPTIONS}

		RETVAL=$?
		[ ${RETVAL} -eq 0 ] && touch /var/lock/subsys/lircd

    	    else

                gprintf "Starting Linux Infrared Remote Control daemon:"
		failure

    	    fi

	    echo
	    ;;

  stop)	    # Stop daemons.
    	    if [ -f /var/lock/subsys/lircd ]; then

		gprintf "Stopping Linux Infrared Remote Control daemon:"

		killproc lircd

		rm -f /var/lock/subsys/lircd >/dev/null 2>&1

		# Unload the hardwaredriver
		if lsmod | grep -q ${HWMOD} ; then

		    #[ -f ${MODULEPATH}/${HWMOD}.o* ] && rmmod ${HWMOD} > /dev/null
		    [ -f ${MODULEPATH}/${HWMOD}.o* ] && modprobe -r ${HWMOD} > /dev/null

		fi

		echo

	    else

		gprintf "Stopping Linux Infrared Remote Control daemon:"
		failure
		echo
                exit 1

    	    fi
	    ;;

  status)   status lircd
	    ;;

  restart)  test -f /var/lock/subsys/irexec && RESTART_IREXEC=yes
	    test -n "${RESTART_IREXEC}" && /etc/rc.d/init.d/irexec stop

	    test -f /var/lock/subsys/lircmd && RESTART_LIRCMD=yes
	    test -n "${RESTART_LIRCMD}" && /etc/rc.d/init.d/lircmd stop

	    $0 stop
    	    $0 start

	    test -n "${RESTART_LIRCMD}" && /etc/rc.d/init.d/lircmd start
	    test -n "${RESTART_IREXEC}" && /etc/rc.d/init.d/irexec start
    	    ;;

  reload)   gprintf "Reloading Linux Infrared Remote Control daemon:"
	    killproc lircd -HUP
	    echo
	    ;;

  *)	    gprintf "$0 {start|stop|status|restart|reload}\n"
    	    exit 1
	    ;;

esac

exit ${RETVAL}

-------------- next part --------------
# Customized setings for lirc daemon

# The hardware driver to use, run lircd --driver=? for a list

#DRIVER=lirc_i2c

# Hardware driver module to load
HWMOD=lirc_i2c

# The device node that communicates with the IR device.

# with devfs enabled
DEVICE=/dev/lirc/0
#DEVICE=/dev/lirc/serial

# without devfs
#DEVICE=/dev/lirc

# Serial port for the receiver (for serial driver)
# COM1 (/dev/ttyS0)
#COM_PORT=/dev/ttyS0
#DRIVER_OPTS="irq=4 io=0x3f8"

# COM2 (/dev/ttyS1)
#COM_PORT=/dev/ttyS1
#DRIVER_OPTS="irq=3 io=0x2f8"

# COM3 (/dev/ttyS2)
#COM_PORT=/dev/ttyS2
#DRIVER_OPTS="irq=4 io=0x3e8

# COM4 (/dev/ttyS3)
#COM_PORT=/dev/ttyS3
#DRIVER_OPTS="irq=3 io=0x2e8"

-------------- next part --------------

probeall scsi_hostadapter ide-scsi
probeall usb-interface usb-uhci ehci-hcd
above snd-via82xx snd-pcm-oss
alias eth0 via-rhine
alias sound-slot-0 snd-via82xx

# NVIDIA
alias /dev/nvidia*   nvidia

# LIRC (adjust for proper module)
alias char-major-61 lirc_i2c
add above lirc_dev lirc_i2c

# PCTel WinModem
install ptserial /sbin/insmod -fs ptserial country_code=1
install pctel /sbin/insmod -fs pctel
alias char-major-62 ptserial
below ptserial pctel

# IVTV driver
alias char-major-81 videodev
alias char-major-81-0 ivtv
options ivtv ivtv_debug=1 mpg_buffers=100 yuv_buffers=0
options tuner type=2
options msp3400 once=1 simple=1 standard=0x20
#add above ivtv msp3400 saa7115 tuner lirc_dev lirc_i2c
add below ivtv msp3400 saa7115 tuner
#add above ivtv lirc_dev lirc_i2c



More information about the mythtv-users mailing list