solving lirc -> xbmc double button-presses
#1
system:
XBMC-live updated to ubuntu 10.10 (2.6.35
xbmc 10.0 r35648
nvidia 9400gt
Hauppage Nova-TD-500

I've recently added a WinTV Nova TD500 card to my xbmc media-centra machine and that itself is working fine with xbmc/mythbox/mythtv.
The problem is, the Hauppauge remote resulting in double button presses in xbmc, or the Ok button not working...
Now, first I thought it was the actual remote buttons, so I was messing about with the repeat/delay options.
Also the lircd options for the same thing.
Then I had a light-bulb moment and discovered that turning off lirc resulted in just 1 button push, with the back button on the remote working (equivalent to keyboard esc), but no working 'Ok' (select) button.
With lirc on, the ok button works, but everything (up/down/etc) happens twice and the back button doesn't work.

So, the issue is, xbmc is responding to the same event twice via different methods!
Which appears to be lirc + SDL.


With lirc off, the debug log shows for a single button event:
14:07:02 T:3078485888 M:2871603200 DEBUG: SDLKeyboard: scancode: 116, sym: 274, unicode: 0, modifier: 0
14:07:02 T:3078485888 M:2871603200 DEBUG: OnKey: 61480 pressed, action is Down
14:07:02 T:3078485888 M:2871603200 DEBUG: HttpApi Start command: broadcastlevel paras: broadcastlevel; OnAction:4;2
14:07:02 T:3066112880 M:2871603200 DEBUG: UDPCLIENT TX: 77116 -> '<b>OnAction:4;10.0.0.14;2</b>'
which I spotted from a log entry saying "cannot talk to /dev/lirc" or something similar

then with lirc on:
14:04:11 T:3053975424 M:2879328256 DEBUG: LIRC: Update - NEW at 22702:000000000001006c 00 Down Hauppauge (Down)
14:04:11 T:3053975424 M:2879328256 DEBUG: OnKey: 167 pressed, action is Down
14:04:11 T:3053975424 M:2879328256 DEBUG: HttpApi Start command: broadcastlevel paras: broadcastlevel; OnAction:4;2
14:04:11 T:3053975424 M:2879328256 DEBUG: LIRC: Update - NEW at 22719:000000000001006c 00 Down Hauppauge (Down)
14:04:11 T:3053975424 M:2879328256 DEBUG: OnKey: 167 pressed, action is Down
14:04:11 T:3053975424 M:2879201280 DEBUG: HttpApi Start command: broadcastlevel paras: broadcastlevel; OnAction:4;2
14:04:11 T:3040947056 M:2879201280 DEBUG: UDPCLIENT TX: 22690 -> '<b>OnAction:4;10.0.0.14;2</b>'
which is of course different.

So what it appears I need to do is:
a) disable sdl input with lirc is running
or
b) find the 5-digit scancode for the 'Ok' and other buttons when lirc is disabled, then add them somewhere in the config.
As long as the sdl input thingy properly supports the scancodes - which I'm not sure where to find.

Which of these options is going to be easier to resolve?..

I've had a look through the forums but most of the info is pre-dharma.
From that which is relatively current, I'm thinking the solution is possibly remote.xml/keymap.xml yet I'm not sure where I could put the raw sdl scancodes from the hauppauge remote.
irw gives expected output.

I did just have a thought about disabling in the lircd.conf the buttons that trigger more than once, yet that appears to not work - ie having lirc running but without a defined remote config still triggers events twice...

Also, if I disable the system & user versions of Lircmap.xml, then stop lircd, still the remote works, also still without the use of the 'Ok' button.
So the system is likely picking that up just as an SDL device? yet missing the most important button!

T.I.A.!
Reply
#2
I created a script that runs at start up mentioned in post #14 on a bug report.

https://bugs.launchpad.net/ubuntu/+sourc...bug/663651

I have a Shuttle XS35GT with Streamzap remote.
Reply
#3
Is there a reason you need 10.10?

Only reason I ask is because I'm holding off until this LIRC snafu gets sorted out. It just got merged into Kernel and I don't think everyone thought of the implications.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#4
I'm not sure if there were any specific reasons for needing 10.10, apart from ensuring that the DVB card was fully supported.
Does dharma work in 10.04? I suppose I could always downgrade the machine!

I have also noticed there's an option in MythBox (under advanced) that says "Enable lirc hack for repeated button presses". (although it is on a different machine - that being an appletv in another room!)

@katsup: your script didn't work for me, so I had to rewrite it:
I've added it to the launchpad entry as that seemed like the most logical place to put it:
https://bugs.launchpad.net/ubuntu/+sourc...omments/23


After getting an idea of how xinput works, the idea of disabling the input device as stated here seems like it should work:
http://wiki.xbmc.org/index.php?title=Str...orkarounds

Which has disabled the ir receiver thusly:
Section "InputClass"
Identifier "Ignore IR"
MatchProduct "IR-receiver"
MatchIsKeyboard "true"
Option "Ignore" "true"
EndSection
(which now no longer shows up in 'xinput list')
But still with lirc button-presses repeated.

Just as a thought, I tried:
dpkg-reconfigure lirc
to use the Nova T500 configuration - which is what it is.
/etc/lirc/hardware.conf now contains:
REMOTE_LIRCD_CONF="hauppauge/lircd.conf.hauppauge_novat500"

And then I have in the debug log appearing correct button press entries:
21:02:30 T:3054290816 M:2947993600 DEBUG: LIRC: Update - NEW at 178508:000000000001006c 00 ArrowDown NOVA-T500 (ArrowDown)

So after editing
.xbmc/userdata/Lircmap.xml
to reflect the device name and also (for example) 'ArrowLeft' instead of 'Left'
it has magically started working!

So now I've tried removing all the other 'fixes' and it still seems to work fine.
Which means that the solution for me for this issue, seems to have been 'reconfigure lirc'.

Next step would be to get the 'guide' button to take me to the mythtv tv guide... Smile
So as to make it easy for even my father to use!
Reply

Logout Mark Read Team Forum Stats Members Help
solving lirc -> xbmc double button-presses0