View Full Version : [LINUX] IR Remote
Hello everybody, this my first post on this forum, I hope it will not the last one.
I just installed XBMC on my Debian laptop and that great!
I have a Pinnacle PCTV 72e USB TV receiver with a remote control. When I plug the USB, the only things that works is the volume up/down and the mute function.
I want to use it with XBMC, to forward/backward songs and pictures, is it posible to do that?
I am new on this. The remote has not a lot of buttons, but it will enougth to start.
Has anyone this remote working? What and where I must configure it?
Thanks for all and regards.
Have you tried the steps outlined here? (http://xbmc.org/forum/showthread.php?t=39183)
I have also found this one (http://xbmc.org/forum/showthread.php?t=45972) to be useful.
Oh!!! Thank you very much!!! It works!
I have a little problem, when I push a button it makes two steps, when I am on Videos and I want to go to Music (just above), I push the "down" button and it jump to Pictures (two jumps), so it is impossible to go to Music. It looks like it makes a double-push.
This is my configuration files:
$ cat /etc/lirc/lircd.conf
begin remote
name Pinnacle_72e
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0x1
gap 251982
toggle_bit_mask 0x80000000
begin codes
Mute 0x0071
Menu 0x008B
Shutdown 0x0074
VolUp 0x0073
VolDown 0x0072
ChannelUp 0x0192
ChannelDown 0x0193
1 0x0002
2 0x0003
3 0x0004
4 0x0005
5 0x0006
6 0x0007
7 0x0008
8 0x0009
9 0x000A
0 0x000B
FullScreen 0x0177
Text 0x0184
Back 0x00A8
Play 0x00CF
Ford 0x00D0
Record 0x00A7
Stop 0x0080
Help 0x00DF
end codes
end remote
$ cat .xbmc/userdata/Lircmap.xml
<lircmap>
<remote device="Pinnacle_72e">
<left>4</left>
<right>6</right>
<up>2</up>
<down>8</down>
<select>5</select>
<back>Menu</back>
</remote>
</lircmap>
$ cat .xbmc/userdata/Keymap.xml
<keymap>
<global>
<remote>
<left>Left</left>
<right>Right</right>
<up>Up</up>
<down>Down</down>
<select>Select</select>
<back>PreviousMenu</back>
</remote>
</global>
</keymap>
Where I can find all XBMC remote commands?
It is possible to use same button to different actions in different menus? For example, in Videos the play button will play a movie, and in Pictures the play buttons will start slideshow.
Thanks for all!
You may want to try adding a "repeat" variable to your lircd.conf file to see if that helps. Found this (http://ubuntu.bryanludvigsen.com/?p=211) on Google with a little more info.
I have a little problem, when I push a button it makes two steps, when I am on Videos and I want to go to Music (just above), I push the "down" button and it jump to Pictures (two jumps), so it is impossible to go to Music. It looks like it makes a double-push.
I'm not sure, but I think there is an option in the advanced settings config file which lets you control this behaviour.
You may want to try adding a "repeat" variable to your lircd.conf file to see if that helps. Found this (http://ubuntu.bryanludvigsen.com/?p=211) on Google with a little more info.
Unfortunately this does not work. You can't use a repeat option in the lircd.conf file. XBMC ignores this information as it uses a different way to map LIRC buttons to XBMC actions.
Where I can find all XBMC remote commands?
Follow the links in my howto: http://xbmc.org/forum/showthread.php?t=45972
All XBMC actions are listed on the wiki.
It is possible to use same button to different actions in different menus? For example, in Videos the play button will play a movie, and in Pictures the play buttons will start slideshow.
Yes, check the default Keymap.xml, it contains many examples. Depending on your installation it should be located in:
/usr/share/xbmc/system/Keymap.xml
OR
/usr/local/share/xbmc/system/Keymap.xml
I'm not sure, but I think there is an option in the advanced settings config file which lets you control this behaviour.
Unfortunately this does not work. You can't use a repeat option in the lircd.conf file. XBMC ignores this information as it uses a different way to map LIRC buttons to XBMC actions.
Follow the links in my howto: http://xbmc.org/forum/showthread.php?t=45972
All XBMC actions are listed on the wiki.
Yes, check the default Keymap.xml, it contains many examples. Depending on your installation it should be located in:
/usr/share/xbmc/system/Keymap.xml
OR
/usr/local/share/xbmc/system/Keymap.xml
Not trying to dispute, just understand.
My thinking is that if LIRC were to ignore repeat inputs, and produce a single output for those, wouldn't that still be a single input to XBMC via the Lircmap.xml?
i.e. one button press on the remote -> three IR pulses from the remote to IR Reciever -> LIRC reads three IR pulses and ignores two -> LIRC outputs a single IR command -> Lircmap.xml sees a single IR command -> Keymap.xml translates into XBMC
The "repeat" variable seemed the best to accomplish that, but I may be missing the boat on something.
While on the topic, thanks so much for your guide too. It is most useful and very well laid out.
My thinking is that if LIRC were to ignore repeat inputs, and produce a single output for those, wouldn't that still be a single input to XBMC via the Lircmap.xml?
You think the correct way but XBMC ignores lircrc information. That's why it does not work. See below.
The "repeat" variable seemed the best to accomplish that, but I may be missing the boat on something.
What you are missing is that the "repeat" option is actually a "lircrc" configuration option and not a "lircd.conf" option. XBMC does not use the lircrc. It uses its own mapping. Normally every LIRC program uses the lircrc which defines the mapping PROGRAM -> REMOTE BUTTON -> PROGRAM ACTION. In this configuration file you can adjust the repeat rates for every program and every single button. XBMC on the other hand uses its own Lircmap.xml and Keymap.xml files which do the REMOTE BUTTON -> XBMC ACTION mapping. XBMC reads the input events directly from the lirc device instead of using the lircrc mechanism which would allow to adjust all these settings. That's why XBMC has to take care of multiple repeats itself.
While on the topic, thanks so much for your guide too. It is most useful and very well laid out.
Thank you very much.
Thanks for your replys, but I am still with this little problem, I read lots of tutorials but i don't find any solution. I think it will be the /etc/lirc/lircd.conf problem, because in Totem happens the same with Play function, it is like it will be pushed twice. Has anyone configured this remote? I am getting mad.
Thanks for all!
DocViper
2009-06-30, 10:37
try to change (increase) the value for "gap" in the lirc.conf
that made my remote work correctly
and don't forget to restart lircd after every change
/etc/init.d/
./lircd restart
What you are missing is that the "repeat" option is actually a "lircrc" configuration option and not a "lircd.conf" option.
Ah ha. I didn't realize it was an lircrc option. That makes more sense now, thanks for catching that.
Thanks again, I change the value of "gap" variable to:
251982
132609
500000
1000000
10000000
But nothing, it makes the same. I don't know which is the significant of this variable.
I will be searching for the solution, thanks for all.
Hello again, I have made some more checking and that is what I have when I execute the "irw" and press the "Play" key one time:
00000000000100cf 00 Play Pinnacle_72e
00000000000100cf 00 Play Pinnacle_72e
It appears twice. This happens with all the keys. I don't know why but i will continue searching the solution.
Thanks again!
Oh!!! I have solved!!!
I just search this post: http://forums.whirlpool.net.au/forum-replies.cfm?t=919552&p=9#r165
So I change this line on my /etc/lirc/lircd.conf:
toggle_bit_mask 0x16000000
Now works perfectly, so now I must configure all the buttons.
Thanks for all your help.