No subject

Sat Sep 23 09:50:28 UTC 2006

have seen.  It doesnt get along with iec61883 shutting down the last 
plug/connection (when n_p2p_connections would be come 0).  It also doesnt 
allow you to change the firewire channel, seems to be hardcoded to the 
node number the device currently is.  I guess thankfully this is how I am 
picking the channel in the p2p.diff patch.

The attached script is what came of this, which is run before starting 
mythbackend.  It requires firewire_tester from svn last night, which adds 
a firewire bus reset.  There are some config options at the top, but 
should only need to change the NODES variable to list the node or nodes 
for fixing.  It will attempt to fix up the $NODES by doing plugctl bits 
and firewire_tester to verify its stable.


Content-Type: application/x-sh
Content-Disposition: attachment; filename=""
Content-Transfer-Encoding: quoted-printable

#!/bin/bash=0A# [-v]=0A#=0A# This should only be used prior=
 to starting the backend.  Using it as =0A# part of an external channel cha=
nger would be a bad idea since its doing =0A# a bus reset.=0A#=0A# jwestfal=
l at =0A=0A# List of nodes to fix=0ANODES=3D"0 1"=0A=0A# The =
number of times to try and fix a node=0AATTEMPTS=3D5=0A=0A# The number of c=
onsecutive tests that must be successful=0A# for a node to be considered wo=
rking=0ATESTS=3D5=0A=0A# verify firewire_tester and plugctl are installed=
=0Aif [ "`which firewire_tester`" =3D "" ]; then=0A  echo "firewire_tester =
is required, but not found"=0A  exit=0Afi=0A=0Aif [ "`which plugctl`" =3D "=
" ]; then=0A  echo "plugctl is required, but not found"=0A  exit=0Afi=0A=0A=
# deal with -v commandline=0AVERBOSE=3D"/dev/null"=0Aif [ "$1" =3D "-v" ]; =
then=0A  echo "verbose output enabled"=0A  VERBOSE=3D"/dev/stdout"=0Afi=0A=
=0A# global failed variable for when the script exits=0AFAILED=3D0=0A=0A# r=
eset the firewire bus=0A# this should normalize all the plugs and reset n_p=
2p to 0=0Aecho Resetting the Firewire bus=0Afirewire_tester -R > $VERBOSE 2=
>&1=0A=0Afor NODE in $NODES;=0Ado=0A  TRY=3D0=0A  SUCCESS=3D0  =0A  =0A  ec=
ho -n "Setting up node $NODE, ";=0A  while [ "$TRY" -lt "$ATTEMPTS" -a "$SU=
CCESS" -ne "1" ];do=0A=0A    # tell stb to send data=0A    plugctl -n $NODE=
 oPCR[0].n_p2p_connections=3D1=0A=0A    # see if the stb is sending data=0A=
    firewire_tester -p -n $NODE -r $TESTS > $VERBOSE 2>&1=0A    if [ "$?" -=
eq "0" ];then=0A      SUCCESS=3D1=0A    else=0A      # stop sending data=0A=
      plugctl -n $NODE oPCR[0].n_p2p_connections=3D0=0A    fi=0A    let TRY=
+=3D1=0A  done=0A=0A  if [ "$SUCCESS" -eq "1" ];then=0A     echo "SUCCESS (=
after $TRY attempts)"=0A  else=0A     echo "FAILED"=0A     FAILED=3D1=0A  f=
i=0A=0Adone=0A=0Aexit $FAILED=0A

More information about the mythtv-users mailing list