PDA

View Full Version : Auto Reset IRD Portion of DTivo after IVAC



daurora
03-29-2002, 09:35 AM
While using emulation, could the Access Card ID information be used to spawn a reset of the the IRD portion of the receiver?

From what I have found the variable "IrdSerialNumber" will change to null after a IVAC (as long as it is re-exported). So with something running in a loop, I could keep checking that variable, but I don't want the whole damn receiver restarting just the IRD portion, can you independently restart just the IRD / Tuners?

BubbleLamp
03-29-2002, 02:18 PM
This type of discussion isn't really appropriate for this forum.

daurora
03-29-2002, 07:45 PM
Ok, let me ask the question differently. How can I shutdown and restart the IRD portion of the DTivo?

Thanks...

superzap
03-29-2002, 08:42 PM
There is no way other than System Reset->Restart or unplug. But rarely do you need to. Reset can be done externally, remove/insert card.

yngdiego
03-31-2002, 12:26 PM
To reboot the whole unit just type 'reboot' at the BASH prompt.

daurora
03-31-2002, 06:29 PM
I understand that you can reboot the entire receiver, my goal is to restart the IRD alone, and reduce the restart time to a few seconds. And also to forgo removing/reinserting the access card. I am trying to write something in TCL that detects an IVAC and recovers from it within a few seconds. I could reboot the entire DTivo but that takes too long. And I could take the card out and push it back in, but that means I would have to get off the couch. I want to build something into the software that does it automatically.

BubbaJ
04-01-2002, 12:06 PM
replace the physical card detect switch with something software controllable from linux. The reason that you can't just 'reset the ird' is that the ird software is running part in one place and part in another. This is one of the reasons the boot up takes so ling, tivoapp is syncing itself with the software running the tuner controllers

superzap
04-01-2002, 01:13 PM
This suggestion might help you find a way to trigger the card detect circuit. The "record" led (on the right just below the standby button on a DSR6000) can be changed to orange thru a TCL command. Unfortunately this same led is red while recording so you would need a circuit to detect whatever voltage or polarity causes the led to turn orange when the TCL command is issued. And of course you'd have to disable the normal software use of this led which is orange while a call is in progress. Here's an example to toggle the led in a TCL script ===> http://dealdatabase.com/forum/attachment.php?s=&postid=38043

IWantMyDTV
04-01-2002, 02:43 PM
Seems like a perfect job for the serial port on the back.

m2326
04-01-2002, 06:30 PM
If you've got Tivo/Turbo Net, you could send out a packet to a device like this: http://www.siteplayer.com to toggle the switch. Now the only problem is figuring out how to detect IVAC. Any ideas?

daurora
04-02-2002, 12:58 AM
To detect the IVAC you just need to re-export the IRDSerialNumber with
export IrdSerialNumber=$IrdSerial
the use an IF THEN statement looking for that variable to be null. (It goes null after an IVAC).

Aron2roy
04-02-2002, 01:03 PM
daurora, I sent you a pm.

RUBiK
04-02-2002, 03:03 PM
alright, so then it's trivial to write a simple shell script that loops and checks for that value...

any ideas what to do next, anyone?

i guess we can easily make the led "turn orange" when an IVAC happens... so this is somewhat helpful to me cause i sometimes come home and the tv is off and i don't know that my stupid roommates caused an IVAC by switching channels too fast for the millionth time until i actually turn on the TV and realize it's been sitting on IVAC for a long time and missed recording a few things...

we just gotta figure out a way to reset the DTV part of the dtivo now to "fake" a card take-out/re-insert... hrmm...

thanks a lot for all the info in this thread so far...

Aron2roy
04-02-2002, 03:28 PM
This file might help.

BubbleLamp
04-02-2002, 05:05 PM
Anyone tried this yet? Seems to me looking at the readme that it could affect performance, since it requires the /s switch. Interesting approach though.

RUBiK
04-02-2002, 07:20 PM
I haven't tried it and cannot try it due to slow emu PC that would choke on using "/s" for sure.

I'm also not so sure that the approach would work 100% of the time, as the frequency of packets is the driving factor and I haven't watched the stream enough to convince myself that the method this program is using is a good one to use anyway (i.e. the delay between screen output during heavy AND slow stream activity, etc.)

BBQ-AllStar
04-02-2002, 07:21 PM
There has to be a way to do this via software (script) than hardware mod...
Any ideas?

