[mythtv-users] SA3250HD FireWire channel changing can be a bit flaky...here's a workaround

Scott Alfter mythtv at salfter.dyndns.org
Sun Nov 25 07:19:50 UTC 2007

sa3250ch (in the contrib directory) doesn't send leading zeroes on channel
numbers less than 100, and it doesn't send Enter on any channels.  For 3-digit
channel numbers, this isn't too much of a problem; the box receives the 3
digits, goes to the selected channel, and starts spewing MPEG-2 data out the
FireWire port.  For 1- and 2-digit channels, though, it waits a few seconds for
extra digits it isn't going to get before it decides to tune over to the
selected channel.  By this time, sa3250ch has already exited and mythbackend is
trying to capture video.  Since the cable box is in the middle of a channel
change, it isn't sending.  End result: zero-byte recordings of tonight's
Battlestar Galactica.  Not good. :-(

sa3250ch can be used to send the leading zeroes, though.  After some
experimentation, I found that this script works:



l=`echo $1 | awk '{print length($0)}'`

if [ $l -eq 3 ]
  sa3250ch -s $1

if [ $l -eq 2 ]
  sa3250ch -s 0
  sa3250ch -s $1

if [ $l -eq 1 ]
  sa3250ch -s 0
  sa3250ch -s 0
  sa3250ch -s $1


At first, I tried a loop with successive calls to each digit in turn.  It
sometimes missed a digit, though.  I tried throwing in a delay (either with a
sleep command or a call to a program that just calls usleep()), but that didn't
work much better.  The script presented above has worked so far for me.

 / v \ Scott Alfter
(IIGS( http://alfter.us/            Top-posting!
 \_^_/ rm -rf /bin/laden            >What's the most annoying thing on Usenet?

More information about the mythtv-users mailing list