[mythtv-users] Using devinput but devinput lircd.conf file does not contain all my remote buttons on Harmony One

Jarod Wilson jarod at wilsonet.com
Wed Jun 8 17:48:38 UTC 2011


On Jun 8, 2011, at 1:09 AM, Gabe Rubin wrote:

> On Tue, Jun 7, 2011 at 9:14 PM, Jarod Wilson <jarod at wilsonet.com> wrote:
>> On Jun 7, 2011, at 6:03 PM, Gabe Rubin wrote:
>> 
>>> On Mon, Jun 6, 2011 at 8:22 PM, Jarod Wilson <jarod at wilsonet.com> wrote:
>>>> On Jun 5, 2011, at 5:13 PM, Gabe Rubin wrote:
>>>> 
>>>>> On Sun, Jun 5, 2011 at 2:08 PM, Gabe Rubin <gaberubin at gmail.com> wrote:
>>>>>> On Sun, Jun 5, 2011 at 7:09 AM, Jarod Wilson <jarod at wilsonet.com> wrote:
>>>>>>> On Jun 4, 2011, at 6:34 PM, Gabe Rubin wrote:
>>>>>>> 
>>>>>>>> Hi list,
>>>>>>>> 
>>>>>>>> I have figured out how to transition from lirc_i2c to ir-kbd-i2c using
>>>>>>>> Fedora 14.  However, the /usr/share/lirc-remotes/devinput/lircd.conf
>>>>>>>> file does not contain codes for every button on my Harmony One (set up
>>>>>>>> as a MythTVKnoppMyth from the Harmony database).  How do I figure out
>>>>>>>> what the codes for these buttons are so I can modify the lircd.conf
>>>>>>>> file.  Or is there another remote I should set my Harmony up as?  I am
>>>>>>>> using the IR receiver from my PVR-350 card.
>>>>>>> 
>>>>>>> modprobe ir-kbd-i2c debug=1
>>>>>>> 
>>>>>>> Then look in dmesg for stuff along the lines of "ir hauppauge (rc5): ..."
>>>>>>> which should contain the raw signal data. Assuming that remote profile
>>>>>>> has more in it than just the Hauppauge remote's keys, the keytable for
>>>>>>> the driver needs to be extended. Verify you're getting stuff in dmesg for
>>>>>>> those additional keys, and I can try to walk you through extending the
>>>>>>> keytable as needed.
>>>>>>> 
>>>>>> 
>>>>>> Thanks for the help.  There are 11 keys on my remote that are not
>>>>>> mapped in the lircd.conf file and I get no output for when using irw.
>>>>>> 
>>>>>> When I press them, I do get something in my dmesg.  Here is the dmesg
>>>>>> output for the keys that get no response in irw:
>>>>>> 
>>>>>> 
>>>>>> [936266.419959] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t0 dev=30 code=10
>>>>>> [936267.619954] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t1 dev=30 code=27
>>>>>> [936268.621952] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t0 dev=30 code=31
>>>>>> [936270.022946] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t1 dev=30 code=20
>>>>>> [936270.923949] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t0 dev=30 code=37
>>>>>> [936271.323946] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t1 dev=30 code=21
>>>>>> [936272.124948] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t0 dev=30 code=22
>>>>>> [936272.524945] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t1 dev=30 code=23
>>>>>> [936275.827947] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t0 dev=30 code=52
>>>>>> [936276.127948] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t1 dev=30 code=41
>>>>>> [936453.703960] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t1 dev=30 code=56
>>>>>> 
>>>>>> Not sure how to translate this information into syntax for my
>>>>>> lircd.conf file (or if I need to do something else).
>>>>>> 
>>>>>> Again, thanks for the help.
>>>>>> 
>>>>> I just realized, there are also 5 buttons on the remote's touchscreen
>>>>> that shows up in demsg but not irw.  Here is the output in dmesg for
>>>>> those:
>>>>> 
>>>>> [936592.054938] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t0 dev=30 code=28
>>>>> [936612.056075] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t1 dev=30 code=24
>>>>> [936624.269950] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t0 dev=30 code=26
>>>>> [936632.776960] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t1 dev=30 code=14
>>>>> [936641.785956] ir-kbd-i2c: ir hauppauge (rc5): s1 r1 t0 dev=30 code=25
>>>> 
>>>> Okay, if you haven't already, yum install v4l-utils, then edit /etc/rc_keymaps/haupp,
>>>> and add 0x30xx KEY_WHATEVER lines for each of those keys (where "WHATEVER" needs to
>>>> line up with key names in /usr/include/linux/input.h and the devinput lircd.conf),
>>>> then run 'ir-keytable -a', and I *think* you should be good to go. That will tell
>>>> ir-keytable to upload the modified/extended keytable into the kernel for ir-kbd-i2c
>>>> to use for scancode to keycode mapping.
>>> 
>>> OK, so to confirm that I am doing this correctly, I should look in
>>> /usr/include/linux/input.h to find out what the KEY_WHATEVER name is
>>> and then edit /etc/rc_keymaps/haupp to add that.  For example, they
>>> key that generates a code of 28 in dmesg, I see in the input.h file
>>> that:
>>> #define KEY_ENTER               28
>> 
>> The code from the remote and the defines in input.h aren't in any way directly
>> related. If the button that generates code 28 is rewind, map it to KEY_REWIND.
>> 
>> However... I just realized that I missed a conversion step. 30 is base 10, the
>> values in the config are hex. 30 -> 0x1e. Same decimal to hex conversion needs
>> to be done for the code values as well.
>> 
>> 
>>> So I should enter 0x30xx KEY_ENTER in the haupp file?  (are the xx in
>>> that line variables or should it read exactly that?)
>> 
>> 'dev=30 code=28' in dmesg for the button labeled rewind -> '0x1e1c KEY_REWIND'
>> in the haupp file.
> 
> 
> OK, I converted the values for the 16 keys to hexidecimal.  I am not
> sure about dev=30 code=14 (is that 0x1e0e?).

Yes, that's correct.

> It turns out that all
> are already in haupp file (with the exception of dev=30 code=14,
> unless that is 0x1e0e).

You sure? The haupp file I'm looking at over here only has 0x1fxx
variants of the keys. Should be expanded in v4l-utils 0.8.4, I believe,
but what I'm looking at is from what I believe is the current latest
package in fedora 15... (There was a bit of churn with the hauppauge
config files, as there were several different ones, all actually more
or less the same, but some with device in the scancode, some without,
and they're finally merged together in the latest v4l/dvb code).


> So I am not sure why I don't see those when I
> run irw.  Do I need to execute "ir-keytables -a first even though I
> made no changes?  If so, what is the exact syntaxt, because I get
> errors when I run that command:
> [root at localhost lirc]# ir-keytable -a /etc/rc_keymaps/haupp

Just 'ir-keyable -a', nothing else. Its supposed to use /etc/rc_maps.cfg
to auto-determine which keytable file to upload. You can also try an
explicit 'ir-keytable -c -w /etc/rc_keymaps/haupp'.


-- 
Jarod Wilson
jarod at wilsonet.com





More information about the mythtv-users mailing list