boojew
04-02-2002, 07:39 PM
Ahh mann... This means running MORE wire between my tivo and my pc... Albeit not much, but when your tivo is 2 floors up from your pc every additional wire I add is a big deal :(

I guess this method probably isnt for me

daurora
04-02-2002, 07:40 PM
Originally I was hoping that you could shutdown the process that controls the IRD and restarts it. When I looked down the list of processes, none of them seemed to be related to the IRD alone. If you kill any single process something (I assume a watchdog process of some kind), reboots the DTivo. If we could kill that watchdog and then kill the IRD process and then restart them, it would make a reboot much much quicker, this could be used in place of a complete reboot.

yngdiego
04-02-2002, 09:36 PM
Personally, I wouldn't mind a total DTivo reboot. Yes it takes several minutes, but if I'm on vacation or recording something a hole of a few minutes is better than no program at all!

Now I just wish there was a software only method to simulate the card insert/removal instead of the hardware mod. I'm not big on doing h/w mods to relative extensive and precious hardware.

Although I must say I am going to do the PROM protection hack.

daurora
04-02-2002, 10:28 PM
Fully rebooting DOES stimulate a card reset which will resume normal emulation. Try it some time, stop SLE or Pitou, restart it, the Dtivo will show IVAC, then reboot the DTivo normally. The emulation should resume. I have gotten a peice of code to work and make it to do a full reboot after IVAC automatically that is easy. I am working to make the system reboot in under 20 seconds. I just haven't been able to make the quick reboot work.

Let me ask this question, would anyone like the version that completely reboots automatically after an IVAC?

BBQ-AllStar
04-02-2002, 11:12 PM
Yes....

That would be great! It would be good to look at and try and tweak for fast reboot...

BBQ

daurora
04-02-2002, 11:57 PM
Alrighty, let me put it back together and I will throw it up on here Wednesday night. I need to change one thing to make it work with any AccessCardID. I am also going to make it only attempt to reboot once, and if that one time doesn't fix it then it won't reboot again until a card is pulled and reinserted manually, so that your receiver doesn't just keep rebooting over and over.

Thanks

PS I could use some one to check my TCL writing skillz! If anyone has time and a better grasp on writing in TCL please PM me.

yngdiego
04-03-2002, 08:37 AM
Awesome....I can't wait for the full reboot version. You don't know how much I worry about IVAC when I'm on travel and no one is at the house. Sometimes the Tivo lasts a day, sometimes a week.

RUBiK
04-03-2002, 04:13 PM
Originally posted by daurora
PS I could use some one to check my TCL writing skillz! If anyone has time and a better grasp on writing in TCL please PM me. why so complicated?

why not just a linux (bash) shell script that loops and just does a "reboot"?

oh.. you're having trouble looping it?

superzap
04-03-2002, 04:50 PM
A looping bash script is better on the TiVo than a looping TCL script. TCL scripts seem to use a lot of cpu and there is some watchdog which will shut down the script after about 52 minutes of cpu time. I've seen this happen conistently with mvchannels.

To loop a bash script I use this:

until [ -e /var/hack/$filename ]; do

(put code here)

sleep $delay

done

then it will shut down if you touch the file name of your choice.

daurora
04-03-2002, 05:16 PM
Superzap and Rubik,
Yea the looping was a problem, and I couldn't find any code that I could replicate that would do what I wanted. Plus I am trying to find a smart way to set it to not keep rebooting every minute in the event that a IVAC is not clearable.

all I am doing is
exporting the accesscardid

checking the variable to see if it matches my accesscardid (which I need to just convert to see if the variable is null)
if it matches, then it sleeps for 20 seconds and starts at the beginning, if not it reboots.

Inside of all of this I want it to create a file before it reboots, when the DTivo restarts the script would restart, if it sees that file then it just quits (thus preventing reboots over and over)

When I get out of work I will send what I have and you two can improve on it.

And do you think this is the same watchdog that causes a reboot if any of the manditory processes are not running?

Thanks

RUBiK
04-03-2002, 05:44 PM
hmm.. quick 1-minute typing-faster-than-thinking job here... something like this:


#!/bin/bash

# set loop delay
delay=300 # 5 minutes

if [ -e /var/hack/DoReboot ] then
rm -f /var/hack/DoReboot
fi

until [ -e /var/hack/DoReboot ]; do
export IrdSerialNumber=$IrdSerial

unset NullCheck
# if IrdSerialNumber is unset or null, set NullCheck var = 'yes'
NullCheck=${IrdSerialNumber:="yes"}

if [[ $NullCheck == "yes" ]] then
touch /var/hack/DoReboot
fi
sleep $delay
done

# out of the loop; do reboot here (write better code)
/bin/sync
/tvbin/rebootname it "IVACchk.sh" or whatever and exec from rc.sysinit upon bootup...

Note to All: DO NOT use above code as is as I do not have time to test it and I'm just typing up pseudocode more or less...

daurora
04-03-2002, 06:13 PM
That would be much closer then I got, thats damn good. Let me see what I get out of it.

Also, if you add some code to make it continue running after a reboot BUT NOT REBOOT. Have it continue checking for the null IrdSerialNumber, when that variable is no longer null then delete the file that prevents a reboot and restart normal operation.

I will try to help but you have a much better grasp on how to write this.

BubbleLamp
04-03-2002, 06:23 PM
Originally posted by superzap
A looping bash script is better on the TiVo than a looping TCL script. TCL scripts seem to use a lot of cpu and there is some watchdog which will shut down the script after about 52 minutes of cpu time. I've seen this happen conistently with mvchannels.



Not sure why you see that SZ, I'm looking at my ps aux output and see 249:23 for my mvchannels loop.

randymoss
04-05-2002, 12:29 PM
^ bump ^

superzap
04-05-2002, 05:33 PM
BubbleLamp,
I don't know why mchannels won't run longer for me, I'll have to test on another box. I figured it was TCL becuase I've heard that it is sensitive especially with scripts that have I/O ops.


Originally posted by daurora
To detect the IVAC you just need to re-export the IRDSerialNumber with
export IrdSerialNumber=$IrdSerial
the use an IF THEN statement looking for that variable to be null. (It goes null after an IVAC).
I'm not questioning you on this but I can't get the environment variable IrdSerialNumber to go null by forcing either a IAC or IVAC. Is there a secret to testing this?
If you do echo $IrdSerialNumber from bash you can see the value. What am I missing here?

boojew
04-08-2002, 06:33 PM
Rubik,

have you had time to code your pseudocode to TCL? I would love toget my hands on this.

Also, why not make the red LED blink.. that way we would know it was IVAC and not just recording... OR does it blink already ? (i havent tried it)

Is the reset of the IRD portion of this thread dead? Or does someone have a trick up their sleeves?

Thanks

RUBiK
04-08-2002, 07:19 PM
boojew

I haven't had time to fool around with it but i think it's pretty much "dead" if what superzap is saying is correct:


Originally posted by superzap
I'm not questioning you on this but I can't get the environment variable IrdSerialNumber to go null by forcing either a IAC or IVAC. Is there a secret to testing this?
If you do echo $IrdSerialNumber from bash you can see the value. What am I missing here? I haven't had time to re-export and check the environment variables after an IVAC, so we don't even know how/if that behavior takes place in this case.. ):

simonp
04-08-2002, 09:26 PM
If it's true that that environment variable does change after IVAC detecting it in a script should be easy. I'll try this tonight.

If, however, it doesn't change I'm still going to try looking at the pitou box itself. Seems to me I should be able to detect an ivac by watching the amount of cpu time the pitou process is using. I've noticed it drops to nothing once ivac happens. Then the pitou box can login to tivo and issue a reboot command, while it also restarts itself.

