PDA

View Full Version : Problems running Fixsub



onyx00
09-13-2003, 11:55 PM
Just did the Monte hack; now trying to run fixsub and getting these errors:

bash-2.02# ./fixsub.tcl
./fixsub.tcl: tvsource: command not found
./fixsub.tcl: proc: command not found
./fixsub.tcl: puts: command not found
./fixsub.tcl: try: command not found
./fixsub.tcl: RetryTransaction: command not found
./fixsub.tcl: line 12: syntax error near unexpected token `($'
./fixsub.tcl: line 12: ` set today [expr ($now / 86400)]'

My rc.sysinit.author (using that instead of hackinit) is as follows:

#!/bin/bash
date>>/hack/hackinit.log
PATH=/hack/bin:/sbin:/bin:/tivobin:/tvbin:.
TIVO_ROOT=
MFS_DEVICE=/dev/hda10
IGNOREEOF=1000
export PATH TIVO_ROOT MFS_DEVICE IGNOREEOF

What is wrong? Am I missing something?

metrotech
09-14-2003, 12:28 AM
Onyx00

2 things may be the problem, is your editor UNIX capable (LF only, windows editors do CR and LF) and when you are transferring files to your tivo make sure they are going over as binary files not ASCII, if your ftp client software is set to auto it might transfer .tcl files as ASCII. The way you can check this is look at the file sizes on your tivo and compare them to what is on your computer if they are not the same then they are being transferred as ASCII. You did a chmod +x on the file didn't you?

MT

onyx00
09-14-2003, 12:58 AM
I am using VI to create the files and I always make sure I do ":set fileformat=unix" and I transfer using ZModem over the serial port.

Thanks.

metrotech
09-14-2003, 01:06 AM
Here is a copy of the one I run, see if it helps.

MT

------------------------------------------------------------------------------------
#!/tvbin/tivosh

##############
# fixsub.tcl #
##############

tvsource $tcl_library/tv/mfslib.tcl

proc FixSub {db} {
puts "Inside fixsub"
try {
RetryTransaction {
set now [clock seconds]
set today [expr ($now / 86400)]
set stateExpiration [expr ($today + 1)]
set nextCall [expr ($stateExpiration * 86400)]
set lastCallStatus "Succeeded"
set callStatusInfo "Succeeded"

set sobj [db $db open /State/PhoneConfig]

dbobj $sobj set LastDialInUpdateDate $today
dbobj $sobj set CallStatusInfo $callStatusInfo
dbobj $sobj set LastCallAttemptSecInDay $now
dbobj $sobj set LastSuccessPgdCallSecInDay $now
dbobj $sobj set LastSuccessCallSecInDay $now
dbobj $sobj set LastCallStatus $lastCallStatus
dbobj $sobj set NextCallAttemptSecInDay $nextCall

set ssobj [db $db open /State/ServiceConfig]

dbobj $ssobj set ServiceStateExpiration $stateExpiration

set ssobj [db $db open /State/GeneralConfig]

dbobj $ssobj set Complete 7
}
puts "done with fixsub"
} catch errCode {
puts "Failed to FixSub, code=($errCode)"
return 0
}
return 1
}

set db [dbopen]
FixSub $db
dbclose $db


proc Succeeded {db} {
puts "Setting call to Succeeded"
try {
RetryTransaction {
set lastCallStatus "Succeeded"
set sobj [db $db open /State/PhoneConfig]
dbobj $sobj set LastCallStatus $lastCallStatus
}
} catch errCode {
puts "Failed to set LastCallStatus, code=($errCode)"
return 0
}
return 1
}

onyx00
09-14-2003, 02:53 AM
Seemed to work, but haven't rebooted yet.

Said this:

bash-2.02# ./fixsub.tcl
Inside fixsub
done with fixsub

How can I confirm it worked? So I run this every 30 days or so?

metrotech
09-14-2003, 07:18 AM
Thats what your supposed to see. There are many ways to run this but this is what I use to run mine it runs every time I reboot. The sleep 60 is so the date has updated on the box before it runs.

sleep 60
/var/hack/fixsub31.tcl &

rpl
09-14-2003, 02:53 PM
How can I confirm it worked? Just check your menu -system info. Should see daily call succeeded. In two-four weeks if it didn't work you would get a message that your TIVO needs to call home.

DawG
09-16-2003, 09:30 PM
I have spent many hours reading and testing. I have gotten my HDVR2 upgraded to 120 gigs and it will accect an HU card. But for the life of me I can't get fixsub to work. Anyone feeling generous and willing to pm me the "big" picture? ie, the relationship between 31fixsub.tcl, fixsub.tcl, fixsub31.tcl.

1.How do they relate to each other?
2.Where do they go?
3.Where does boot299.tcl fit in? How is it executed?

Thanks in advance for the help!!!!:confused:

metrotech
09-16-2003, 10:32 PM
DawG

31fixsub.tcl, fixsub.tcl, fixsub31.tcl are probably all the same file just check them to see if they are, open in an editor program and just look line by line at each one to see if they are the same. If you decide to edit these files make sure you use a unix capable editor.

Just one goes into the /var/hack directory

boot299.tcl does not apply to the HDVR2, thats a series 1 file.

MT

rpl
09-16-2003, 10:39 PM
relationship between 31fixsub.tcl, fixsub.tcl, fixsub31.tcl.

1.How do they relate to each other?
2.Where do they go?
3.Where does boot299.tcl fit in? How is it executed?
The relationship is these are possibly slightly different/modified versions of the same file. As you can see from Metrotechs post you need to run fixsub in order to fake your Tivo into thinking it has called home. If you don't you'll get a nag message reminding you tivo needs your viewing habits so make a call. To keep your privacy you need to run a script like the one posted. You can do this manually, run this file like onyoxx did and confirm you have a good version that works, then have your hackinit start a script that will continually run it at a fixed amount of time.
2. in your hack directory
3. It doesn't. boot299.btl is a Series 1 file

DawG
09-17-2003, 01:06 PM
Thanks Metrotech and rpl.

Your insight really cleared this up. Such frank, straightforward help is greatly appreaciated!!!!!