Kodi Community Forum

Full Version: How is IRDA control implemented?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
On my previous build I installed LIRC along with Myth. When XBMC was brought up the remote "just worked", I do not think I did anything special. I could confirm proper operation using IRW in a console window.

I have now built a new system using an MCE303 case. http://htpc.mce701.com/info/mce303b.html This case has a VFD that contains an IR receiver. The receiver is connected via USB but does NOT use LIRC. The receiver is apparently made by a company named IRTrans http://www.irtrans.de/en/download/linux.php The software claims to be LIRC compliant and states that LIRC shouldn't be running on the machine. Fair enough, I've removed LIRC - should I have just disabled it? Anyway, the software in debug mode shows my remote controls working fine. IRW also shows the remote codes being sent to the machine. XBMC however does NOT see these remote codes - thus my question.

How does XBMC receive IRDA commands? I do not recall doing anything special before and IRW seems to see my commands so I'm pretty frustrated that XBMC doesn't. Is XBMC not simply acting as a LIRC client? Is there something I've failed to do? Suggestions appreciated, using VNC to control XBMC right now is pretty sillyNerd
I think it should work if I've read through IR trans documents right.. You could confirm it working by trying it in for example mythtv then it should work in XBMC to I think.

If you have changed the remote control however you need to change the lircmap.xml in userdata. a fast guess if you haven't changed the remote is that it might change the commands, but this would be silly Smile
Neither Myth nor XBMC "see" the remote commands but IRW which is the troubleshooting tool see them just fine - doh! The commands are mapped correctly near as I can tell but that is a good idea to check, if the commands output a message "different" than what XBMC\Myth expects then it would be ignored. If someone who has Lirc and an MCE remote could run IRW and hit say the up key on the direction pad or some other keys and report the IRW messages back I'd appreciate it. This could turn out to be simple to fix - thank you for the idea!
I have the MCE Remote control and I can see what the commands are but I cannot find the IRW tool? how do I install it? it's not in the repos?

Although I think that the commands are the ones found in lircmap.xml in your userdata for example Pause for pause...

Although the Device tag could be altered by IRTrans to? it should be mceusb as per standard I think.
IRW is part of Lirc I think, it's not a separate tool unfortunately. I have Lirc loaded but not starting so I got to keep the tools that loaded with itNerd If I hit the butons here's wat I see on console:

down gets me: 7500c380e300000 00 down mediacenter
Up gets me: 7500c380e100000 00 up mediacenter
pause is: 7500c3806000000 00 pause mediacenter

and so forth. I think I got pretty much the same from Lirc when I used it with my previous setup. Except with my previous setup once IRW worked I was golden, not so this time.Confused

Looking at the keymap I notice that the commands are all capitalized. IRW comes out lowercase. Looking at Lircmap.xml I see several remotes mapped but not the mediacenter one that is spit out by IRW on my box. I've tried modifying Lircmap.xml to reflect my "mediacenter" remote and changing the uppercase letter at the start of commands but no joy yet. This SAME remote worked before so I'm sure this is a mapping issue. If you or someone else could spit out a chunk of IRW output I think I'll have this fixed up.

Pretty sure I'm getting closer - what a relief!Laugh
Try this for a kick in the nutz... I plugged in my MCEUSB receiver and started lircd manually from a command window. The remote is now working perfectly in the GUI just as it did previously when I used this receiver. I had REALLY hoped to use the receiver built into my case and it's included VFD display (which turns out to use a dead ended fork of LCDproc) but the MCE stuff is much better sorted and supported. I'm not giving up but getting this other stuff up and running so easily stings.

BTW the IRW output continues to show up just fine. Interestingly it's NOT doubled and I've confirmed that nothing is being spat to IRW via the USB receiver. The USB can be unplugged and the remote stops working.No
Rebooted the machine, lost the remote capability, tried to run lircd again from console, informed that there's something preventing it from running so lirc may already be running, remote still dead. Gah!
Well sorry this took so long but here are my IRW output.
000000037ff07be1 00 Up mceusb
000000037ff07be0 00 Down mceusb
000000037ff07bdf 00 Left mceusb
000000037ff07bde 01 Right mceusb

If you look at this and compare to lircmap.xml
[...]
<remote device="mceusb">
<left>Left</left>
<right>Right</right>
<up>Up</up>
<down>Down</down>
[..]
</remote>
[..]
I'd say that you should add/change your Lircmap.xml into
<remote device="mediacenter">
<left>left</left>
<right>right</right>
<up>up</up>
<down>down</down>
</remote>
Linux is always case-sensitive, this might be the problems you've encountered