It might be a few days but I'll post again with what I find.

daurora
04-08-2002, 09:39 PM
Once is goes invalid, re-export, type "set" (without quotes) look for IRDserialnumber and you will see that it is blank.

^^^ PLEASE NOTE THIS IS WRONG IT DOESNT WORK I WAS WRONG ^^^^^^^^^^^^ (Changed 4/8 @ 9:20PM)

And regarding the IRD portion reboot, I still think that this can be done with more research, I am just too stupid to figure it out. I grew up in MS-Dos land and just started playing with linux.

In looking I have not been able to find anyone who has mapped out all of the running processes in the DTivo, so that we can control the IRD. My testing is limited because I piss off the wife every time I try reboot the DTivo and screw up the recording of Oprah. And god forbid I screw up Oprah, what I really need is someone to right a damn script to search the guide and delete her show and ensure it never returns. EVER!!!

superzap
04-08-2002, 09:48 PM
This is the code I wrote based on the environment variable IrdSerialNumber going null on IVAC. It doesn't work. If anyone figures out a way to detect IVAC let us know.

#!/bin/bash

# set loop delay
delay=300
# 5 minutes

while [ -e /var/hack/DoReboot ]; do
if [ "$IrdSerialNumber" = ""]; then
sleep $delay
else
rm -f /var/hack/DoReboot
fi
done

until [ -e /var/hack/DoReboot ]; do
if [ "$IrdSerialNumber" = "" ]; then
touch /var/hack/DoReboot
restart
fi
sleep $delay
done

daurora
04-08-2002, 09:50 PM
I am wrong, this doesn't work, it was just clearing. I am an *****

Doogie
04-08-2002, 10:16 PM
simonp

I haven't tried this yet but it does sound cool, I would have to switch to Max232's but that would be worth it if this works. check out this link


http://www.dssforums.ca/vb/showthre...&threadid=35207


letme know if anyone gets this going

Doogie
04-08-2002, 10:33 PM
Try this link

http://www.dssforums.ca/vb/showthread.php?s=&threadid=35207

BubbaJ
04-09-2002, 10:00 AM
there's an executable on there somewhere (I don't recall where and my DSL is down right now so I can't go look) that reads the card ID.. I would assume that in IVAC or IAC it would not read it or would complain in some manner.. give it a look.

Otto
04-09-2002, 11:21 AM
Not sure if this will help you guys, but will restarting myworld clear this condition?

switcherstart -k will cleanly kill off the running processes. I think switcherstart alone will start them back up, but you may want to check how rc.sysinit does it to be sure. And anyway, this may not clear your condition.

superzap
04-09-2002, 11:45 AM
BubbaJ,
If that executable is irdSerialNumber it seems to still report the ird sn even after IVAC.

Otto,
Thanks for your tip, that might expedite the reset, but the real problem is being able to detect the IVAC condition.

AlphaWolf
04-09-2002, 11:55 AM
perhapse some program could be written to pull data from /dev/cam, and find out what conditions would be met if an ivac occurs? Also, wouldnt it be better just to somehow induce the IRD portion to send a reset to the access card (possibly through /dev/cam)?

simonp
04-09-2002, 01:38 PM
I've got a script running which detects IVAC. It runs on the pitou box not the tivo and simply loops watching the accumulated CPU time of the pitou process. If the process doesn't "gain" time in a set interval you can assume that IVAC has happened and use Net::Telnet to telnet in to your tivo and execute any command, either reboot or now I'm going to try the switchrestart stuff mentioned above. I got the detection working last night and it works fine, but I've run into some "issues" with that damn tnlitd. The telnet module isn't handling communication well and most of the time it seems to hang or kill off the tnlitd process on my tivo and requires a reboot to straighten things out. (Just restarting the process didn't help) Once I get the telnet stuff working correctly it will reboot my tivo any time the pitou process goes idle for moe than about 3 minutes. Here is my code so far. Can't really test out anythign new until I get home from work today..

Anyway, this makes a few assumptions:

You run pitou on a stand alone, hard drive installed linux machine
You can telnet to your tivo, either orver serial ppp or tivonet
You have perl installed as well as the Net::Telnet module.

Here's my first attempt, if anyone can help with the Net::Telnet issue I could use a suggestion:

#!/usr/bin/perl

use Net::Telnet ();

$delay = 60;
$maxfail = 3;
$bootdelay = 300;

$pidfile = "/tmp/pitou1.pid";
$midfile = "/tmp/pitou-mux.pid";

$pitouid = `cat $pidfile`;
$muxid = `cat $midfile`;

$oldtime = "";
$fail = 0;

while ( 1 == 1 ) {
$time = `ps $pitouid | cut -c20-26 | grep :`;
chomp $time;
print "$time\n";
sleep $delay;

if ($oldtime eq $time) {
$fail++;
print "Failed $fail\n";
if ($fail >= $maxfail) {
print "Reboot it!\n";
&doreboot;
$fail = 0;
sleep $bootdelay;
}
}

$oldtime = $time;
}


sub doreboot {
$t = new Net::Telnet (Timeout => 10,
Prompt => '/bash-2.02\#/');
$t->open("192.168.0.2");
sleep 4;
$t->print("reboot");
# $t->login();
# @lines = $t->cmd("reboot");
$t->close;
print "Sent command\n";
# print @lines;
}

simonp
04-09-2002, 05:26 PM
I figured out the telnet problem. The script now works for me. You need to setup the variables at the start of the script for your environment. IP addr of tivo $tivoip, and .pid file for running tivo process are a minimum. You must have perl and the per Net::Telnet module installed, as well as telnet working on your tivo.

IMPORTANT: This is not intended to run on your tivo, it's made to be run on a linux machine running pitou.

The script prints out the process time as it goes so you can watch what happens. It'll tell you when it fails to see more CPU used by pitou and then tell you it's sending the command to reboot tivo itself.

