|| Primer Script for SA3250HD cable boxes.
Primer Script for SA3250HD cable boxes written by jwestfall. Written for two boxes but works equally well on one box. Still can't reliably record from two of these boxes but this will get them going. I put this in my /usr/bin directory and call it from the startup programs in the sessions application in Ubuntu and it works every time for me. Post something to the mailing list if you have problems getting it going.
The SA3250HD primer looks for jwestfall's firewire_tester script which should be located in the contrib directory. That section can be commented out if you don't have it though.
- Update: there also exists a sa3250ch channel changer program. It may require some hand tuning as there appears to be two ways to change the channel depending on the vendor ID in your hardware. For now you have to hand tweak the source based on the diffs floating around. I've found that changing the channel to channel 1 (TWC NYC) before priming or when the backend loses the cable box fixes everything. I'll detail the procedure as it has my setup running rock solid.
# sa3520_fixer.sh [-v]
# This should only be used prior to starting the backend. Using it as
# part of an external channel changer would be a bad idea since its doing
# a bus reset.
# jwestfall a surrealistic d net
# List of nodes to fix
# The number of times to try and fix a node
# The number of consecutive tests that must be successful
# for a node to be considered working
# verify firewire_tester and plugctl are installed
if [ "`which firewire_tester`" = "" ]; then
echo "firewire_tester is required, but not found"
if [ "`which plugctl`" = "" ]; then
echo "plugctl is required, but not found"
# deal with -v commandline
if [ "$1" = "-v" ]; then
echo "verbose output enabled"
# global failed variable for when the script exits
# reset the firewire bus
# this should normalize all the plugs and reset n_p2p to 0
echo Resetting the Firewire bus
firewire_tester -R > $VERBOSE 2>&1
for NODE in $NODES;
echo -n "Setting up node $NODE, ";
while [ "$TRY" -lt "$ATTEMPTS" -a "$SUCCESS" -ne "1" ];do
# tell stb to send data
plugctl -n $NODE oPCR.n_p2p_connections=1
# see if the stb is sending data
firewire_tester -p -n $NODE -r $TESTS > $VERBOSE 2>&1
if [ "$?" -eq "0" ];then
# stop sending data
plugctl -n $NODE oPCR.n_p2p_connections=0
if [ "$SUCCESS" -eq "1" ];then
echo "SUCCESS (after $TRY attempts)"