Monday, August 27th, 2007

Learning and sharing

If you’re not building a MythTV DVR, just skip on by.

I had some trouble over the weekend I figured I should share.  If you are reading this in the future because you’ve googled for trouble with MythDora, Hauppauge PVR-150, LIRC, serial IR, mode2, irw, etc. — well, welcome to you, time traveler.

Here’s how it started.  I bought a Hauppauge PVR-150 tuner card because it has the IR blaster built in.  The new DVR I’m building is going to drive my cable box (Scientific Atlanta Explorer 2200, I believe) so I need a way to change its channel and then suck the signal off of channel 3.  The PVR-150 has such an IR blaster that you connect and point at your set-top box.  It also has an IR receiver, and it comes with a remote control, and MythTV is easily configured to use this remote to control the operation of the DVR as a whole.

And that’s how I set it up.  First in my office, I got everything working with this one tuner.  Then I moved the system to the basement.  I got all of the S-Video stuff set up (Radeon 9600 — be sure to comment out the VideoOverlay line and replace it with an OpenGLOverlay line).  I got all of the IR stuff set up.  And a tip of the hat and thanks to Techie Bytes and Mark’s Braindump for the how-to on getting that set up.  It seems that the Hauuppauge PVR-150 can’t control the Scientific Atlanta 2000 without some tweaks, which are very straightforward and easy.  I was using the gray Hauppauge remote to control the system and the system was controlling my cable box.

But as most of you know, I don’t live in my basement, and I don’t watch TV in my basement.  So I’ve got S-Video and audio lines running up to the living room and and an IR extender (wired, that I built myself, thank you very much) running down from same.  So I took my remote control upstairs, pointed it at said gadget and… NOTHING.  Something strange about the Hauppauge remote, it does NOT work with my IR extender.  Huh.  And thinking about it now, that should have been a red flag, right?  Huh.

But that’s OK, because I needed to move the other two tuners from the existing MythTV system and I really needed to put a new 320 GB hard drive in there to replace an older one (yeah, I should have known better, and it was, in fact, giving Smart errors).  And while I’m robbing the old system, I take the serial IR receiver and install it on the new system.  Don’t ask me where I got it, I think it was from Germany.

Now since I had everything configured to work with the Hauppauge remote and the SA2000 blaster codes, I just kept that in place and continued, but configuring the serial IR receiver in place of the one that’s built into the PVR-150 card.  No problem.  I used mode2 to test that it was working, and indeed, I was getting a good stream of numbers, indicating that the signal was being received.  Next step is to test with irw to make sure that the buttons are being processed correctly.  NOTHING.

I’ll spare you the sweating, the swearing, the twelve fucking hours — YES, just about that long — of configuring, re-configuring, sweating and swearing some more.  Let’s just cut to the revelation I should have known all along.  You see, when I copied over the lircd.conf from the old system and I set that all up and then I grabbed the remote I’ve been using with that old system (it’s actually a remote from an old PrimeStar satellite box, codes copied over to a really fancy learning remote).  When I tested with mode2, lots of numbers.  When I tested with irw… YES!!  So to make a long (weekend-long) story short, the Hauppauge remote DOES NOT WORK with EITHER the IR extender I built OR with the serial IR receiver.

Like I said, I should have known when it didn’t work with the one that it might not work with the other.  But here’s the lesson I’m sharing: DO NOT ASSUME THAT ANY REMOTE WILL WORK WITH ANY IR RECEIVER.  It turns out it’s just not the case.

A couple more things while I’m at it.  I mentioned the Option “OpenGLOverlay” “on” that belongs in xorg.conf for the Radeon 9600.  I should also say I was having performance problems and seeing all kinds of errors when I ran mythfrontend interactively — something I do very much recommend so you can see if you’ve got any other fixups to do.  The system warned me that I was going to have trouble displaying video at 1024×768 resolution.  Oh shit, I thought.  And I’ve changed the screen resolution to 640×480.  But I was still getting audio dropouts and seeing the dreaded “prebuffering” warnings.  So in the playback settings, I’d never tinkered with this setting, but I thought I’d give the separate GUI/video playback modes a try.  Turns out that you can set the resolution of videp playback down to 320×200 — I think that’s the default.  When I did this, it was like magic.  Playback still looks great and the audio is superb as well.  So if you’re having video jitters and audio droputs, consider the lower playback resolution and that might solve all of your problems.

Well that’s how my weekend went.  I hope that posting this might save somebody some time and trouble down the road.  And if not, at least I’ll remember all of this for next time!  :)