You can send any command you like to tivo by changing the $tivocommand variable. You can call a script that way if you want. Right now it just sends the word reboot.

Anyway I started the script this afternoon, waited a few minutes to make sure it was passing it's checks ok, then pulled my emu, watched it fail and then it rebooted the tivo all by itself. So far so good.

I'm going to add another subroutine to actually restart both pitou and pitou-mux every time as well. This script is just the bare bones for rebooting your tivo when it ivacs.

BubbaJ
04-10-2002, 11:05 AM
From the good folks at tivo:

camdiag

you'll probably want camdiag out or camdiag status..

(it's a tivo executable in the zip file)

AlphaWolf
04-10-2002, 11:28 AM
hehe, I knew there had to be something like that lieing around, and I bet that theres probably a rather simple way to invoke a reset to the access card which would be faster than anything.

BubbaJ
04-10-2002, 11:48 AM
well.. I don't RECALL seeing anything that would do it, but if you REALLY wanted to, you could probably hijack something in the .btl to jump to the card insert routines when you send a command via send5505..

superzap
04-10-2002, 12:59 PM
Thanks BubbaJ.
Here's a test script that should restart (reboot) after IVAC, IAC. You might want to adjust the delay time, currently set to 1 minute. Put it in rc.sysinit like this:
/tvbin/IVACchk.sh >>& /dev/null &

Transfer camdiag and the script IVACchk.sh to /tvbin

This might not work 100% since you might need to restart emu also.

Now if we could figure out how to reset without rebooting...

BubbleLamp
04-10-2002, 01:12 PM
Haven't tried this yet but good work SZ. One comment, if you've chattr'd your hack dir, the touch command won't work.

superzap
04-10-2002, 01:21 PM
If you're using v25xtreme you shouldn't have to chattr anything. That was a v2.0 thing. And touch should be in /bin since that's where v25xtreme installs it.

Also don't forget to:
chmod +x /tvbin/camdiag /tvbin/IVACchk.sh
after transferring the files.

ruckus
04-11-2002, 11:16 AM
So which would be the better way to go here? It looks like Superzaps method only checks the Tivo while simonp's will restart both the EMU and the Tivo.

superzap
04-11-2002, 12:30 PM
If you're using pitou and have hard drive installed linux, perl and telnet, try simonp's method.

For SLE44 users you could use the IVAC 1.1 method posted by Aron2roy on page 1. This method uses a TSR that detects IVAC on the pc and causes the IRD to think the card has been pulled. It doesn't restart SLE44 and requires hardware mods.

What might work in conjunction with IVACchk.sh on the pc is a TSR similar to the IVAC 1.1 TSR that would use the same logic to detect IVAC with SLE44 which would terminate SLE44 and restart.

alldeadhomiez
04-11-2002, 03:14 PM
Originally posted by BubbaJ
well.. I don't RECALL seeing anything that would do it, but if you REALLY wanted to, you could probably hijack something in the .btl to jump to the card insert routines when you send a command via send5505..

From what I've observed, most IRDs will try to reset the access card about three times (through the DCD line) before going IVAC.

There's no reason why this loop couldn't be tampered with so that it never gives up on trying to re-establish communication with the access card. Although the question remains of whether or not your Tivo will lock up if your card stops responding or the card switch gets stuck (which may trigger a watchdog timer, which may trigger a full reboot, which is better than nothing anyway :).

-adh

simonp
04-11-2002, 07:20 PM
I've got a newer perl script that will maintain a telnet connection to your tivo all the time (and reestablish it if it gets broken), do it's checks for IVAC over telnet, using the new method, and handle restarting both pitou and/or the tivo when necessary. I want to give it a test and work out the bugs tonight before I share it however.

For you experts out there I had some thoughts and questions...

I did a unix "strings" command on the camdiag binary and it shows:

tasha# strings /tricorder/software/camdiag
%s in : wait until a CAM is inserted
%s out : wait until a CAM is removed
%s status : return CAM status informaton
SendRequestMessage failed (result = %d)
CAM not inserted.
Subscriber ID = %s
CAM ID = %s
opening driver
### Error - driver.OpenDriver() returned %d
/dev/oslink
/dev/oslink2
/dev/cam
/dev/cam2
----------------------------------------------------------------------

In a different unix environment I could use the fuser command to tell which process have opened specified files. I setup the x compiler from tivo and samba, and am having problems with the ncurses and termcap libraries not being there when I try to configure fuser to compile.

Has anyone managed to get those two libraries compiled and working under tivo? If we can get fuser working it might tell us which processes are touching /dev/cam. Just a thought...

Also, is there any refrence to the cam in the tivo kernel source? If it's a device file it must be included in the kernel somewhere, right?

simonp
04-12-2002, 01:17 PM
Here is is. I know a lot of people won't be able to use it, but if you've been looking for an excuse to install linux and get away from the floppy distro, this is a good reason. Hopefully I'll never come home to another ivac .

Please take a look at the beginning if the file for more...

--simon

AlphaWolf
04-12-2002, 02:44 PM
To eliminate the need for aditional serial ports/hardware mods, wouldn't it just be easier to just use superzaps script to reboot the tivo, and then on the pitou machine have a script run which detects a crash and restarts the emulator (not the entire system)?

simonp
04-12-2002, 05:21 PM
Sure separate loops on each machine would work fine. I wanted not only automatic restart of both pitou and tivo on ivac, but the ability to log the ivacs and pitou restarts when they happen. It also keeps some (very minor) additional load off the tivo. The centralised handling of them both also lets me make more interesting decisions in the code.
Say for example we find a way to reset the cam without a reboot, I can very easily make it first reset the cam, and if that doesn't clear the ivac, restart pitou, and reset the cam again. In that case we could probably get ivac recovery down to under 30 seconds in most cases, no matter whether the problem is pitou or tivo.

If running pitou off of a HD linux install, setting up a network connection to your tivo, or installing Net::Telnet is too much, then this script is not for you. Really this is just something I've been thinking about doing for myself for a month or so and this thread finally got me off my ass to do it.

Be a little careful as rebooting from within the tivo could put you into a reboot loop if it doesn't clear the ivac on restart.

If anyone wants a version that only restarts pitou (based on CPU time and process running, no telnet connection) when it stops processing, or flat out dies, I'd be happy to whip that up.

--simon

degobah9
04-12-2002, 06:29 PM
Simonp... I'd like that script. Until I can get PPP setup it seems like the best solution. Thanks in advance!

kyopo
04-12-2002, 08:53 PM
Resetting the Tivo because of an IVAC is pretty drastic. That's like restarting your computer because an application crashed (you could just restart the application).

The best solution is something along the lines of what BubbaJ suggested earlier, creating some sort of workaround to trick the IRD into thinking it was reset or the card was re-inserted.

But for now, I've currently gotten around this problem by connecting the DTR signal of my emulation PC serial port (the one that goes to my MAX232 for emulation) and connecting this directly to the Smartcard card-switch in the Tivo (the one that tells the IRD whether the card is inserted or not). Toggling the DTR from my PC, I can trick the IRD into thinking I've re-inserted my card. A monitor process watches my pitou.log and automatically restarts the Pitou process if it hasn't been written to in the last 5 seconds.

If my DirecTivo IVAC's, it's automatically restarted in 5 seconds. Certainly not the best solution but much less extreme than rebooting the Tivo machine.

If you're interested, I made a more detailed explanation of this in one these threads. Try searching on "watchdog".

hades
04-13-2002, 01:11 AM
Simonp,

I too would be interested in something that would just reset pitou. I am using the basic floppy distro from a computer in another room and dread the thought of having to run even MORE wires into my Living/Home Theater room....

Thanks
Hades

BubbleLamp
04-13-2002, 01:50 AM
I still run SLE most of the time, but would switch to pitou to use your IVAC fix. Problem is I use a floppy-only box to keep the noise down in my viewing room. Is there any way to have your script watch STDOUT or something instead of the pitou log? Just an idea. (I'm not a programmer, and I don't play one on TV.)

Edit: Never mind, I just realized you need Perl. I was having a senior moment.

AlphaWolf
04-13-2002, 11:51 PM
simonp: if you had a script like that, that would be great :) BTW You might consider sending your script to the folks at mypitou.com and see if they would add it to the official distribution. It wouldn't be a bad thing to have the emulator reset itself rather than have to reboot it entirely. Course thats not necessary with the HDi distro either, but right now I don't have the HDD capacity to set it up (loaned the damn thing out).

