[mythtv-users] I need a firewire command-line channel-changer

William Munson william_munson at comcast.net
Sun Apr 27 12:29:35 UTC 2008


Marc Barrett wrote:
> I need a command-line program to change the channel via
> firewire with a Motorola DCH-3200.  
>
> I found the following on a web page:
>    https://help.ubuntu.com/community/MythTV_External_Channel_Changer
> "for Motorola boxes other than the DCT6200, such as the DCH3200 
> or the DCT3412, you need to use the newest version of the channel 
> changer which is currently available from the MythTV SVN branch 
> as of 1/08."
>
> So, I grabbed the SVN development source, and compiled the 
> 6200ch.c source file.  But when I ran it, it still complained that it 
> could not fine a DCT-6200 attached. 
>
> I know that MythTV has the ability to change the channel on my 
> DCH-3200, but it does so with no problems via the program guide.
> I just need a command-line program to do it.  I need it so I
> can put together a little script, together with firewire_tester, to
> go through my channels and see which ones have the CCI 
> flag enabled.
>
>   
Here is my channel changer. It is GUID based so that it can find the 
correct node each time regardless of how many times the STB jumps nodes. 
Note that everything is hard coded paths and has the sudo madness 
required by ubuntu but you should be able to make this work for you.


PS - I found that each time I attempted to tune a channel with the cci 
flag enabled it caused my STB to jump nodes and become confused. Good 
luck and if you get it working I would love a copy.

Good luck,
Bill

-------------------------------snip---------------------------------
###### dct channel changer
#!/bin/bash

# Initialize
LOG=/var/log/mythtv/dct6200ch.log
LOG2=/dev/null

GUID="0x00123456789"

# Redirect stdout and stderr to log file
exec 1>>$LOG
exec 2>>$LOG2
echo "------------------"
echo "Start time: `date`"

#get plugreport and save into file
sudo /usr/bin/plugreport > /storage/temp/plugreport.txt
echo "Plugreport gotten"

# Extract node info.
NODE=`grep $GUID /storage/temp/plugreport.txt | awk '{if (($1 == "Node") 
&& ($4 == "'$GUID'")) print $2}'`
echo "Node: '$NODE'"

# Stabilize connection
sudo /usr/bin/firewire_tester -B -P 0 -n $NODE

# Change channel
echo "Changing Channel to: $1"
sudo  /usr/bin/6200ch -g $GUID $1

# Clean up
echo "cleaning up."
sudo rm /storage/temp/plugreport.txt
echo "Finish time: `date`"

# Redirect stdout and stderr to display
exec 1>&-
exec 2>&-

----------------------snip-------------------


More information about the mythtv-users mailing list