Friday, June 6, 2008

My Working MythTV Firewire Fix

Updated post 6/6/2008 - And now it is tested and working

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

2 comments:

s said...

I could use some help. Ubuntu + mythtv 0.21 ... DCT6200 HD STB ... I can run firewire_tester just fine, it reports as stable with broadcast. I add the firewire tuner as a capture device. I add a video source and have schedulesdircet setup for my cable provider. mythfilldatabase seems to go OK. I cannot retrieve any channels at all though. The UI doesnt show them at all. When I click on 'retrieve lineup', it pops up a window for like half a second then disappears ... and no channnels are added. Help

DanyelLawson said...

I am not familiar with the retieve line up button. You should be able to see your line up after a mythfilldatabase. When you are in live tv you can press c to switch between the capture devices and p to switch between the providers you have setup.

I only have one provider and one capture device but the capture format flashes on screen when I press c.

I think I may have had this same problem when I first setup schedules direct but the tv schedules eventually started coming in after a few days.

Are you still having this problem?