simonp
04-15-2002, 06:27 PM
Sorry it took so long. I decided that I had to do this in bash because perl wouldn't be on a pitou floppy and I wanted floppy users to be able to use this as well. So I had to actually go learn bash scripting well enough to redo it and that was the delay.

Please read the script first. There are issues concerning the timing between the two scripts on tivo and pitou that you should understand.

If someone who runs the floppy distro can fill in the variables for mux.pid pitou.pid and the start scripts for the mux and pitou, I'll send this out again in a format that most floppy users should be able to drop in easily.

I got this to run OK last night at home, but have since added in a lot of comments and yanked out some dubugging lines. I'm going to post it anyway, without a final check, please let me know if you have problems and what they are and I'll fix them.

I don't know if this would matter much to someone not running a tivo, but if people here are able to use it and it helps them, then I'll submit it to the mypitou folks and see what they think.

simonp
04-15-2002, 06:29 PM
Forgot to attach...

AlphaWolf
04-15-2002, 09:15 PM
Actualy it should be of use to anybody, it would remove the need to have to either manualy restart the processes or hit the reset button on the computer if you don't have a keyboard plugged in.

yngdiego
04-21-2002, 07:32 PM
Does anyone have a Tivo script that reboots the Tivo if it IVACs?
It sounds like to use the Pitou script method that you need to somehow do some wiring that triggers the card reset line in the IRD. I don't mind waiting 5 minutes for a tivo reboot.

superzap
04-21-2002, 08:11 PM
Go back to page 4 of this thread and see my post with attached script.

ruckus
04-22-2002, 01:01 PM
superzap - how well does the reboot script work. If the box IVAC's does't that mean the CPU has also IVACed? What good is just rebooting the Tivo?

AlphaWolf
04-22-2002, 02:12 PM
run simonp's script on your emulator (pitou only, SLE would require a TSR type program to work, one exists but requires a hardware mod to work.) and that will reset it if it crashes. Pitou should restart much faster than the tivo, so by the time the tivo resets it will communicate with the card properly and things would work as normal.

superzap
04-22-2002, 02:55 PM
Still working on the SLE44 part. Should be doable but don't have it working yet. My x86 asm/DOS skills are a little rusty and could use some help.

ruckus
04-22-2002, 03:20 PM
I'm curious though, is there ever a time that the Tivo IVAC's and the CPU process is still running? My guess would be that when the Tivo IVAC's it is due to the CPU process dieing so just rebooting the Tivo would not help. Has anyone had any success with just rebooting? If it worked even part of the time it would be better than not at all.

I've got my TurbotNet card and I'm waiting to run cable to switch to Pitou. I've tried setting up a wi-fi connection on my linux PC to avoid running cable but I'm having trouble with the damn USB Linksys. Any suggestions?

AlphaWolf
04-22-2002, 05:07 PM
rebooting the tivo will completely reset the sti5505, causing it to in turn reset the card. Should work every time

ruckus
04-22-2002, 06:47 PM
I'm curious though, is there ever a time that the Tivo IVAC's and the CPU process is still running


Sorry, let me rephase that.

Is there ever a time that the Tivo IVAC's and the EMU process still continues to run?

superzap
04-22-2002, 07:17 PM
The IVACs I get with SLE44 invariably needs both the DTivo and the emu pc reset. Most of the time just a pull of the emu board and a restart of SLE44 recovers, but occasionally a DTiVo reboot is needed to reset a 745.

