<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1269" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=186071322-02022004>I currently use a
hot-wire, for lack of a better term, version of the joypad.pl script to control
my receiver.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=186071322-02022004>I
haven't altered any of the subs but I have removed the command line
menu so I can execute channel changed directly.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=186071322-02022004>I use the joypad
script because it is the only script I can get to work with my Optimus
5100. :)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=186071322-02022004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=186071322-02022004>Here is the
original file I used: </SPAN> </FONT></FONT><A
href="http://www.rgbdream.com/downloads/joypad.txt"><FONT face=Arial
size=2>http://www.rgbdream.com/downloads/joypad.txt</FONT></A><FONT
face=Arial><FONT size=2> </FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=186071322-02022004>I would like
to add some features to the set_channel sub that does the direct channel
to channel change.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=186071322-02022004>I would like
for the set_channel sub to do some PRE and POST channel change checks and
balances like so.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=186071322-02022004></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=186071322-02022004>- First turn
on the receiver power - power_on</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=186071322-02022004>- Next check
the current channel against the channel submitted</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=186071322-02022004> |
- if the channels are different then proceed, else
exit</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=186071322-02022004></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=186071322-02022004>-
Then change the channel like normal</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=186071322-02022004></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=186071322-02022004>- After that
check the current channel against the channel
submitted</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=186071322-02022004> |
- if the channels are different then start over but do not repeat this step more
than once</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=186071322-02022004></SPAN></FONT></FONT> </DIV>
<DIV><FONT><FONT size=2><SPAN
class=186071322-02022004></SPAN></FONT></FONT><FONT face=Arial size=2><SPAN
class=186071322-02022004>I have tried to do this myself but I have had no
success; all my attempts have run into time outs.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=186071322-02022004>I'm hoping we might
have a Perl guru out there that could point me in the right direction or
heck take on this seemingly simple project.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=186071322-02022004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=186071322-02022004>-Ethan</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=186071322-02022004><FONT face=Arial size=2>For more info on
changing channels on your Directv receiver with a perl
script.</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2><A
href="http://mythtv.no-ip.com/bbs/viewtopic.php?t=1896">http://mythtv.no-ip.com/bbs/viewtopic.php?t=1896</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=186071322-02022004><FONT face=Arial size=2>Current
subs that could be
used? -----------------------------</FONT></SPAN></DIV>
<DIV><SPAN class=186071322-02022004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV>sub set_channel {<BR>        my( $channel ) = @_;<BR> $_ = sprintf( "%4.4x",
$channel );<BR>        ( $n1, $n2 ) = /(..)(..)/;<BR> send_command( "0x46", $n1,
$n2, "0x0" );<BR>}</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT> </DIV>
<DIV>sub get_channel {<BR>my @channel_hex = send_command( "0x07" );<BR> if(
scalar(@channel_hex) > 1 ) {<BR>$channel = $channel_hex[0] * 256 +
$channel_hex[1];<BR>}<BR>else {<BR>$channel =
$channel_hex[0];<BR>}<BR> print( "Current channel: $channel\n"
);<BR>return( $channel );<BR>}</DIV><FONT face=Arial size=2></FONT>
<DIV><BR>sub power_on        { send_command("0x02"); }</DIV>
<DIV><BR><SPAN class=186071322-02022004><FONT face=Arial
size=2>---------------------------------------------------------------------------------</FONT></SPAN></DIV></BODY></HTML>