|
From: Aubrey W. <rh...@al...> - 2009-01-22 17:42:19
|
Hi,
The basic problem I'm having is that it often takes two keypresses on my remote to get the system to respond. I'm using mythbuntu 8.10 AMD64, lirc 0.8.4a (compiled from source) and an Antec Veris Fusion 430 case which has an integrated iMON IR/LCD receiver, identified in lsmod as:
Bus 001 Device 003: ID 15c2:ffdc SoundGraph Inc. iMON PAD Remote Controller
For my remote I'm using a Logitech Harmony 880 acting as a Windows MCE remote, inter-key delay 300ms, inter-device delay 100ms, repeat 0.
Looking at the output of mode2 (below), the receiver is seeing each keypress as two events, which I understand is one for button-press and one for button-release, all normal. Holding down a button repeats the command as it should.
IRW on the other hand, reflects the behavior that is giving me fits. Pressing a button once has no effect, pressing it twice registers a 00, 01 pair (button-down, button-up). Holding down a button on the first press displays nothing in irw, but if held down on the second press it will repeat as it should.
I tried loading /remotes/generic/RC-5, RC-6, and RESC80 via irrecord then restarting /etc/init.d/lirc and all allowed irw to receive commands, but all exhibited the "two-button-presses required" problem.
Here is the /dev/lirc* output showing the devices.
dorkbot@DB5K01:/var/log$ ls -la /dev/lirc*
crw-rw---- 1 root root 61, 0 2009-01-21 20:22 /dev/lirc0
srw-rw-rw- 1 root root 0 2009-01-21 20:22 /dev/lircd
Next I installed the latest build from CVS (1/21/2009) with iMON IR/LCD driver and debugging enabled. After installing latest CVS build, /etc/init.d/lirc will load without errors, but when I run mode2 I get the following results:
dorkbot@DB5K01:/var/log$ sudo mode2 -d /dev/lirc0 --raw
This program is only intended for receivers supporting the pulse/space layer.
Note that this is no error, but this program simply makes no sense for your
receiver.
In order to test your setup run lircd with the --nodaemon option and
then check if the remote works with the irw tool.
dorkbot@DB5K01:/var/log$ sudo mode2 -d /dev/lirc0
mode2: could not get hardware features
mode2: this device driver does not support the new LIRC interface
mode2: make sure you use a current version of the driver
I also want to provide the output of irrecord in DEBUG mode as requested but don't know if there is a switch I need, but as of upgrading to the latest CVS irrecord won't work as it did above with any of the lircd.conf files that worked before: RC-5, RC-6, RESC80, mceusb, antec.veris.
I'm willing to try anything, want to understand lirc and I'm highly motivated to figure this out. Your help and experience are very much appreciated.
Phil/TW
Supporting data below:
output of mode2 using lirc 0.8.4a
dorkbot@DB5K01:~$ sudo mode2 -d /dev/lirc0 --raw
code: 0x41557d55 #came up right away with no buttons pressed
code: 0x800f841e #button down
code: 0x800f841e #button up
code: 0x800f041e
code: 0x800f041e
code: 0x800f841f #a series of repeats
code: 0x800f841f
code: 0x800f041f
code: 0x800f041f
code: 0x800f841f
code: 0x800f841f
code: 0x800f041f
code: 0x800f041f
code: 0x800f841f
code: 0x800f841f
code: 0x800f041f
code: 0x800f041f
code: 0x800f841f
code: 0x800f841f
code: 0x800f0421
code: 0x800f0421
code: 0x800f0420
code: 0x800f0420
code: 0x800f8422
code: 0x800f8422
output of irw in lirc 0.8.4a, not most commands required 2 button presses to generate 00, 01 sequences
dorkbot@DB5K01:~$ sudo irw
00000000800f841e 00 up /etc/lirc/lircd.conf.conf
00000000800f841e 01 up /etc/lirc/lircd.conf.conf
00000000800f841e 00 up /etc/lirc/lircd.conf.conf
00000000800f841e 01 up /etc/lirc/lircd.conf.conf
00000000800f841e 00 up /etc/lirc/lircd.conf.conf
00000000800f841e 01 up /etc/lirc/lircd.conf.conf
00000000800f841e 02 up /etc/lirc/lircd.conf.conf
00000000800f841e 00 up /etc/lirc/lircd.conf.conf
00000000800f841e 01 up /etc/lirc/lircd.conf.conf
00000000800f0421 00 right /etc/lirc/lircd.conf.conf
00000000800f0421 01 right /etc/lirc/lircd.conf.conf
00000000800f8420 00 left /etc/lirc/lircd.conf.conf
00000000800f8420 01 left /etc/lirc/lircd.conf.conf
00000000800f041f 00 down /etc/lirc/lircd.conf.conf
00000000800f041f 01 down /etc/lirc/lircd.conf.conf
00000000800f041f 02 down /etc/lirc/lircd.conf.conf
00000000800f041f 00 down /etc/lirc/lircd.conf.conf
00000000800f041f 01 down /etc/lirc/lircd.conf.conf
00000000800f041f 00 down /etc/lirc/lircd.conf.conf
00000000800f041f 01 down /etc/lirc/lircd.conf.conf
00000000800f841e 00 up /etc/lirc/lircd.conf.conf
00000000800f841e 01 up /etc/lirc/lircd.conf.conf
00000000800f8422 00 ok /etc/lirc/lircd.conf.conf
00000000800f8422 01 ok /etc/lirc/lircd.conf.conf
00000000800f8422 00 ok /etc/lirc/lircd.conf.conf
00000000800f8422 01 ok /etc/lirc/lircd.conf.conf
00000000800f8422 00 ok /etc/lirc/lircd.conf.conf
00000000800f8422 01 ok /etc/lirc/lircd.conf.conf
00000000800f841e 00 up /etc/lirc/lircd.conf.conf
00000000800f841e 01 up /etc/lirc/lircd.conf.conf
00000000800f0421 00 right /etc/lirc/lircd.conf.conf
00000000800f0421 01 right /etc/lirc/lircd.conf.conf
00000000800f0421 02 right /etc/lirc/lircd.conf.conf
00000000800f8422 00 ok /etc/lirc/lircd.conf.conf
00000000800f8422 01 ok /etc/lirc/lircd.conf.conf
00000000800f8422 02 ok /etc/lirc/lircd.conf.conf
00000000800f8420 00 left /etc/lirc/lircd.conf.conf
00000000800f8420 01 left /etc/lirc/lircd.conf.conf
00000000800f0421 00 right /etc/lirc/lircd.conf.conf
00000000800f0421 01 right /etc/lirc/lircd.conf.conf
00000000800f0421 02 right /etc/lirc/lircd.conf.conf
00000000800f0421 03 right /etc/lirc/lircd.conf.conf
00000000800f0421 04 right /etc/lirc/lircd.conf.conf
00000000800f0421 05 right /etc/lirc/lircd.conf.conf
dorkbot@DB5K01:/usr/src/lirc/lirc$ lsusb
Bus 003 Device 002: ID 0a91:3801 Globlink Technology, Inc. Targus PAKP003 Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 15c2:ffdc SoundGraph Inc. iMON PAD Remote Controller
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
lirc script
#! /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=$TRANSMITTER_DEVICE $TRANSMITTER_ARGS"
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/local/sbin/lircd || exit 0
test -f /usr/local/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/local/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/local/sbin/lircd $TRANSMITTER_LIRCD_ARGS < /dev/null
fi
elif [ ! -z "$TRANSMITTER_LIRCD_ARGS" ]; then
start-stop-daemon --start --quiet --exec /usr/local/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/local/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/local/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/local/sbin/lircd
log_end_msg $?
fi
;;
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
#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
output of lsmod
dorkbot@DB5K01:/var/log$ lsmod
Module Size Used by
nls_cp437 15232 2
cifs 279696 2
af_packet 29568 2
rfcomm 51104 0
sco 20612 2
bridge 64544 0
stp 11268 1 bridge
bnep 23168 2
l2cap 33280 6 rfcomm,bnep
bluetooth 70820 6 rfcomm,sco,bnep,l2cap
nfsd 287016 13
auth_rpcgss 53024 1 nfsd
exportfs 13568 1 nfsd
ppdev 16904 0
ipv6 314312 29
pci_slot 13704 0
video 28948 0
output 11776 1 video
container 12288 0
sbs 22288 0
sbshc 14592 1 sbs
battery 21128 0
nfs 308144 0
lockd 81232 2 nfsd,nfs
nfs_acl 11776 2 nfsd,nfs
sunrpc 229608 13 nfsd,auth_rpcgss,nfs,lockd,nfs_acl
iptable_filter 11520 0
ip_tables 28176 1 iptable_filter
x_tables 31752 1 ip_tables
xfs 575376 1
ac 13448 0
sbp2 32652 0
parport_pc 44200 0
lp 19588 0
parport 50096 3 ppdev,parport_pc,lp
snd_hda_intel 551124 1
snd_pcm_oss 52256 0
snd_mixer_oss 25088 1 snd_pcm_oss
snd_pcm 98824 2 snd_hda_intel,snd_pcm_oss
snd_page_alloc 18576 2 snd_hda_intel,snd_pcm
joydev 20736 0
snd_hwdep 17160 1 snd_hda_intel
lirc_imon 26252 0
serio_raw 14596 0
snd_seq_dummy 11652 0
evdev 20512 7
lirc_dev 22216 1 lirc_imon
nvidia 8115592 36
snd_seq_oss 43648 0
psmouse 51612 0
pcspkr 11136 0
i2c_core 36128 1 nvidia
wmi 15808 0
snd_seq_midi 15808 0
snd_rawmidi 34080 1 snd_seq_midi
snd_seq_midi_event 16768 2 snd_seq_oss,snd_seq_midi
snd_seq 67744 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 33424 2 snd_pcm,snd_seq
snd_seq_device 16660 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd 81992 13 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_hwdep,snd_seq_dummy,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 16800 1 snd
button 15904 0
shpchp 42140 0
pci_hotplug 39472 1 shpchp
ext3 150544 1
jbd 66472 1 ext3
mbcache 17924 1 ext3
sr_mod 24644 0
cdrom 47784 1 sr_mod
sd_mod 45864 4
crc_t10dif 10240 1 sd_mod
usbhid 39776 0
hid 59072 1 usbhid
sg 45408 0
ahci 43148 3
libata 200160 1 ahci
ohci1394 41524 0
ehci_hcd 48908 0
scsi_mod 183160 5 sbp2,sr_mod,sd_mod,sg,libata
ieee1394 110592 2 sbp2,ohci1394
ohci_hcd 34972 0
forcedeth 68112 0
dock 18464 1 libata
usbcore 175376 5 lirc_imon,usbhid,ehci_hcd,ohci_hcd
thermal 27424 0
processor 47800 1 thermal
fan 13576 0
fbcon 51200 0
tileblit 11264 1 fbcon
font 17152 1 fbcon
bitblit 14592 1 fbcon
softcursor 10496 1 bitblit
fuse 68288 1
compcache 13808 1
lzo_decompress 11264 1 compcache
lzo_compress 11264 1 compcache
tlsf 15392 1 compcache
|