boojew
04-22-2002, 08:39 PM
In the rc.sysinit it makes reference to the NDS sniffer. This wouldnt have anything to do with the access card would it? Could it be looking for the access card? If so cant we restart this process?

I know I'm probably way off.. But I was just wondering

BubbaJ
04-23-2002, 09:33 AM
boojew: no.

it isn't a process.

It doesn't run on the PPC or under linux.

It CANNOT be reset. (well.. OK it can.. but you have to do a hardware reset on the 5505s to do it, then tivoapp will die because it lost sync with the 5505s, and reboot your tivo in a mean fashion, which would be a REALLY complicated way of reseting your tivo.. :D)

yngdiego
05-19-2002, 01:04 PM
Originally posted by superzap
Thanks BubbaJ.
Here's a test script that should restart (reboot) after IVAC, IAC. You might want to adjust the delay time, currently set to 1 minute. Put it in rc.sysinit like this:
/tvbin/IVACchk.sh >>& /dev/null &

Transfer camdiag and the script IVACchk.sh to /tvbin

This might not work 100% since you might need to restart emu also.

Now if we could figure out how to reset without rebooting...

I'm having problems with the script. I uploaded it, chmod, and all of that business. If I run it manually "./IVACchk.sh", it detects the invalid CAM and does reboot.

But when I type "tvbin/IVACchk.sh >> /dev/null &" and cause an invalid CAM, nothing happens. I also put the above line in my rc.sysinit and it doesn't respond either. After the reboot the /var/hack/DoReboot is still there.

What am I missing?

AlphaWolf
05-19-2002, 01:23 PM
you did upload and chmod +x camdiag didn't you?

yngdiego
05-19-2002, 01:43 PM
Yes, like I said, I can manually run it using ./ and it works fine.

RUBiK
05-20-2002, 03:39 PM
Originally posted by yngdiego
But when I type "tvbin/IVACchk.sh >> /dev/null &" and cause an invalid CAM, nothing happens. Please confirm that you are using "/tvbin/IVACchk.sh >> /dev/null &" and NOT "tvbin/IVACchk.sh >> /dev/null &" like you've written above..

BIG difference there (the leading '/')...

rewrite
05-21-2002, 01:15 AM
Would it be possible to have the script detect the IVAC, and put onto the TV screen something like:

"IVAC detected, system will reboot in approx. 5 minutes"

then....

after 300 seconds or so, launch the reboot.


I was thinking this could be done via OSD rather than in the boot299.btl

superzap
05-21-2002, 09:00 PM
OK rewrite give this a try.

rewrite
05-25-2002, 05:46 PM
wow! thanks superzap..

One last thing... for some reason when I changed to this new one, my t60, if it IVACs the second time, will continue to reboot over and over.

(Preiviously if it didn't find a card after the reboot it did not continuously reboot in an endless cycle)

Could I have messed up the touch part?

superzap
05-25-2002, 06:32 PM
Make sure you still have a /var/hack directory. On the first IVAC a file is created, /var/hack/DoReboot so that a loop will not occur.

I can't see why the change would cause rebooting. As a test try restoring the old version.

rewrite
05-25-2002, 06:45 PM
ah ha, I forgot that part of the 2.5extreme upgrade directions include rm -rf /var/hack
(I had upgraded my 2.5 last night)


Thanks again...

rewrite
05-27-2002, 01:29 PM
Superzap... you are THE MAN!

After playing with this a few days, I have to say this is the coolest new script I've put on my Tivo in weeks!

I especially like to have it say (via OSD) "Warning! IVAC! Please reset card slot, or I will reboot in three minutes"

One (humble) question: how could I modify this file so that if the card slot is reset withi three minutes time of detection, it would not actually reboot? (Is there a way to make it double check whether $word7= CAM one last time before it actually issues restart?)

Also, how could this file be modified so that it will force the reboot only if it has not rebooted itself in the past hour?

Here's roughly what I want it to do, pardon my non-technical description:

1. Look for camdiag to indicate an IVAC has occured.
2. Upon IVAC, OSD the warning to reset the card slot within 3 minutes
3. sleep 180
4. If after 180, camdiag still indicates that an IVAC is still going on, reboot the entire receiver via restart
5. Upon reboot, look to see if IVACchk issued the reboot command within the last hour
6. If IVACchk rebooted in the past hour, don't do it again, at least not right away

Any suggestions whatsoever are more than welcomed! And please take these ideas as humble and grateful ideas for improvement, and certainly not demands or "spoon-mongering".

:)

superzap
06-06-2002, 11:32 AM
Here's an enhanced version of IVACchk that will cancel the reboot if the IVAC is cleared within 5 minutes (changeable) and thereafter will continuously reboot every 10 minutes (changeable) until IVAC cleared.

onyx00
06-08-2002, 12:09 AM
I still think rebooting your Tivo is way way over kill.

By next week I will have some new P2 source set up that will allow anyone using a Max232 or Max233 emulator to automatically reset the card slot and keep you running. (By the way, not my idea, another member of the forum, so I can't take any real credit).

BubbleLamp
06-08-2002, 12:27 AM
Originally posted by onyx00
By next week I will have some new P2 source set up that will allow anyone using a Max232 or Max233 emulator to automatically reset the card slot and keep you running.


Will that be for SLE or Pitou based EMUs?

AlphaWolf
06-08-2002, 01:18 AM
bubblelamp: you surprise me these last few days, now your forcing me to be arrogant ;)

Pitou=Pee-Too or P2
Source: SLE is closed source

BubbleLamp
06-08-2002, 01:38 AM
Originally posted by AlphaWolf
bubblelamp: you surprise me these last few days, now your forcing me to be arrogant ;)

Pitou=Pee-Too or P2
Source: SLE is closed source


I took it to mean the P2 card, which is emu'd by both of them. :D

Damn, now I have to go pee too! :eek:

AlphaWolf
06-08-2002, 10:32 AM
ya just a lot of people in IRC these days like to call it just P2 instead of pitou. I dont see why b/c it does add to the confusion.

