|
From: David M. <da...@ju...> - 2007-04-06 14:57:31
|
A little background: Attempting to be resourceful on a limited budget, I've salvaged an old Powerbook G4 to use as a remote frontend for MythTV (the backend server is a real linux machine, HTPC class, on a different TV). I have a Microsoft MCE remote with an eHome IR Tranceiver plugged into the USB port on it. Running the machine in Linux, the remote works great, but it has an ATI video card, and the proprietary drivers needed to make it talk to the S-video Out port have never been ported to PPC. Running it in Mac OS X, the video works great, but not the remote. Lirc is documented to only work on OS X with either the audio or network drivers, and not having a spare IR diode to build the audio device, and not having a spare linux box to dedicate as a remote receiver (heck, I'd just use it as the Myth box if I had one ;) ) that kind of left out lirc initially. I've managed to find a couple commercial packages for Mac OS X that talk to the eHome receiver, however, they only seem to support that little white Apple Remote, which doesn't have nearly enough buttons on it to be remotely useful for MythTV. So now, my problem: Not being afraid of writing a little code, I figured I would attempt to write an OS X driver for the eHome device and hook lirc up to it. So far, I have successfully created a user-space daemon which connects to the eHome and grabs the data. Being that it's userspace, I figured the easiest way to get the data into lirc would be the UDP driver. I swiped the readdata routine out of the linux lirc_mceusb2 driver, and attempted to use that and modify the data to match what it looked like the UDP driver was expecting (also found http://sourceforge.net/mailarchive/message.php?msg_id=F35F489E75C11C4C88D1E18BC4EA39911413BD%40UKLON0424.uk.deloitte.com ) and send it all to localhost on the udp port. But I can't seem to get it to work. Putting some extra debug lines in hw_udp.c, it's obvious that the data is making it to lirc, it's just not processing it for some reason. Is there any sample code out there anywhere from a working program that sends UDP to lirc? I've been Googling for hours and coming up blank. Thanks in advance for any help. :) (And yes, the source for this will all get posted somewhere once I get it working -- I'm sure I'm not the only one who'd like to use a non-Apple remote on a Mac) -- Dave |