[ltp] lirc with TP770

Andrew Gaffney linux-thinkpad@linux-thinkpad.org
Thu, 08 Jul 2004 22:45:37 -0500


Between last night and this afternoon, I was able to get lirc mostly working on 
my Thinkpad 770. I've programmed 2 remotes into it and have linked it up with 
XMMS. Since I've got serial support built into my kernel (and I'm too lazy to 
switch it to a module, even though I've recompiled my kernel 3 times since 
yesterday), when I boot, I have to run the following from a startup script:

setserial /dev/ttyS1 uart none
modprobe lirc_sir
lircd -d /dev/lirc/lirc0 ...
irexec -d

I'm having some troubles with sending IR signals, though. When I send a signal 
to my TV (8-10 feet away) with the command 'irsend send_once MAGNAVOX Power', it 
only gets through about 1/10 of the time, even in a dark room. Is there a very 
limited range on the rear IR port? I've also tried facing the front/bottom IR 
port towards the TV with the same results. Has anyone else run into this?

Also, does anyone have any nifty IR mappings that they've done? I whipped up a 
script to halt my laptop if I hit the power button on my TV remote twice within 
4 seconds.

/root/ir/shutdown
=================
#!/bin/bash

if [ -e /tmp/irshutdown ]; do
   echo "Halting system"
   halt
else
   echo "Power button hit 1 time"
   touch /tmp/irshutdown
   sleep 4
   rm /tmp/irshutdown
fi

I have irexec set to run '/root/ir/shutdown &' when the power button is pressed. 
It seems to work great.

-- 
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.
636-357-1548