superzap
06-08-2002, 12:43 PM
I'm not sure what onyx00 is referring to, but if you read back through this thread it looks like simonp has already done this for P2. What we need is a solution for SLE44 for those of us using laptops or other PCs that can't run P2.

AlphaWolf
06-08-2002, 03:33 PM
sz: I think he may be talking about a way without adding extra wiring, just modifying the data logger, or either that through the same serial port. (whereas other mods require additional serial ports or the use of the parallel port.)

onyx00
06-08-2002, 05:11 PM
It's using Simonp's method, but I am going to do a couple things to modify it:

1.) Simonp uses his own special source code; I am going to take the 163 Entropy source and make some modifications to make it more DTivo friendly and also integrate the auto reset.

2.) Going to try to find a way without extra wiring, but I think the extra wiring is not that hard. I will try to refine the process and get some pictures to help those that are less electronically inclined. But most of you did the PROM write protect mod, and if you did that you can do the wiring mod.

I will keep people updated.

Those using SLE, I suggest switching to Pitou, it is much better. :-) Plus, when we get hashed, the source can be fixed and recompiled in minutes.

rewrite
06-09-2002, 02:43 PM
Originally posted by onyx00
[...]...

2.) Going to try to find a way without extra wiring, but I think the extra wiring is not that hard. I will try to refine the process and get some pictures to help those that are less electronically inclined.
[...]



Has anyone ever considered using some of the unused wires of the serial cable already run to send the signal to reset the emu? IIRC we only use either 2 or 4 wires currently.

AlphaWolf
06-09-2002, 03:13 PM
IF we get hashed, directv was attacking the crap out of HU's, and I heard a few people say they saw a few minutes of freezing with SLE...no problems with pitou however....

I bet the ultimate solution to the IVAC problem would probably lie in the emulator automaticaly reseting the aux when it fails, with enough time to spare to have the emu port ready by the time the IRD sends the third reset.

Either that or always respond with falsly generated ASIC responses, and then resume de-hashing the video stream once the aux card is re-initialized.

smokeman
07-21-2002, 12:46 PM
now that we are this far, is there any way on a dtivo, to make it to where an subb'd bin is no longer needed?

superzap
07-21-2002, 01:31 PM
Originally posted by smokeman
now that we are this far, is there any way on a dtivo, to make it to where an subb'd bin is no longer needed? Yes, but it's not public. Search the forums for nozkt mod.

Perplexer
07-21-2002, 04:13 PM
I hate to sound like a stick in the mud, but this topic is outside the scope of this forum. Besides, even with a nozkt mod, a valid CAMID is still required.

BubbaJ
07-21-2002, 09:38 PM
Originally posted by Perplexer
Besides, even with a nozkt mod, a valid CAMID is still required.

since when? oh yeah wait.. I have a p99 card.. 0427-XXXX-XXXX

Also, discussing the existance of DirecTV hacks is not against the rules, discussing specifics is. And there's certainly nothing wrong with telling someone to go look elsewhere. (AFAIK)

Perplexer
07-21-2002, 10:49 PM
My bad... I never thought about trying a number outside the current accepted CAMID range...

Is the football player on your P99 card wearing a spacesuit?

OK... it's possible. Go look elsewhere. (Boy, do I feel like a prick) :D

All the discussion on clearing IVACs begs the question: is it really affecting so many, so often, that you'd want to constantly run a watchdog process to clear it? I've had one IVAC with SLE in the last month, and that's due to me really jamming on the channel up/down button. Low-end, extremely non-standard PC as well.

rd001
07-22-2002, 12:56 AM
Originally posted by Perplexer to BubbaJ
My bad... I never thought about trying a number outside the current accepted CAMID range...Don't listen to the Bad Man. Obviously, he is in league with the devil.

BubbaJ
07-22-2002, 11:17 AM
Originally posted by rd001
Don't listen to the Bad Man. Obviously, he is in league with the devil.

ROFLMFHO

onyx00
07-24-2002, 02:26 AM
All the discussion on clearing IVACs begs the question: is it really affecting so many, so often, that you'd want to constantly run a watchdog process to clear it? I've had one IVAC with SLE in the last month, and that's due to me really jamming on the channel up/down button. Low-end, extremely non-standard PC as well.

We had a thread about this going on the Pitou forum over at PitouForums and there were a good amount of people having the same problems.

Mine is inconsistent. I get it sometimes once a day; sometimes once every 4-5 days. It all depends. I have looked in to the hardware, and it's all working pretty well. Not sure what it is that is causing it. If I get some time I will look more in to it.

Right now it isn't bad enough for me to worry though.

superzap
07-24-2002, 12:12 PM
I'm not sure if there is a comparable way to set a aux delay with pitou as mentioned by jore in this thread (http://dealdatabase.com/forum/showthread.php?s=&threadid=13752) for SLE44, but it has reduced my IVACs down to almost zero.

onyx00
07-24-2002, 10:55 PM
You can set the AUX delay in Pitou, but we need a number. Any way to find out what that adjusts the new AUX delay to? Maybe in the help file or read me or something?

:-)

AlphaWolf
07-24-2002, 11:49 PM
Ah TMI, I've got an answer for you though onyx00, drop me a PM if you want to know.

Dragon88
08-16-2002, 01:56 AM
Quote:

"If someone who runs the floppy distro can fill in the variables for mux.pid pitou.pid and the start scripts for the mux and pitou, I'll send this out again in a format that most floppy users should be able to drop in easily. "

Would someone please give me step by step instructions on how to "drop" Simonp's pitoupd.txt into floppy distro. I am a newbie and have very limited knowledge of Linux.

Thank you in advance for your help.

rfeynman
10-09-2003, 05:40 PM
Originally posted by superzap
Thanks BubbaJ.
Here's a test script that should restart (reboot) after IVAC, IAC. You might want to adjust the delay time, currently set to 1 minute. Put it in rc.sysinit like this:
/tvbin/IVACchk.sh >>& /dev/null &

