[ltp] IR on TP (600 specifically)

Dirk Husemann linux-thinkpad@www.bm-soft.com
10 Sep 1999 16:19:08 +0200


--=-=-=

Leif,

>>>>> "LJ" == Leif Jonsson <Leif.von.Jonsson@era-t.ericsson.se> writes:

    LJ> Henk Hesselink wrote:
    >> 
    >> Hi Leif,
    >> 
    >> The tcsetattr problem can be caused by an interrupt conflict.  Check out the
    >> interrupt for ttyS1 with setserial and then make sure that it is excluded in
    >> the /etc/pcmcia/config.opts file and that there are no other
    >> conflicts.

Yep, I forgot about that one. Sorry.

    LJ> That got me a bit further on the way, now I get tcsetattr:
    LJ> Input/Output error later on.  Which of course indicates some more
    LJ> conflicts... this in turn makes me wonder...  is it possible to
    LJ> have sound, net (via pc card), serial port and ir all togeather or
    LJ> is there not enough system resources for this, and if it is
    LJ> possible could someone give me a pointer on how to achieve this?
    LJ> Basically I can skip the parallell port. =)

But you DO see two ttyXY messages during boot up, do you?
What do "setserial /dev/ttyS0" and "setserial /dev/ttyS1" report?

I've also attached my /etc/rc.d/init.d/irda startup script (which just
calls irmanager -d1).


--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=irda
Content-Description: /etc/rc.d/init.d/irda startup file

#!/bin/sh
#
# named           Start up and configure IrDA.
#
# chkconfig: 345 75 25
# description: Starts up the IrDA support.

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

# Source networking configuration.
. /etc/sysconfig/network

[ -f /usr/sbin/irmanager ] || exit 0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting irmanager: "
        daemon irmanager -d1
        echo
        touch /var/lock/subsys/irmanager
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down irmanager: "
        killproc irmanager
        rm -f /var/lock/subsys/irmanager
        echo
        ;;
  status)
	status irmanager
	exit $?
	;;
  restart)
	$0 stop
	$0 start
	exit $?
	;;
  
  *)
        echo "Usage: named {start|stop|status|restart}"
        exit 1
esac

exit 0

--=-=-=


Then, I've got /etc/irda/drivers:


--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=drivers
Content-Description: /etc/irda/drivers

#! /bin/sh
#
# drivers
#
# Initialize and shutdown IrDA device drivers.
#
# This script should be invoked with two arguments.  The first is the
# action to be taken, either "start", "stop", or "restart".
#

action=$1
device=$2

case "${action:?}" in
'start')
	irattach /dev/ttyS1          # The second serial port is an IrDA port
	setserial /dev/ttyS1 spd_vhi
	setserial /dev/irnine spd_vhi
    ;;
'stop')
	killall irattach             # ... or something. Currently not used
    ;;
'restart')
	/sbin/ifconfig ${device:?} down up
    ;;
esac

--=-=-=


Let's know what the setserial stuff reports.

        Dirk

-- 
Dr. Dirk Husemann                Phone      +41 1 724 8573
IBM Research Division            FAX        +41 1 724 8953
IBM Zurich Research Laboratory   Email      hud@zurich.ibm.com
Saeumerstrasse 4                 WWW:       http://www.zurich.ibm.com/~hud/
CH-8803 Rueschlikon              GPG:       http://www.zurich.ibm.com/~hud/GPG/
Switzerland                      PGP:       http://www.zurich.ibm.com/~hud/PGP/

--=-=-=--