26 Jun

MythTV is UP AND RUNNING! Changing Channels via Serial Cable

It is official – I am a MythTV user.  Well…let’s ammend that:  I am in the possession of a fully installed and functional MythTV backend server.  There were two things wrong with the Channel Changer program.

  1. I didn’t know that the current directory is not in your path.  SO–just because you are in the same directory as a binary file, it can still be “unfound.”  When I typed in /usr/local/bin/channel to define the path explicitly it worked–I should have tried that.  I probably would have, but I was pressed for time that day.
  2. Once I could get the channel binary to work, then I faced a different issue.  By using the -p switch on the channel changer program, the individual serial ports can be specified.  Here’s what I got:
    • /dev/ttyS0 – Input / Output Error
    • /dev/ttyS1 – No communciation
    • /dev/ttyS2 – Input / Output Error
    • /dev/ttyS3 – Input / Output Error

Great.  What now?  I found several postings on the web talking about the dialout group–but I checked and my user account was already in that group.  I was pretty sure that the serial cable to the Motorola box was hooked up to COM1 (/dev/ttyS0) so I thought I better do some more investigation.  I found this tidbit:

http://www.linuxquestions.org/questions/linux-hardware-18/cat-devttys0-inputoutput-error-397212/

Which instructed me more perfectly in the way of the SETSERIAL command.  I ran SETSERIAL -a for each port and got the following info:

/dev/ttyS0, Line 0, UART: , Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 500, divisor: 0
closing_wait: 30000
Flags: spd_normal

/dev/ttyS1, Line 0, UART: 16550A, Port: 0x02f8, IRQ: 3
Baud_base: 115200, close_delay: 500, divisor: 0
closing_wait: 30000
Flags: spd_normal

/dev/ttyS2, Line 0, UART: , Port: 0x03e8, IRQ: 4
Baud_base: 115200, close_delay: 500, divisor: 0
closing_wait: 30000
Flags: spd_normal

/dev/ttyS3, Line 0, UART: , Port: 0x03e8, IRQ: 3
Baud_base: 115200, close_delay: 500, divisor: 0
closing_wait: 30000
Flags: spd_normal

Wow.  Do you see what I saw?  Three out of four of my serial ports aren’t detecting the UART.  I can understand COM3 and COM4 not being there–they were not setup in the computer’s BIOS, but COM1 and COM2 should be fine.

A quick shutdown and boot to CMOS configuration proved my memory to be correct–but obviously there was something wrong.  This motherboard only had one physical serial port (the other one can be added with via a pin header) which I assumed to be set to COM1.  So, I reset it to COM2 (2F8 / IRQ3) and disabled all the rest.

And presto, it works.  I added that line into MythTV and away we go.

Playback on the computer monitor is a bit jerky, but I don’t think that it will be a problem.  This is an underpowered machine, after all, that is only supposed to be the backend.  Dividing the workload up as planned and letting the frontend machine do the playback should fix any jerkiness in the video.

The tactical plan for this box is to get a 150GB or larger hard drive in this box as soon as possible.  While I’m doing that, I might as well get a 1GB stick of RAM as there’s only 256MB in it right now.  (I thought there was more.)  Ideally, if this is all working pretty well over the next month or two I’ll buy a second PVR card, split the cable, and be able to record basic cable as well as the digital.  This will essentially duplicate the TiVo we used to have–one basic line and one digital line.

Long-term strategy will be to add a third PVR card and move one of the other cable boxes down to the backend server, fix whatever is wrong with COM1, and be able to do 3 recordings at once (or 2 recordings and one live TV).  As long as they are MPEG hardware-based encoders, this shouldn’t tax the system too much.

Oh, and I’ve still got to pay SchedulesDirect my $20.00 for this year…

Anyway, time to move on to the Xbox MythTV Frontend.  But first, I think I have one more MythTV article in me–I found two or three really nifty applications for Myth that I wasn’t expecting.  One is a Windows player for Myth that can watch recordings and livetv (no scheduling, but that’s what MythTV has a webpage for).  The other main one is a MythTV to iPod appliation that can synch your TV shows up like video podcasts.  I’ll test them out and post the results.

See you, Space Cowboy.