Transfer camdiag and the script IVACchk.sh to /tvbin

This might not work 100% since you might need to restart emu also.

Now if we could figure out how to reset without rebooting...

Hello I thought I would resurrect this thread with a newbie question about where to put this in the sysinit file. Also, do I add it exactly as it is printed "/tvbin/IVACchk.sh >>& /dev/null &", because thats what I did and the IVACchk.sh does not run, also when I put anywhere but at the very last line of the file, I get no bash upon reboot. I chmod + x both camdiag and IVACchk after copying them to tvbin. Please advise, thanks in advance.

JJBliss
10-09-2003, 06:58 PM
Originally posted by rfeynman
Hello I thought I would resurrect this thread with a newbie question about where to put this in the sysinit file. Also, do I add it exactly as it is printed "/tvbin/IVACchk.sh >>& /dev/null &", because thats what I did and the IVACchk.sh does not run, also when I put anywhere but at the very last line of the file, I get no bash upon reboot. I chmod + x both camdiag and IVACchk after copying them to tvbin. Please advise, thanks in advance.

Are you sure you transfered them as binary files?

How did you transfer the file?

rfeynman
10-09-2003, 10:51 PM
JJbliss, I transfered the files using tera term through the Zmodem, so i believe it was a binary transfer. I am still wondering if superzap's code is exactly what is needed, and if so where it goes in the rc.sysinit file. I have previously used joe to edit and save the rc.sysinit file and then chmod +x it, before rebooting. As previously stated, i get no bash prompt if the code is anywhere but the very last line of the file. Thanks.

JJBliss
10-09-2003, 11:01 PM
Does it run interactively from the bash prompt?

rfeynman
10-10-2003, 06:37 AM
JJBliss,
I get a "no such file or directory" error when i attempt to run the IVACchk.sh script from the bash (by typeing ./IVACchk.sh). What could could this be from, running 3.1? I have the files in the tvbin directory, is the script unable to create the temp file DoReboot?.

JJBliss
10-10-2003, 09:01 AM
Originally posted by rfeynman
JJBliss,
I get a "no such file or directory" error when i attempt to run the IVACchk.sh script from the bash (by typeing ./IVACchk.sh). What could could this be from, running 3.1? I have the files in the tvbin directory, is the script unable to create the temp file DoReboot?.
It's possible.

Is the drive mounted as read/write? Or is it write protected?

But the error "no such file or directory", means (to me) that the file is corrupt. It might have "^M" characters at the end of every line, or be otherwise hosed. You say you've chmod +x 'ed it, and you get that error.

USUALLY, that's an improperly transfered file, or a file that was saved in PC format, and not Unix.

David Bought
10-10-2003, 12:14 PM
Originally posted by JJBliss
But the error "no such file or directory", means (to me) that the file is corrupt. It might have "^M" characters at the end of every line, or be otherwise hosed. You say you've chmod +x 'ed it, and you get that error.

USUALLY, that's an improperly transfered file, or a file that was saved in PC format, and not Unix.

JJ is right this time. A lot of incompetent users on this board post Tivo scripts in DOS format, expecting the end-user to run a Windows FTP client in ASCII mode in order to convert the files as they are transferred to the Tivo. This stupidity must end.

I would just like to point out that with all the public information available on the btl file that was never available in the past, it is not difficult to develop a patch for the btl instead of hacking up camdiag and forcing a Tivo restart. It has been done.

rfeynman
10-10-2003, 11:18 PM
JJBliis, I have tried the script as it is, without opening it, I have also tried using dos2unix on a text version of it. I have tried the file mounting the drive as read/write (rdrw) and read only. I realize the script is relatively simple, but could anybody offer a suggestion why it would give me this error.
Mr. Bought, if you had read the thread, you would have seen that Superzap is the one that posted the script, and I do not consider him one of the "incompetent users", nor do I think he would supply something in the incorrect format. Which leaves either the method of transfer (me as the incompetent user), or some something that is incompatible with my set up.

JJBliss
10-11-2003, 12:26 AM
I think it's ridiculous, but I heard that folks with problems have success typing

tivosh ./IVACchk.sh

What about that?

David Bought
10-11-2003, 12:58 AM
Originally posted by rfeynman
Mr. Bought, if you had read the thread, you would have seen that Superzap is the one that posted the script, and I do not consider him one of the "incompetent users", nor do I think he would supply something in the incorrect format. Which leaves either the method of transfer (me as the incompetent user), or some something that is incompatible with my set up.

The file was posted in the correct format (UNIX). This appears to be a problem between the keyboard and the chair on your end.

rfeynman
10-11-2003, 02:58 AM
JJBliss, thank you for your suggestion, I will report back any findings.

Mr. Bought, yes, thank you for restating that the file is in the correct format, apparently I was unclear. And while I appreciate you actually reading the thread, your post was all together useless.

David Bought
10-11-2003, 12:14 PM
Originally posted by rfeynman
Mr. Bought, yes, thank you for restating that the file is in the correct format, apparently I was unclear. And while I appreciate you actually reading the thread, your post was all together useless.

1) You were unclear. As somebody who can't even figure out how to run a simple shell script, your uncorroborated "opinion" that the posted file is correct is completely worthless.

2) "Altogether" is one word.

3) Have you figured it out yet? It's so simple...

4) Quit trying to start fights. We don't tolerate that crap here, especially not from people like you.

rfeynman
10-11-2003, 05:14 PM
JJBliss, I added a mount/remount to the script to change it to read/write, then back to read only when its done to enable temp file creation. I'm not sure if this is the most efficient way to do this, but it works.

Mr. Bought, yes i figured it out, no thanks to your feckless replies. You were simply verifying the script was in the correct format, as you stated, and when I said "nor do I think he would supply something in the incorrect format", that is exactly what I meant. I will leave the "people like you" comment unaddressed, and say simply, nobody else was confused but you, and that was because you didn't read the entire thread. Do not blame others for your incompetence. Thank you for the spelling correction.