[mythtv-users] HOWTO: Firewire Power on/off & check status of a Scientific Atlanta STB

Christian Szpilfogel chrisznews4 at rogers.com
Tue May 5 02:16:07 UTC 2009


Hi folks,

This HOW-TO enables you to control power on/off a Scientific Atlanta Set
Top Box (STB) and subsequently change channels via ieee1394 (firewire).

This weekend, I was motivated to move my analogue connections to
digital. I now have two of my Scientific Atlanta set top boxes (SA3250HD
and an SA4250HD) connected in via s-video to my PVR-500 card and the
channel changing is done via ieee1394 (firewire).

The channel changer included in the contribs folder is the older version
and could not handle more than one STB; however I did find one that
works at: http://ubuntuforums.org/showthread.php?t=756508 . It also has
an example of converting the GUID to a Node.

The next issue was to find a way to ensure the set top box is turned on
before changing channels. There are many reasons why it might get
powered off (upgrades, remote resets, power glitches, etc). Others have
done some strange things to determine this but this program uses the
actual commands and should be very reliable.

Nothing seemed available so I wrote a program called sa3250cmd to be
able to power on or off the STB and also to check the current state of
the STB.

Because I run multiple STBs on one firewire link, I also wrote a script
which
* accepts the unique GUID of the STB as an input,
* converts it to the correct node
* checks current power state & powers the STB on if needed
* changes the channel

The project page and all downloads are at:
http://code.google.com/p/sa3250cmd/

Included on the project page is the following:
* the program sa3250cmd.c and its Makefile
* a script which takes a GUID and executes the command (based on
grytpype's example)
* a script which takes a GUID, ensure STB is on, and changes channel

Although, I currently only implemented on, off, status, I am happy to
add other commands if desired. Just let me know what the command code is
and what it does.

The new command is used as follows:
USAGE: Usage: sa3250cmd [-v] -n <node> <command>
        -v : Verbose Mode
        -n : Node to change - required
<command> : on, off, status  RETURN Value: Dependent on command
            -1 = error
             0  = success but no return value
              on, off, and status return:
                1 = OFF
                2 = ON

I will eventually look to add this to the mythtv contribs. As soon as I
figure out the proper process for doing so.

Enjoy!

Christian




More information about the mythtv-users mailing list