If you don't want to hear about my random flailings in trying to get a remote control to work with a PC, you can skip reading this one.
There's nothing I seem to enjoy more than complicating an otherwise simple idea. Case in point:
We have a 42" plasma hanging on the family room wall. It's nice enough. I've even got the coax cable & power snaked through the wall so that there are no dangling wires. After that, I cut holes in the walls, installed in-wall speakers and removed the factory speakers that we had been jokingly referring to as "dumbo ears". I'm rather proud of that accomplishment, though I almost electrocuted myself (hey kids, make sure the walls are truely devoid of wires before you fire up that monster of a jigsaw!).
So, that should be good enough, right?
Nooooo. I have to have my PVR playback on this TV. Hrm. We can't have any devices sitting upstairs, so we have to install it all in my office, and run the wiring upstairs. For audio & video, this is going to be FAIRLY straight-forward. It's a little known fact that you can do without 7 of the 15 wires in a VGA connector, so I'm going to run the signal over the 8 wires of CAT 5e (you lose stuff like Plug n Play, but I can cope). For the distances and resolutions I'm after, it should have sufficient bandwidth & noise rejection. Audio will be even MORE simple. Just 4 wires for analog audio. I'll probably do CAT 5 for this, too since the wires are ubiquitous.
The biggest problem is going to be control of the system. Infrared repeaters are about $100. Doable in a pinch, but I don't need to repeat signals for "up to 8 devices". No, I just need to be able to use the PVR's remote upstairs, which means that'd be overkill and overly expensive. I have a Microsoft MCE remote, but the IR head is massive (little bigger than an altoids box), and you can only do USB over 12 feet or less. I think I'm going to need 15' or so. Why not, then, homebrew the IR like all those geeks before me?
Why not, indeed...
So I ordered up the parts to make an IR. Actually, I ordered up the parts to make 5 of them, mainly because I wanted a little saftey room in case I botched one or two, and there was a minumum order. All told, the bill was $21, after shipping. I can handle that. I also figured it was best to start with a test unit, something with a shorter cable I could test at my desk. When I know I'm on the right track, I'll wire up the long one to be hidden away upstairs, snake the cable, and solder the DB9 on the end.
So I found a spare serial cable in a box, cut 'er in half, and went about mapping out the wire colors to the pins. Next up, I cut up some perf-board I had laying around. Last night, at about 11:00, I got to the wiring & soldering. With the solder still cooling, I plugged it into the serial port on my laptop and began the inevitable struggle with lirc (the IR software). Eventually, I got it to run. However, when I tried using the little "irw" applet that comes with lirc, I was getting NO signals when I hit buttons on my remote.
Time to double-check my wiring. Hrm, maybe a couple of my solder traces are too close together. When I tried to clean them up a bit, I managed to end up making things worse. Crap. There goes attempt #1. Sure was glad that I had cut all the pieces of perfboard to make all five. Try again.
Still no luck on testing. But this time, I double-double checked my wiring, and noticed that I had, indeed, botched it up. Dammitall. Time for attempt #3. If this doesn't get me anywhere, I'm going to bed.
This time, I found an alternate schematic and laid out the components my own way, instead of using the "here's how you should lay them out to get them all to fit in a teeny space" diagram I was before using. Did everything carefully, made 1 small mistake, but it was easy to fix. Double-double check my wiring, try it out. Defeated again. By this time, it was 2:30 or so. I called it a night and decided to think about chalking the homebrew idea up as a loss.
Well, maybe I could get lucky with the MCE USB remote. So I plugged the USB cable into a USB extention cable to approximate the distance involved. Didn't work. Plugged it directly into the PVR. Still didn't work. Hey, I wasn't expecting THAT...
Turns out that that little "irw" tool won't show you anything unless a certain config file is populated. Dammitall. Populate the config, and it works. Put it back on the longer USB, and it works. Well, I wonder if that's why my homebrew wasn't working. So I plug my homebrew back into my laptop and try recording some IR signals. It sees a partial keypress and dies. Well, that's something. I'm close! Let's triple-check my double-checking. Everything is good. I'm no longer doubting my wiring. I even checked the data sheets on all of the components to make sure that the pinouts were correct. Yeap. What's left?
Well, I get around to reading the docs on lirc.org line by line and I find out that serial ports in laptops don't always send out the full 10V required for this circuit. Could that be my problem? I whipped out the multi-meter, and yeap. Only 6V on the supply wire. FRUGGEGIGDDDRRHAAAG! It's quite possibly my very first attempt was good. How about that.
Time to shut down the PVR and plug in the serial port on the motherboard. We'll see what happens, next.