PDA

View Full Version : 8.10, lircrc generator makes empty files



mathog
January 21st, 2009, 06:02 PM
Mythbuntu 8.10. Lirc is configured for a Sony universal remote RM_VL600 (code 8201, for a Sony TV), lircd.conf exists, and irw shows that all keys function.

With lirc up and running, when mythbuntu-lircrc-generator runs it creates a bunch of essentially empty files (just some comment lines), one each for xine, mythtv, etc. I poked around in the code a bit, found the strings it was trying to match for key names, and set the key names in lircd.conf to be exactly that. Again, it made another set of empty files.

Suggestions?

mathog
January 22nd, 2009, 11:43 PM
On looking through the python code, I think I see the problem. In core.py there is:

if re.compile("begin codes").search(line) is not None:

but not anything about "raw_codes". The lircd.conf I have was made with irrecord and contains raw_codes, not codes. When I can get into the system again I will try converting the lircd.conf into a fake_lircd.conf, to change format from:


begin raw_codes:
name keyname
xxx xxx xxx
end raw_codes

to


begin codes
keyname xxxx
end codes

I bet mythbuntu-lircrc-generator will work then.

This script really should know that a lircd.conf can have raw_codes in it!
Since the string "raw" seems to appear nowhere in the package, apparently it does not.

mathog
January 23rd, 2009, 05:59 AM
This is the sort of thing that gives linux a bad name. Anyway, 2 steps forward, 1 step back. (Better than the other way around.)

Here is my initial lircd.conf, made with the irrecord (0.5) which comes with Mythbuntu 8.10.



# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.3(udp) on Mon Jan 19 20:19:44 2009
#
# contributed by. David Mathog
# generated 19 January, 2009
#
# brand: Sony
# model no. of remote control: RM-VL600
# devices being controlled by this remote: MythTV DVR.
# Tape key with code 8201
#
# This code lets all keys on the RM-VL600 emit a distinct signal.
# Names chosen for compatibility with mythbuntu-lircrc-generator
#

begin remote

name RM-VL600_8201
flags RAW_CODES|CONST_LENGTH
eps 30
aeps 100

ptrail 0
repeat 0 0
gap 44624

begin raw_codes

name one
2380 610 610 610 549 610
549 671 549 610 610 549
610 610 610 549 1159 671
549 610 610 610 549 610
610

name two
2380 610 1220 549 610 610
549 610 549 671 549 610
610 610 549 610 1220 610
549 610 610 610 549 610
488

name three
2380 671 549 610 1159 671
549 671 488 610 549 671
549 610 549 671 1159 671
488 671 549 610 549 671
488

name four
2319 732 1098 671 1098 671
610 549 610 610 549 610
610 610 549 671 1098 671
549 610 610 610 549 610
549

name five
2380 549 610 610 549 671
1159 610 488 671 549 671
549 610 549 671 1098 671
549 671 488 671 549 671
488

name six
2380 549 1281 549 549 610
1220 610 610 549 610 610
610 549 610 610 1098 671
610 549 671 549 610 610
549

name seven
2319 732 427 671 1159 610
1159 671 488 671 610 610
488 671 549 671 1098 671
549 610 549 671 549 610
549

name eight
2319 610 1159 610 1159 610
1220 610 549 671 549 610
488 732 488 671 1159 671
488 671 549 610 610 610
549

name nine
2319 610 610 671 488 671
549 610 1159 671 488 671
488 671 549 671 1098 671
549 671 549 610 549 671
488

name period
2380 549 1220 549 671 549
1159 671 1220 549 1220 549
610 610 549 610 1159 610
1159 671 1159 610 549 610
1281 549 549 610 610 610
1220

name zero
2441 549 1159 610 610 549
610 610 1220 549 671 549
610 610 549 610 1159 671
549 610 549 610 610 671
488

name enter
2319 610 1220 610 1098 671
610 549 1159 671 549 671
488 671 610 610 1098 671
549 671 549 610 549 610
549

name vol+
2319 732 427 671 1159 610
610 610 488 671 1281 488
610 610 549 671 1159 549
610 610 671 488 671 488
671

name vol-
2441 549 1220 549 1220 610
610 549 610 610 1159 610
610 549 610 610 1220 549
610 610 610 549 610 610
610

name chan+
2441 610 549 610 610 549
610 610 610 610 1159 549
671 549 610 549 1220 610
610 549 610 610 610 549
610

name chan-
2380 610 1159 610 549 610
549 671 549 610 1220 610
549 671 488 671 1159 671
549 610 549 671 549 610
488

name digitalanalog
2441 549 610 610 1159 610
610 549 1220 610 610 549
1220 610 549 610 1220 610
549 610 610 610 549 610
610

name twinview
2441 549 1220 610 1159 610
1220 549 610 610 1220 549
1220 549 1220 610 610 549
610 610 1159 610 610 549
610 610 1220 549 610 610
1220

name sleep
2380 610 610 549 1220 549
1281 549 549 610 1220 549
1281 549 610 549 1220 610
610 549 610 610 610 549
610

name info
2380 610 549 610 1159 610
610 610 1159 610 1220 549
1220 610 610 549 1220 610
610 549 610 610 610 549
610

name mute
2380 610 549 610 610 610
1159 610 549 610 1220 610
610 549 610 610 1159 610
610 549 610 610 610 549
610

name replay
2441 549 1220 549 1220 549
610 610 1159 671 1159 610
1159 610 610 549 1220 610
610 549 610 610 610 549
610

