I finally found a working failsafe fix for my MythTV FireWire setup that doesn't require manual intervention to keep MythTV up and running. In the MythTV startup script I repeatedly unload and reload the 1394 modules and then test to determine if the the firewire is working by checking for errors from my external channel changing program..
I changed the following block in /etc/init.d/mythtv-backend
su - $USER -c "/usr/bin/mythprime"
to this
#until { su - $USER -c "/usr/bin/mythprime"|grep '1\ stbs\ primed'; };do
while sa3250ch 1 2>&1 | grep oops;do
modprobe -r dv1394
modprobe -r video1394
modprobe -r raw1394
modprobe -r ohci1394
modprobe -r ieee1394
modprobe raw1394
/bin/sleep 1
done
#done
I had to less +F /var/log/mythtv/mythbackend.log. So I could turn off then on the cable box using the power button when the MythTV backend was recording a show. Nothing else seemed to get the video data flowing. After getting the initial recording going it seems to work fine with later recordings. Without the need for manual intervention. I commented out my cron scripts as the latest version of MythTV seems much more robust and the cronjobs only created confusion when there is a problem that requires intervention.
In my search for a completely automated solution I ended up changing the driver for my Time Warner supplied SA3250HD firewire to use a 100Mbps connection.
This is the third fourth fifth update to the details of my working MythTV firewire setup. If I have any more updates I'll make a new postcontinue to update this post. Looks good so far.It's working again.
Latest change changed again:
I have changed my channel changing binary to a scripted frontend. I renamed the binary to sa3250ch.bin and made a /usr/local/bin/sa3250ch script like so. I commented out what it used to do. Just changing the channel and letting the channel changes fail and miss recordings is fine. When I find the time to find a channel changing script for the SA3250 using p2p I will post it here.:
#!/bin/bash
#/usr/local/bin/sa3250ch.bin 1
#/usr/local/bin/sa3250ch.bin 1
#/bin/sleep 1
/usr/local/bin/sa3250ch.bin $1
#/bin/sleep 2