sry to hear that you broke IR all togheter, but I'd try a complete removal of both and restart and make a fresh start.

/Tobias
Hope you get it
Thank you very much! That is what I surmised was the problem and I did try making those changes - no workieLaugh However with all of my thrashing around my system was in a state I wasn't 100% sure about in that I'd tried so much with various Lirc twists I wasn't sure what code was where. The code for the VFD had been tweaked a good bit too. On the plus side, as soon as I got the IRTrans stuff loaded the other day before I thrashed too much I made a backup so I have a point I can go back to if needed. For sure that irda receiver was working though so THAT is a start!

So, I've blown it all away and am loading the desktop version of Ubuntu - this sucker is fat!Shocked I'm updating it now and pulling down the XBMC SVN code, I'll be back at this soon.

For others who have the MCE303 case or say a Zalman with a VFD - gzusrawx and I are both working hard to figure this out. He has found some good information that seems to indicate that this VFD is supported under the iMON name and indeed it looks like Myth has an entry for it! LCDproc ALSO seems to support this which is good news - it means we don't have to rely on the IRTrans code which doesn't appear to have kept up with it's source projects. I hope to see soon enough and between the two of us we'll get this sorted and share with others, suggestions welcomed for sure.

If anyone else is dorking with this particular USB based Samsung VFD please holler so we can work with you - it's apparently sold under multiple names. Both of these issues are solvable things IMO so stay tuned.Nod
Another solution which might not be up your ally but I'm going to strip my USB-IR to pieces and incorporate it into the case of my next HTPC.
Although this isn't in the nearest future because I still wait for the perfect mini itx to show up. Although the Aopen minipc seems as it might just be what I'm looking for.

Hope you get it working though. Wierd it doesn't seem to work with your changes because if it's IRC compliant and IRW is picking up the codes i would guess that XBMC should do so to, unless the bastards changed the IRW Smile
Oh I've considered it - boy have I! I haven't yet taken a screwdriver to it but am tempted. I'm no stranger to a soldering iron and it's just over there on the shelf... That still leaves the VFD to deal with, I have some crappy code running it now but no client sending data to it. Any chance the XBMC guys are considering using the LCDpro client coding to support displays?

The sick thing is how easily this crap works on Windows GRR! LIRC supposedly supports this thing but the documentation is pretty poor. MCEUSB hardware "just works" though, in XBMC and in Myth. For those looking for a remote for this use the MCE stuff. Hope the controllers work as easily for say MAME using XPAD. I appreciate the input!

Now, where's that screwdriver....
Tiny tiny Torx screws, just under the front feet. Two tabs towards the back, be careful or the keepers will snap. The PCB is WIDE, as wide as the casing. Hiding this will be difficult, extending the leads for the wires is certainly possible - there are only three components of note that need to be led out. One of them is a response LED, it's red and I think blue might be a better color Big Grin There's what looks like an IRDA receiver in a metal can and something that looks like a thin LED, possibly a transmitter? The USB cable is socketed, no cutting required to modify it, the cable colors appear to be standard for USB but Ohming them out for continuity would be a good idea.

Hope that helps someone out. I'm still trying to decide if I want to throw in the towel or not. I've got a solid 20+ hours in this but getting the "standard" up to date LIRC using it just hasn't happened, only the forked IRTrans code responds.
hehe, that's a bummer. That it's that big. My plan was to fit the thing in a MiniITX :S
But it's really sad that you can't get it to work with the IRTrans std.

I think there is a patch already (Not implemented) to get some support for LCD display.
The MCE device is a little wide say 2.5inches by 3inches deep, I think it might be a half inch tall. It's not going to sit behind a screen and look out in your case BUT if you extend the leads the PCB could be laid down under say a HDD cage and the LEDs put somewhere tighter.

The Samsung VFD module can be driven with the IRTrans code, I had it working except it woldn't talk to XBMC - a config issue I'm sure. But the driver worked and better it also received my MCE keyboard! I've yet to get the current LIRC driver to do that but the LIRC driver is pretty much PnP with the MCE dongle. Others have gotten the kbrd working, I'll try too. The display itself appears to be supported by LCDproc but I'm not sure. Part of the issue here is what to send to it? Myth is supported but I'm not on Myth right now so.... Hopefully at some point XBMC will work with displays using the LCDproc client protocol. Considering where things stand right now with development I'd expect that to be pretty far down the list so no sweat. If I can find a simple client to run in the background I'll do it. 16X2 is a pretty small display after all so I'm not expecting miracles. A clock might be nice though!Big Grin
Yah BLKMGK I think that the imon driver we were trying to use is not the right driver for our samsung vfd