name guide
2319 610 610 610 1159 610
1220 549 1220 610 610 549
671 488 610 610 1220 610
610 549 610 610 549 610
610

name menu
2441 610 610 549 610 610
549 610 610 610 549 610
1220 549 1220 549 1220 610
610 610 549 610 610 610
610

name exit
2441 549 1220 549 1220 610
610 549 610 610 610 549
1220 549 1220 610 1159 610
610 610 610 549 610 610
610

name tools
2380 671 549 549 1220 610
1220 549 610 549 1281 610
1159 549 610 610 1159 610
1220 549 1281 488 671 549
1220 549 732 488 610 610
1220

name up
2319 671 549 610 610 610
1098 671 549 610 1159 610
1220 610 1220 549 1220 549
610 610 610 549 610 610
610

name left
2441 549 610 610 610 549
1159 671 610 549 1220 549
1159 671 549 671 1159 610
549 610 610 610 549 610
549

name down
2380 610 1159 610 610 610
1159 610 549 610 1159 671
1159 610 1220 549 1220 610
549 610 610 610 549 610
610

name right
2380 610 1159 610 1159 610
610 610 610 549 1220 610
1159 610 610 549 1220 610
549 610 610 610 610 549
610

name ok
2380 549 1220 610 610 549
1220 610 549 610 610 549
1220 610 1159 671 1159 610
549 610 610 610 549 610
610

name rewind
2380 610 549 610 610 610
610 549 610 610 549 610
610 610 1159 610 1220 549
610 610 549 610 610 610
610

name play
2441 549 1159 610 610 610
610 610 549 610 549 610
610 610 1159 610 1220 549
610 610 610 549 671 549
610

name forward
2380 610 610 610 1220 549
610 610 549 610 610 610
549 610 1159 610 1220 610
549 610 610 610 549 610
610

name record
2441 610 1220 549 1159 610
1220 549 671 549 610 549
671 549 1159 610 1220 610
610 549 610 610 549 610
610

name stop
2380 610 610 610 549 610
610 610 1159 610 610 610
549 610 1159 610 1220 610
610 549 610 610 610 549
610

name pause
2380 610 1159 610 610 549
610 610 1159 610 610 610
549 610 1220 610 1159 610
610 549 610 610 610 549
610


end raw_codes

end remote


Current versions of irrecord have an "-a" switch that converts this to the fixed length format. Unfortunately that option is not present in Mythbuntu 8.10's irrecord, so I had to build a new one. Downloaded a newer version:

wget http://prdownloads.sourceforge.net/lirc/lirc-0.8.4a.tar.bz2
bunzip2 lirc*bz2
tar -xf lirc*tar
cd lirc-0.8.4a
./configure #had it put together make files
make
cd ..
lirc-0.8.4a/daemons/irrecord -a lircd.conf >foo
nedit foo #make a few minor edits, described below


#
# this config file was automatically generated
# using lirc-0.8.4a(emulation) on Thu Jan 22 20:08:24 2009
#
# contributed by. David Mathog
#
# brand: Sony
# model no. of remote control: RM-VL600
# devices being controlled by this remote:
# key code 8201 assigned to "tape key"
#
# generated from raw_codes this way:
# lirc-0.8.4a/daemons/irrecord -a lircd_test.conf
# then manually add the 3 keys on the bottom, whose decoding failed.
#

begin remote

name RM-VL600_8201
bits 12
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100

header 2384 589
one 1190 604
zero 582 604
gap 44624
toggle_bit_mask 0x0

begin codes
one 0x010
two 0x810
three 0x410
four 0xC10
five 0x210
six 0xA10
seven 0x610
eight 0xE10
nine 0x110
zero 0x910
enter 0xD10
vol+ 0x490
vol- 0xC90
chan+ 0x090
chan- 0x890
digitalanalog 0x550
sleep 0x6D0
info 0x5D0
mute 0x290
replay 0xDD0
guide 0x710
menu 0x070
exit 0xC70
up 0x2F0
left 0x2D0
down 0xAF0
right 0xCD0
ok 0xA70
rewind 0x030
play 0x830
forward 0x430
record 0xE30
stop 0x130
pause 0x930
#
# these did not translate, so put in fake entries
#
period 0x666
twinview 0x667
tools 0x668
end codes

end remote



Finally, build the .lircrc files with:

mythbuntu-lircrc-generator -L foo

And this time, they built. Yeah! There are a few keys in lircd.conf
which are not mapped to anything, but I can edit those in later.

Here is where we take the one step back.

Restart lircd (using the original raw_codes lircd.conf so that all
keys will be available)
Restart mythfrontend

Test the remote...

It works in Mythtv, but there is a one second delay before anything happens. For instance, press a down arrow key, and one second later the next menu item down is highlighted. There is no such delay with the keyboard. One second is an unacceptably long delay for remote control - to get down a list of 5 entries takes 4 seconds, hitting more keys is unreliable because a variable number of events will occur and at the end the cursor may be anywhere in the list.

Any idea where the 1 second delay is coming from?

irw has no delays between key presses and logging those events.

Here is a snippet of ~/.lircrc/mythtv


begin
remote = RM-VL600_8201
prog = mythtv
button = down
config = Down
repeat = 0
delay = 0
end


Nothing obvious in there (to me) to indicate a 1 second delay. I tried setting repeat to 7 and the 1 second delay did not change.

barney_1
February 7th, 2009, 06:28 PM
Any luck with this one? I'm also using the RM-VL600 remote and am looking for an lircd.conf setup that is tuned up to work well.