View Full Version : PC Media Server stream movies back to tivo from menus based on mfs_ftp ready to test
lgkahn
04-21-2004, 09:45 PM
Do you extract your shows/movies to your pc/unix box for storage..
Do you regularly ftp them back to the tivo for viewing via mfs_ftp to rewatch certain shows..
Have you wanted to be able to do this through the tivo menus without having to get on the pc and ftp them back...
Then this software may be for you!!
In a nutshell unlimited number of ftp site/directory support via a server config file that is read in.
Unlike other mfs_ftp extensions the number of shows does not appear to be limited because it uses mail messages not the now showing list.
Also no special software needs to be running on the pc's only standard ftp servers since it uses the DIR/LIST command. Also on the other tivo boxes it pulls movies from, no special s/w is needed since it too uses the LIST command there (except mfs_ftp 1.2.9Q or mfs_ftp P).
Take a look at the readme file
here (http://stage1.icentrix.com/readme.txt)
For now it will not run with other mfs_ftp extensions ie Sandertons or others...
Thanks to Sanderton and Riley for all their work and support for whom without this would not be possible.
Other caveat... requires you to be running 1.2.9Q or version P of mfs_ftp and for now I only support S2 dtivos since that is all I have to test it on. Others have gotten it to work on version 1 dtivos and version 4.0 dtivos and s2s.
I cannot support it on those boxes since I don't have them (Ok I have an s1 dtivo but no net card so it is not hacked).
I have tested it with winnt and win2000 (same) ftp servers and another mfs_ftp tivo server.
But see the readme and let me know.
cojonesdetoro
04-23-2004, 07:29 PM
Count me in. I have my own little script to do this stuff would like to see how yours works. Mine can only 'push' and 'pull' to Tivos right now. I implemented outside of mfs_ftp. It pretends to be an FTP client and starts an FXP transfer.
I have 1 SA1/3.0 subbed and several unsubbed units. I also have a linux box I can use to test with.
EDIT: Ugh!... read the post and then.. reply. I will PM you.
I understand that you do not support S1. That's fine. If I can't get it working myself, I won't pester you. If it works with little or no mods then.. woohoo!
lgkahn
05-07-2004, 11:41 PM
Only one issue has come up during beta testing intermittant problem on the box where it stops processing keystrokes due to the event bug.
But this is the same with some of the other mfs_ftp extentions.
Just wanted to warn you before posting it.
I only have had problems a few times. but some others have it more frequently. If it happens you will need to reboot the box.
Anyway also a problem is that Q is expiring.. so I have back done a version that will work with mfs_ftp P.
I will post with both versions of the hack here one for Q and one for P.
So if you manage to keep Q running you can use that version.
Also this should work fine on a Series 1 box but I don't have one to support it.
new version 1.2 see the readme. for changes 6/15/04
new version 1.3 see the readme for changes 11/7/04
new version 1.4 upload capability and auto setting of ip address, see the readme - 11/10/04
SteveT
05-08-2004, 10:13 PM
This rocks! Thanks, lgkahn!
I installed Filezilla FTP Server on my XP machine, followed your directions for setup (HDVR2 with mfs_ftp 1.2.9P), and it works like a charm. I particularly appreciate that it works with .TY+ files, since I have a ton of them (for playing via TyShow).
cojonesdetoro
05-08-2004, 11:04 PM
I had the same event bug problems with fxpmerge. I changed it so that it reads the /var/log/tivoLog/prv file for context chnages and remote keystrokes. It can get the keystrokes/events in realtime about 95% of the time on my SA1/3.0. An S2 user told me that it is a lot more delayed on that platform. I opted for this because it completely bypasses the event bug. I also used another technique found in TCSCutfile to bypass the even bug for reading the FSID of a program while in the program description screen. You create a temp file to for the script to read the information and terminate execution of it when done. Check out the code and you'll see what I mean.
I changed it so that it reads the /var/log/tivoLog/prv file for context chnages and remote keystrokes.
Neat idea! Do you have any info on the format of this log, or is it easy to figure out?
Thanks,
Rung
mini__me
05-09-2004, 11:46 AM
You can access this log through tivoweb:
http://tivo/logs/tivoLog.prv/
And thats exactly how it looks as well if you ftp from your tivo, although on my S1 mine is here:
/var/log/tivoLog.prv
;)
lgkahn
05-09-2004, 01:00 PM
yes on my s2 there are long stretches where the menus work fine and nothing gets written to the tivolog.prv so I don't think that is going to work for an S2 unfortunately...
I just wish they would fix this damn event bug.. there doesn't seem to be a good workaround.... maybe there is a way to write something in C...
kalex
05-26-2004, 01:28 AM
I just installed it on my S2 Dtivo. it runs except that shows don't start transfer. I get the listings from my ftp directory but after that when i thumb up on the email message, transfer doesn't start. Seems like i'm not getting logs from this. I'm running Serv U 4.1 ftp server on my win2k box. Any suggestions on how to enable logging or how to fix the problem?
thanks
alex
lgkahn
05-26-2004, 09:59 AM
Are you running the P or the Q version of the mfs_ftp server in the Q version there is a log file in /var/log in the p version there is a log file called Port3105.log
in the mfs_ftp directory... post it here in a zip or better yet look in it..
most likely you have the wrong line length for your files for your ftp server..
that server has not been tested by me... also check the logs of your ftp server and see which files are trying to be downloaded... again most likely it will be the wrong file name and you will see how your line length is off.....
Also you don't thumb up on the email message you thumb up pon the email listings of titles and it should take you to the email message details... is this part working correctly... then wait at least a minute before going back and seeing if you upload is occuring... if it is taking you to the email details.. then it definately is a linelength problem...
kalex
05-26-2004, 01:16 PM
I'm running P. I cleared the log file and tried it again. so i'm including the log file with just ftp info. looks like the file name is not correct. but i'm not sure how to correct it. any help is appreciated.
thanks
alex
lgkahn
05-26-2004, 01:25 PM
it looks like in your remoteservers file you didn't edit the line length to correspond to the starting of the file names for your ftp server as outlined in the readme file and left it at column 40.. it appears your server files start at column 57
try changing it to 57 and you should be good to go...
let me know how it goes...
kalex
05-26-2004, 09:46 PM
thanks for helping. now it gets the correct file name but still fails to get the file. i looked at the log and this is what happens
08:34:26:PM - got port
08:34:26:PM - rport = 21
08:34:26:PM - got directory
08:34:26:PM - rdir = moviez/tivo
08:34:26:PM - got server
08:34:26:PM - rserver = kuchavm
08:34:26:PM - in find server totalservers = 1 looking for 192.168.0.10 moviez/tivo
08:34:26:PM - found server = 1
08:34:26:PM - in pc_get_file remote pc is 192.168.0.10 file is {Little Bill}{2001-05-11}{The No-Talking Contest The Search Is for the Sock}{12.00 PM Mon May 24, 2004}{NIK1}.tmf port is 21 directory is moviez/tivo
08:34:27:PM - sent USER *****
08:34:27:PM - Password Failed!
yet it passes the password field fine during the directory listing part. i'm attaching the log file again.
thanks
alex
lgkahn
05-26-2004, 11:27 PM
I'm afraid you will have to get a different ftp server .. I was able to reproduce the problem with the latest version of that server here... the difference is that the fetch file routine puts the port in binary mode and apparently it is not seeing any commands I send the server.. It is actually the user command (sending username) the response of which then sends the passoword.... it is not seeing...
if you are using 2000 I thought the ftp server comes with it I know it does with 2000 professional anyway..
lgkahn
05-27-2004, 08:59 AM
Stay tuned. I am just finishing testing a new version that should work with this server ... but also want to make sure it doesn't break the other ftp servers I have tested it with..
also have shortened the initial event fx called in hopes this will reduce the event bug occurances and then put most of the code that actually does something in a subsequent function that is called when we find our actuall event.. Seems a little better... only time will tell.. just finishing up testing on your serv u ftp server added new code to put in in binary mode.
new versions put in up in the uploads make sure to re-edit the p1.tcl file to put in your ip address and chmod 755 when uploading to the mfs_ftp directory let me know.. it works fine with version 5 of the serv u ftp server for me now.
kalex
05-27-2004, 11:07 AM
wow awesome. will def. try it. as its very useful piece of software.
alex
kalex
06-07-2004, 11:47 AM
Thanks for the updated version. works great with serv-u.
alex
ChrisR
06-07-2004, 04:55 PM
Just a rundown on what my configuration.
1.hughes sd-dvr40
2.sleeper.iso
3.mfs_ftp 1.29p with patch
4.mediaserverp version
If I can only get the file name to appear right this would be a great way to keep a backup of your movies.
My filename is Panic Room-.ty. I can go to the message screen and select "Refresh Backup (192.168.100.2) which is the ftp server running FileZilla. I would rather use bulletproof but someone earlier mentioned they had it working on FileZilla. Anyway.....After the refresh it comes back with Rec. anic Room-.ty. Yes the P is missing from the filename. Obviously that is why I am getting this error on the ftp log.
(000032) 6/7/2004 15:24:48 PM - (not logged in) (192.168.100.200)> Connected, sending welcome message...
(000032) 6/7/2004 15:24:48 PM - (not logged in) (192.168.100.200)> 220-FileZilla Server version 0.8.9 beta
(000032) 6/7/2004 15:24:48 PM - (not logged in) (192.168.100.200)> 220-written by Tim Kosse (Tim.Kosse@gmx.de)
(000032) 6/7/2004 15:24:48 PM - (not logged in) (192.168.100.200)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000032) 6/7/2004 15:24:48 PM - (not logged in) (192.168.100.200)> USER tivo
(000032) 6/7/2004 15:24:48 PM - (not logged in) (192.168.100.200)> 331 Password required for tivo
(000032) 6/7/2004 15:24:49 PM - (not logged in) (192.168.100.200)> PASS
(000032) 6/7/2004 15:24:49 PM - tivo (192.168.100.200)> 230 Logged on
(000032) 6/7/2004 15:24:49 PM - tivo (192.168.100.200)> CWD tivo
(000032) 6/7/2004 15:24:49 PM - tivo (192.168.100.200)> 250 CWD successful. "/E:/tivo" is current directory.
(000032) 6/7/2004 15:24:50 PM - tivo (192.168.100.200)> PORT 192,168,100,200,19,156
(000032) 6/7/2004 15:24:50 PM - tivo (192.168.100.200)> 200 Port command successful
(000032) 6/7/2004 15:24:55 PM - tivo (192.168.100.200)> LIST *.t*
(000032) 6/7/2004 15:24:55 PM - tivo (192.168.100.200)> 150 Opening data channel for directory list.
(000032) 6/7/2004 15:24:55 PM - tivo (192.168.100.200)> 226 Transfer OK
(000032) 6/7/2004 15:24:56 PM - tivo (192.168.100.200)> QUIT
(000032) 6/7/2004 15:24:56 PM - tivo (192.168.100.200)> 221 Goodbye
(000032) 6/7/2004 15:24:56 PM - tivo (192.168.100.200)> disconnected.
(000033) 6/7/2004 15:25:40 PM - (not logged in) (192.168.100.200)> Connected, sending welcome message...
(000033) 6/7/2004 15:25:40 PM - (not logged in) (192.168.100.200)> 220-FileZilla Server version 0.8.9 beta
(000033) 6/7/2004 15:25:40 PM - (not logged in) (192.168.100.200)> 220-written by Tim Kosse (Tim.Kosse@gmx.de)
(000033) 6/7/2004 15:25:40 PM - (not logged in) (192.168.100.200)> 220 Please visit http://sourceforge.net/projects/filezilla/
(000033) 6/7/2004 15:25:41 PM - (not logged in) (192.168.100.200)> USER tivo
(000033) 6/7/2004 15:25:41 PM - (not logged in) (192.168.100.200)> 331 Password required for tivo
(000033) 6/7/2004 15:25:41 PM - (not logged in) (192.168.100.200)> PASS
(000033) 6/7/2004 15:25:41 PM - tivo (192.168.100.200)> 230 Logged on
(000033) 6/7/2004 15:25:42 PM - tivo (192.168.100.200)> CWD tivo
(000033) 6/7/2004 15:25:42 PM - tivo (192.168.100.200)> 250 CWD successful. "/E:/tivo" is current directory.
(000033) 6/7/2004 15:25:42 PM - tivo (192.168.100.200)> TYPE I
(000033) 6/7/2004 15:25:42 PM - tivo (192.168.100.200)> 200 Type set to I
(000033) 6/7/2004 15:25:43 PM - tivo (192.168.100.200)> PASV
(000033) 6/7/2004 15:25:43 PM - tivo (192.168.100.200)> 227 Entering Passive Mode (192,168,100,2,4,41)
(000033) 6/7/2004 15:25:43 PM - tivo (192.168.100.200)> RETR anic Room-.ty
(000033) 6/7/2004 15:25:43 PM - tivo (192.168.100.200)> 550 File not found
(000033) 6/7/2004 15:25:44 PM - tivo (192.168.100.200)> QUIT
(000033) 6/7/2004 15:25:44 PM - tivo (192.168.100.200)> 221 Goodbye
(000033) 6/7/2004 15:25:44 PM - tivo (192.168.100.200)> disconnected.
Notice the 550 File not found error because of the filename missing the P. Now if I go and change the filename to what it is looking for and then go back to the messages in tivo. It works like a charm but I don't want to go through the process of changing filenames all the time. Anyone have any ideas on why the P is dissapearing?
ChrisR
06-07-2004, 04:59 PM
Oh here is my port3105.log
My remote servers are setup like this.
192.168.100.2
21
Backup
tivo
tivo
57
All files reside on the E:\tivo directory.
I tried it with a password and got same errors. I left it out and still get same error. Even though it is not a authentication error I wanted to try it anyway. If I use the 40 instead of the 57 I get back with a totally long filename that is wrong.
kalex
06-07-2004, 05:02 PM
check the column number urs is 57 and its 1 off.
ChrisR
06-07-2004, 05:21 PM
Changing it to 56 solved the problem. I thank you for the wonderful addition you have created.
lgkahn
06-08-2004, 09:38 AM
I think we are getting enough servers that it is getting close to me making a version that auto senses the server and sets the line length accordingly please execute the following command on your server... and post that along with what line length is working for you...
thanks
-------------------------------------
... log in here as normal then execute the following
230 User larry logged in.
ftp> quote syst
215 Windows_NT version 4.0
ftp>
length: 40
etc.
hateeecs
06-12-2004, 01:12 PM
I can't seem to get this to work. I have installed the remoteservers and p1.tcl and get three messages in the list. reload server information file, delete, and refresh for my one server entry.
Here is my remoteservers:
192.168.0.7
21
raid
tivo
tivo
/home/tivo/archive
58
and my log
03:44:03:PM - sourcing settings
03:44:03:PM - Running PC patch 1.0b11 (Q)PC1.1
03:44:03:PM - Listeners set, done here, back to mfs_ftp
03:44:03:PM - syncing PC listing
03:44:03:PM - in parse servers file current file is /var/hack/mfs_ftp/remoteservers
03:44:03:PM - in cleanup server mail
03:44:05:PM - set 192.168.0.7 raid 21 /home/tivo/archive
03:44:05:PM - Done parsing
03:44:05:PM - got total servers = 1 now doing message loops
03:44:05:PM - sourcing p1
03:44:11:PM - updating cached recording info
It seems like nothing is really happening. Any ideas? Thanks.
hateeecs
06-12-2004, 01:19 PM
Also, when pressing thumb up on any of the list items (reload, refresh, delete) I get the "bong" noise that usually indicates that the key pressed is not valid. Is this what should be happening?
Thanks,
JohnSorTivo
06-12-2004, 03:54 PM
Just started trying to get this running, to easily enable Tivo-Tivo show transfers, but am getting a "Password Failed" error in the MFS_FTP log files for the Tivo I am attempting to initiate things from. Obviously, since it is attempting to connect to another Tivo running MFS_FTP, it is not password protected, and my "remoteservers" file has "none" & "none" for the username & password.
Here's my log file output from both Tivos:
Date: <100>Sat 6/12
Name: Refresh Recordings from garage-tivo (192.168.1.3)
IP: 192.168.1.3
Port: 3105
Directory: tmf
Server: garage-tivo
07:27:53:AM - nameloc = 10 iploc = 16 dirloc = 20 portloc = 18
07:27:53:AM - got ip
07:27:53:AM - rip = 192.168.1.3
07:27:53:AM - got name
07:27:53:AM - got new name loc2 = 104
07:27:53:AM - got new ip loc2 = 161
07:27:53:AM - rfname = Refresh Recordings from garage-tivo (192.168.1.3)
07:27:53:AM - got port
07:27:53:AM - rport = 3105
07:27:53:AM - got directory
07:27:53:AM - rdir = tmf
07:27:53:AM - got server
07:27:53:AM - rserver = garage-tivo
07:27:53:AM - in find server totalservers = 1 looking for 192.168.1.3 tmf
07:27:53:AM - found server = 1
07:27:53:AM - calling refresh here for 192.168.1.3 tmf 3105
07:27:53:AM - in cleanup msg mail for 192.168.1.3 garage-tivo dir is tmf
07:27:53:AM - in pc_start_dir remote pc is 192.168.1.3 listenport is 5013
07:27:54:AM - sent USER *****
07:27:54:AM - Password Failed!
And the resultant MFS_FTP log file on the Tivo being accessed:
07:28:21:AM - 220 Mfs_Ftp ver 1.2.9p - {sock22} from "192.168.1.4:1032"
07:28:42:AM - 331 User name okay, need password.
07:28:43:AM - updating cached recording info
.............................
.............................
07:28:47:AM - 221 Server Closing Control Connection by client request
07:28:47:AM - 502 Command not implemented ""
catch close lastsock val ""
Any ideas?
SteveT
06-12-2004, 09:55 PM
please execute the following command on your server... and post that along with what line length is working for you...ftp> quote syst
215 UNIX emulated by FileZilla
Running FileZilla Server 0.8.9 beta on XP Home, working with length 56
lgkahn
06-13-2004, 01:06 AM
And the resultant MFS_FTP log file on the Tivo being accessed:
Code:
07:28:21:AM - 220 Mfs_Ftp ver 1.2.9p - {sock22} from "192.168.1.4:1032"
07:28:42:AM - 331 User name okay, need password.
07:28:43:AM - updating cached recording info
.............................
.............................
07:28:47:AM - 221 Server Closing Control Connection by client request
07:28:47:AM - 502 Command not implemented ""
catch close lastsock val ""
Any ideas?
I haven't tried tivo to tivo transfer with version P I am still running
Q I will have to reinstall P on one of my tivos and try it again and get back to
you ....
nothing jumps out at me as to why it would be failing... what logging level did you set it to to get the output....
lgkahn
06-13-2004, 01:10 AM
hateec Q has expired that is why it is not working.. if it goes to cache recordings and if you check your running processings you will see mfs_ftp has stopped running that is why nothing is working... I am not allowed to tell you how to keep Q running.. you will have to figure it out yourself or rmeove it and go back and install P and the P patch.
JohnSorTivo
06-13-2004, 02:11 AM
I haven't tried tivo to tivo transfer with version P I am still running
Q I will have to reinstall P on one of my tivos and try it again and get back to
you ....
nothing jumps out at me as to why it would be failing... what logging level did you set it to to get the output....
You're running Q? I thought that it has expired?
I haven't changed any logging levels, so whatever the defaults are, is what I am running. I went into the p1.tcl code to comment some sections out, and hardcode some values, to see if I could get past the "password" problem:
after 3000
set readvalue [snp_readfromsocket $remmfsftp]
#if {[string range $readvalue 1 3] == "331"} {
puts $remmfsftp "PASS none"
flush $remmfsftp
outd $info(pcdbl) "sent PASS ****"
#} else {
# outd $info(pcdbl) "Password Failed!"
# puts $remmfsftp "QUIT"
# flush $remmfsftp
# close $remmfsftp
# return -1
#}
after 3000
set readvalue [snp_readfromsocket $remmfsftp]
if {[string range $readvalue 1 3] == "230"} {
outd $info(pcdbl) "Logged In successfully!"
outd $info(pcdbl) "Sending cd command"
puts $remmfsftp "CWD $directory"
flush $remmfsftp
} else {
outd $info(pcdbl) "log in failed! got back $readvalue"
puts $remmfsftp "QUIT"
flush $remmfsftp
close $remmfsftp
return -1
}
As expected, when running with the above referenced code, it simply fails at the next block, with the "log in failed! got back" message.
The interesting thing is that there is nothing printed for whatever the "$readvalue" variable is supposed to display. So for whatever reason, $readvalue is NULL.
Just to verify I'm working in "PC" mode, I'll put some recordings on my PC and add its FTP server to the "remoteservers" file, and see what happens.
EDIT: Just saw your post above that you're running a "hacked" version of Q :-)
hateeecs
06-13-2004, 02:19 AM
I have my version of Q working again. Can log into the server with ftp client. However I still get the bong noise when trying to thumb up on one of the items in the email list. My log file remains the same.
-Chris
lgkahn
06-13-2004, 02:21 AM
shouldn't have to hack your files your remote server file must be bad...
post it here... Here are my logs all works fine.....
Date: <100>Sun 6/13
Name: Refresh Recordings from upstairs-tivo (216.111.20.111)
IP: 216.111.20.111
Port: 3105
Directory: tmf
Server: upstairs-tivo
12:03:23:AM - nameloc = 10 iploc = 16 dirloc = 20 portloc = 18
12:03:23:AM - got ip
12:03:23:AM - rip = 216.111.20.111
12:03:23:AM - got name
12:03:23:AM - got new name loc2 = 114
12:03:23:AM - got new ip loc2 = 176
12:03:23:AM - rfname = Refresh Recordings from upstairs-tivo (216.177.20.118)
12:03:23:AM - got port
12:03:23:AM - rport = 3105
12:03:23:AM - got directory
12:03:23:AM - rdir = tmf
12:03:23:AM - got server
12:03:23:AM - rserver = upstairs-tivo
12:03:23:AM - in find server totalservers = 9 looking for 216.111.20.111 tmf
12:03:23:AM - found server = 9
12:03:23:AM - calling refresh here for 216.111.20.111 tmf 3105
12:03:23:AM - in cleanup msg mail for 216.111.20.111 upstairs-tivo dir is tmf
12:03:24:AM - in search fromid = 3001 thelist = \{Name: {} {[5} Days to {Midnight][2004-06-09][Part} {Three][09.00} PM Wed Jun 09, {2004][SCFI].tmf
} IP: 216.111.20.111 {
} Port: {3105
} Directory: {tmf
} Server: upstairs-tivo\n\}
Deleting id 164679
12:03:24:AM - in search fromid = 3001 thelist = \{Name: {} {[5} Days to {Midnight][2004-06-09][Part} {Three][09.00} PM Wed Jun 09, {2004][SCFI].tmf
} IP: 216.177.20.118 {
} Port: {3105
} Directory: {tmf
} Server: upstairs-tivo\n\}
Deleting id 164680
12:03:24:AM - in pc_start_dir remote pc is 216.111.20.111 listenport is 5013
12:03:25:AM - sent USER *****
12:03:25:AM - sent PASS ****
12:03:26:AM - Logged In successfully!
12:03:26:AM - Sending cd command
12:03:26:AM - CWD successfull!
12:03:26:AM - sending port command: PORT 216,111,20,111,19,149
12:03:32:AM - Port command successfull!
12:03:32:AM - Sending Directory command
12:03:32:AM - from dir command got back: {150 Opening ASCII mode data connection for file list.} {226 Transfer complete.}
12:03:32:AM - Running pc_getdir addr = 216.111.20.111 port= 1253 currentpcfilename = ./pcdirfile1.txt processingserver = 9
12:03:32:AM - got line (fixed): [-rwxr-xr-x 1 0 0 001130364928 Jun 10 11:00 [7 Days][1999-10-20][For the Children][11.00 AM Thu Jun 10, 2004][SPKE].tmf
] [-rwxr-xr-x 1 0 0 001147142144 Jun 11 11:00 [7 Days][1999-11-03][Two Weddings and a Funeral][11.00 AM Fri Jun 11, 2004][SPKE].tmf
]
12:03:32:AM - reset: new listen port is 5014 new comma value is 19,150
12:03:32:AM - Done getting dir
12:03:32:AM - in parse pc file current file is ./pcdirfile1.txt nstart = 56
12:03:32:AM - in parse got line = [-rwxr-xr-x 1 0 0 001130364928 Jun 10 11:00 [7 Days][1999-10-20][For the Children][11.00 AM Thu Jun 10, 2004][SPKE].tmf lcount = 1
12:03:32:AM - thinks line is ok to process realstart = 56
12:03:32:AM - slen = 132
12:03:32:AM - actual filename = [7 Days][1999-10-20][For the Children][11.00 AM Thu Jun 10, 2004][SPKE].tmf *
12:03:32:AM - in parse got line = ] [-rwxr-xr-x 1 0 0 001147142144 Jun 11 11:00 [7 Days][1999-11-03][Two Weddings and a Funeral][11.00 AM Fri Jun 11, 2004][SPKE].tmf lcount = 2
12:03:32:AM - thinks line is ok to process realstart = 58
12:03:32:AM - slen = 144
12:03:32:AM - actual filename = [7 Days][1999-11-03][Two Weddings and a Funeral][11.00 AM Fri Jun 11, 2004][SPKE].tmf *
12:03:33:AM - in parse got line = ] lcount = 3
12:03:33:AM - Done parsing
and here is the log on the P remote server...
04:04:22:AM - sourcing settings
11:04:23:PM - updating cached recording info
..
..
catch close lastsock val "can't read "info(lastsock)": no such element in array"
12:03:23:AM - 220 Mfs_Ftp ver 1.2.9p - {sock22} from "216.111.20.111:1045"
12:03:24:AM - 331 User name okay, need password.
12:03:24:AM - 230 Running in TiVo Mode.
12:03:25:AM - 250 Directory change successful.
12:03:25:AM - 200 PORT command successful.
12:03:31:AM - 150 Opening ASCII mode data connection for file list.
12:03:31:AM - updating cached recording info
..
..
12:03:31:AM - 226 Transfer complete.
12:03:31:AM - 221 Server Closing Control Connection by client request
12:03:31:AM - 502 Command not implemented ""
catch close lastsock val "can not find channel named "sock22""
my guess is your remoteservers file is bad and it has no password for somereason or somthing like that
lgkahn
06-13-2004, 02:23 AM
also have you re-download the files lately I made some changes for compatiblity for more ftp servers that may have fixed some stuff..
JohnSorTivo
06-13-2004, 02:27 AM
My remoteservers file is pretty basic:
192.168.1.3
3105
garage-tivo
none
none
tmf
57
You'll also note that, in the "modified" p1.tcl file above, since the problem seems to be centered around a password issue, that I hardcoded "none" in as the value for password, in case, for some reason, it wasn't getting correctly passed-in via the remoteserver file. Still no love. I also upped the delay to 30 seconds, in case things were moving a bit to fast for the login.
I tried getting this going last weekend to no avail, and just tried again today, with the same issue. Both times, I re-downloaded the "p" version.
Does your MFS_FTP server take a good 10 seconds or so to connect to?
lgkahn
06-13-2004, 02:29 AM
Are you sure you are not logging into the regular ftp server... Q will not be working unless you edited somre very hard to find lines... most likely you are logging into the regular ftp server not the mfs_ftp server...
to verify it is working you should get a header like this
C:\>ftp
ftp> open tivo1 3105
Connected to tivo1.
220 Mfs_Ftp ver 1.2.9Q - {sock23} from "216.111.20.111:3334"
User (tivo1:(none)):
331 User name okay, need password.
Password:
230 Running in TiVo Mode.
ftp>
lgkahn
06-13-2004, 02:31 AM
also john I connect immediately to my mfs_ftp server... go put your ip addresses in your host table in your etc directory to speed thinks up also add correct dns servers to your resolver file there to get name lookups working... but that should not cause logins to fail... but you never know...
lgkahn
06-13-2004, 02:34 AM
the password failed message means it is not getting back 331 as it should from the user command as it tries to log in....
JohnSorTivo
06-13-2004, 02:35 AM
also john I connect immediately to my mfs_ftp server... go put your ip addresses in your host table in your etc directory to speed thinks up also add correct dns servers to your resolver file there to get name lookups working... but that should not cause logins to fail... but you never know...
I'm using straight IP addresses for all my connections. No hostsnames or DNS involved. I was just thinking that with the small delay that exists when establishing a connection to the MFS_FTP server, that maybe the script is seeing this as a "failure".
lgkahn
06-13-2004, 02:42 AM
try increasing the timeout on the user command if it is updating cached rrecordings on login and you have a lot more recordings than me that may be the issue and I may need to change the script.. my other tivo does not have that many.... change the line here
after 500
set readvalue [snp_readfromsocket $remmfsftp]
if {[string range $readvalue 1 3] == "331"} {
puts $remmfsftp "PASS $password"
flush $remmfsftp
outd $info(pcdbl) "sent PASS ****"
} else {
outd $info(pcdbl) "Password Failed!"
puts $remmfsftp "QUIT"
flush $remmfsftp
close $remmfsftp
return -1
}
to something like
after 1500
set readvalue [snp_readfromsocket $remmfsftp]
if {[string range $readvalue 1 3] == "331"} {
puts $remmfsftp "PASS $password"
flush $remmfsftp
outd $info(pcdbl) "sent PASS ****"
} else {
outd $info(pcdbl) "Password Failed!"
puts $remmfsftp "QUIT"
flush $remmfsftp
close $remmfsftp
return -1
}
maybe that will do it
lgkahn
06-13-2004, 02:43 AM
also the dealy can be caused using ips also it tries to do a reverse lookup and that takes time that is why I put the ips of known stuff in my host file.. I found that sped things up greatly
JohnSorTivo
06-13-2004, 02:43 AM
the password failed message means it is not getting back 331 as it should from the user command as it tries to log in....
Yea, I can see that in the block of code referenced above. I was trying to "force" my way past this by commenting some stuff out, but just delayed the inevitable it seems. I guess the big question that I can't figure out is why it's not getting 331 back as expected...
JohnSorTivo
06-13-2004, 02:44 AM
also the dealy can be caused using ips also it tries to do a reverse lookup and that takes time that is why I put the ips of known stuff in my host file.. I found that sped things up greatly
Adding them to my host file right now. You never know...
JohnSorTivo
06-13-2004, 02:46 AM
try increasing the timeout on the user command if it is updating cached rrecordings on login and you have a lot more recordings than me that may be the issue and I may need to change the script.. my other tivo does not have that many.... change the line here
Yea, tried that. You'll see in my "modfied" p1.tcl code above, that I change it to 3000.
lgkahn
06-13-2004, 02:46 AM
notice how my log shows it not updating cached recording info till after I log in.. whereas yours is different... hmmmmm
lgkahn
06-13-2004, 02:47 AM
no in your example above you edited the wrong one... the one after the password block you need to change the one before the password block...
also you need to go back to the stock script you cannot commend out parts.. you need to process all the responses in order or if one is out of sync it will fail because it is looking for certain responses to certain commands you cannot leave that block commented out and expect it to work... it is lookig for the 331 response after the user ocmmand and the 230 afte rthe password etc. etc.
lgkahn
06-13-2004, 02:53 AM
sorry looking closer at your changes you are correct it does look like you changed both and it should have worked if timing was the issue... strange
are you running on a series 1 or 2 box???
JohnSorTivo
06-13-2004, 02:53 AM
no in your example above you edited the wrong one... the one after the password block you need to change the one before the password block...
also you need to go back to the stock script you cannot commend out parts.. you need to process all the responses in order or if one is out of sync it will fail because it is looking for certain responses to certain commands you cannot leave that block commented out and expect it to work... it is lookig for the 331 response after the user ocmmand and the 230 afte rthe password etc. etc.
I changed all delays to essentially 3000 at one point. After each test, I go back to the original p1.tcl file. I realize the implications of changing the code. But for the sake of debugging, I am trying various things, in an attempt to get to the next block of code. Part of the debugging process...
I'll keep tooling with it, trying various things, and let you know what happens.
Thanks.
BTW, I'm running 2 HDVR2s (Series 2) boxes.
lgkahn
06-13-2004, 03:03 AM
3000 timeout may not be enought that is only 3 seconds I believe and from the amount of dots you have to update the cached recordings for that amount that may take 10 seconds or so try changing the timeouts to 15000
JohnSorTivo
06-13-2004, 03:10 AM
3000 timeout may not be enought that is only 3 seconds I believe and from the amount of dots you have to update the cached recordings for that amount that may take 10 seconds or so try changing the timeouts to 15000
Well, we were both definitely on the right track with the "timeout" issue. The 3000 value for the timeout, alone, that I tried earlier, didn't solve the problem. But, couple this with your suggestion for adding an entry to my "hosts" file, and JACKPOT! After a reboot, I re-ran it, and all my shows from my remote Tivo came flooding in ;-)
So, by having the hosts file entry assist for speeding things up, it resolved the issue. Definitely a timeout problem that I was having with the script.
And, as suspected, it has completely eliminated the lag I was experiencing when making an a connection using a standard FTP client, or TyExtract (http://www.dealdatabase.com/forum/showthread.php?t=34932) ;-)
Thanks for your help. Something so simple!
lgkahn
06-13-2004, 10:23 AM
great glad I could help now I wonder about this other guy I believe is running Q that is expired and that is why his is not working.... hard to convince him of this... not easy to find the expiration code reily burried in it... hopefully R will be out soon... like the way Q logs much better than P so you can check the logs in tivoweb....
hateeecs
06-13-2004, 08:08 PM
Hey Guys,
Let me first say thanks for puttying out this script. However, I have yet to get the thumbs up key to work. I always get the "bong" sound.
I was running a "hacked" version of Q. I was able to log into and xfer from mfs. But today I have decied to bag Q and go to P. However, I still get the "bong" sound. Not really sure where to start debugging this here is the port.3105 log:
10:40:04:PM - sourcing settings
10:40:04:PM - Running PC patch 1.0b8 (P)PC1.1
11:40:05:PM - Listeners set, done here, back to mfs_ftp
11:40:05:PM - syncing PC listing
11:40:05:PM - in parse servers file current file is ./remoteservers
11:40:05:PM - in cleanup server mail
Deleted id 306026
Deleted id 306027
Deleted id 306028
Deleted id 306029
Deleted id 306030
11:40:06:PM - set 192.168.0.7 raid 21 /home/tivo/archive
11:40:06:PM - Done parsing
11:40:06:PM - got total servers = 1 now doing message loops
11:40:07:PM - sourcing p1
11:40:09:PM - updating cached recording info
.......................................................
.......................................................
Thanks for you help!
lgkahn
06-13-2004, 11:19 PM
after that in your log you should have one more line about it waiting for connection something like
catch close lastsock val "can't read "info(lastsock)": no such element in array"
but if you are sure you have Q running ok you can go back to that... that should be ok...
anyway how are you doing the thumbs up... you need to make sure you are doing it from the list of messages not from the message detail.....
you should get the bong sound but then it should take you to the message details if the script is working and then when done back to the list of messages....
describe exactly how you are attempting to use the thumbs up thanks.. because I don't see the attempts in your logs..
hateeecs
06-13-2004, 11:38 PM
sorry i must have not cut the log fle right:
tivo:/var/hack/mfs_ftpp/mfs_ftp$ more port.3105.log
10:40:04:PM - sourcing settings
10:40:04:PM - Running PC patch 1.0b8 (P)PC1.1
11:40:05:PM - Listeners set, done here, back to mfs_ftp
11:40:05:PM - syncing PC listing
11:40:05:PM - in parse servers file current file is ./remoteservers
11:40:05:PM - in cleanup server mail
Deleted id 306026
Deleted id 306027
Deleted id 306028
Deleted id 306029
Deleted id 306030
11:40:06:PM - set 192.168.0.7 raid 21 /home/tivo/archive
11:40:06:PM - Done parsing
11:40:06:PM - got total servers = 1 now doing message loops
11:40:07:PM - sourcing p1
11:40:09:PM - updating cached recording info
.......................................................
.......................................................
catch close lastsock val "can't read "info(lastsock)": no such element in array"
01:40:13:AM - updating cached recording info
........................................................
........................................................
02:40:14:AM - updating cached recording info
........................................................
........................................................
I am hitting the thumbs up from the list of messages. This is from the screen that has "Tivo Messages" as the title. I get the bong noise and nothing seems to happen.
thanks,
-Chris
lgkahn
06-13-2004, 11:41 PM
what type of box are you on... my message are a blue screen and the title just says messages...
do your email messages say relaod server information file
delete ....
delete ...
refresh ....
refresh ...
etc. etc.
Also what box and what version of the s/w
hateeecs
06-14-2004, 12:23 AM
I have a tivo brand stand alone running 4.0.1b-01-2-240.
From the main menu I select "tivo messages and setup", from there I select "tivo messages" This takes me to the "tivo messages" screen which is in the format that you describe:
reload
delete
delete
refresh
refresh
Thanks,
daryl
06-14-2004, 01:00 AM
I had the same event bug problems with fxpmerge. I changed it so that it reads the /var/log/tivoLog/prv file for context chnages and remote keystrokes. It can get the keystrokes/events in realtime about 95% of the time on my SA1/3.0. An S2 user told me that it is a lot more delayed on that platform. I opted for this because it completely bypasses the event bug. I also used another technique found in TCSCutfile to bypass the even bug for reading the FSID of a program while in the program description screen. You create a temp file to for the script to read the information and terminate execution of it when done. Check out the code and you'll see what I mean.
Cojonesdetoro,
Can you explain more specifically how you changed this script to use the tivoLog/prv file for remote keystrokes? I don't understand what needs to be changed?
By the way, this is best Tivo hack out right now. I've always wanted a way to organize and remotely upload all the *.ty and *.tmfs I have on my hard drive. With the FileZilla FTP server managing shows on my PC, this works perfectly for me (except for the event bug which makes menu navigation a terrible chore during uploads!)
Thanks again everyone for your hard work!
Daryl
SA1/3.0 (120Hrs) w/ mfs_ftp, tivoftpd, tivoweb, tyserver, and now PC Media server!!
cojonesdetoro
06-14-2004, 02:49 AM
I did not modify this script. I wrote my own, called fxpmerge, that reads the log file for processing keystrokes. It completely bypasses the event bug but seems to only work on the SA1/3.0. Other models/OS seem to delay writing to the log file. Even the SA1/3.0 will sometimes delay but I get adequate response 95% of the time. Too bad we can't find a way to accelerate writing to the file. It could be a nice way to read keystrokes in 4.0. I think it would require complex modification of tivoapp.
Right now I can get/put recordings from/to up to 3 remote Tivos (selectable via the script). I can also push recordings to my Linux FTP server (specially configured to listen on port 3105 and have an /tmf dir). I also have to run a script that reads xml data and renames the tmf file to a title-episode.tmf name. I have since added the ability to schedule a recording on a remote, unsubbed tivo when viewing the program description screen of a future broadcast.
It's all kludgey but mostly works for me. I haven't made much effort to polish it up because I don't have the time to pretty things up. I just make it so it works for me. I fix things I notice are broken and move on.
daryl
06-14-2004, 03:32 AM
I did not modify this script. I wrote my own, called fxpmerge, that reads the log file for processing keystrokes. It completely bypasses the event bug but seems to only work on the SA1/3.0. Other models/OS seem to delay writing to the log file. Even the SA1/3.0 will sometimes delay but I get adequate response 95% of the time. Too bad we can't find a way to accelerate writing to the file. It could be a nice way to read keystrokes in 4.0. I think it would require complex modification of tivoapp.
Cojonesdetoro,
Your fxpmerge sounds pretty cool. I'd love to dig in and learn the tcl scripting language better, and participate more with the other guys on this board.
lgkahn,
Do you have any recommendations on how to elimiate the remote event handling bug? While uploading from my PC, it can take up to 30 seconds to get a remote response while surfing around the menus, so this is pretty painful thorn in an otherwise beautiful tool!
Thanks!
lgkahn
06-14-2004, 10:06 AM
the sluggishness you see while uploading from your pc is NOT the event bug.;..the event bug is when you box freezes up and will not longer processes any remote keypresses and needs to be rebooted...
the method concojonesdetoro outlines will not work on our series 2 boxes I have looked into it... our boxes buffer that log file so it is not applicable.
the sluggishness you experience will happen no matter what hack you are running it is due to the box being overloaded processing the uploaded of the mfs_ftp and has nothing to do with this hack... it would happen with any of the scripts that use mfs_ftp. Also daryl the slugishness is not as bad on our dtivos during an mfs_ftp upload so maybe we have more processsing power than your SA units becuase of the dual tuners possibly.. but it is still sluggish as other can testify too.
for the event bug someone else is working on a C++ event server that may work around it... we will see I will be alpha testing it when it is ready....
lgkahn
06-14-2004, 10:10 AM
hateeecs the only reason I can think this is not working is I don't have a standalone tivo to test it on and maybe the key codes are different on a standalone versus a direct tivo or it changed on version 4.0 has anyone else got this working on a standalone tivo or version 4.0 of the o/s thanks...
I can send you hacked versions of the script and have you push the thumbs uup and see if you get messages in the log... it will be painfull and time consuming but maybe working together we can see what keystrokes you are gettikng..... sorry but I dont have standalone tivos on series 2 dtivo boxes and unhacked series 1 dtivo boxes....
oh it looks like daryl is running on a SA tivo 3.0 with no problems so the key mapppings do work on an SA tivo... so either it is 4.0 on an SA tivo or something strange about your setup... hmmmm
lgkahn
06-14-2004, 10:43 AM
hateeecs I know what is wrong....
I remember reading in another thread that 4.x does not support sendkey functionality and this script uses sendkey.tcl to navigate from the list of messages to the specific message contents and the gets the message state.
I copied this functionality from sandertons script which means his is also broken in 4.0 ... strange no one ever hit the problem using his... does that mean this script is getting more use... will have to give him crap..
anyhow getting a workaround may be more problematic without a box to develop/debug on... anyone want to donate a box for two weeks so I can get it working :) .. my series 2 boxes are rid so they will not run 4.x...
Anyone else have another way to do this on 4.0.
You could try commenting out the sendremotekey functions in the p1.tcl file make sure to get them all becuase I am sure they are causing the callback function to abort. and then try using thumbs up from the message detail instead of the message list but I don't think this will work but it may be worth a try...
hateeecs
06-14-2004, 10:53 AM
thanks for the update. I was not aware that sendkey was used here as well. I've tried to get sanderton's stuff working before and, yes, there does not seem to be any sendkey work around for the 4.0 boxes.
One question that I often thought of when looking at his script was if sendkey was really necessary. In otherwords, would it be possible to simply not have the thumbs up key go to message details and then to the message list.
I realize that this is far from ideal for a user feedback perspective. But I'd be happy with just getting the xfer to start :) Maybe i'll try removing the sendkey stuff and see if I can get anywhere with it.
Thanks,
lgkahn
06-14-2004, 10:58 AM
I am pretty sure from a useability standpoint it is necesary from a functionality standpoint if I had a box to develop and debug on I *COULD* get it working without sendkey... but it may be hard to do remotely without a box... try my suggestions first and see how far you get... if we do manage to get it working without the sendkeys.. you can send me your hacked script and I will put checks for the O/S version in there and build the support into the script so you won't have to modify it in the future...
cojonesdetoro
06-14-2004, 11:21 AM
have any recommendations on how to elimiate the remote event handling bug? While uploading from my PC, it can take up to 30 seconds to get a remote response while surfing around the menus, so this is pretty painful thorn in an otherwise beautiful tool!
Thanks!
Look for "insertion" in the mfs_ftp thread you can tune different things in mfs_ftp. You can slow down insertions such that they still stream faster then real-time (for medium recordings) and still have a reasonable response on the S1. Look at the mfs_ftp readme file as well as the source code for hints on things to tweak.
lgkahn
06-14-2004, 11:24 AM
actually on more reflection the sendkey is necessary for this reason
:
we get getmwstate the read the mwstate file which gives us which message item you hit the key on or in sandertons case which now playing item..
then I process it.
this is not populated by pressing the thumbs up I believe only the enter or right arrow key on the message item which the sendkey mimics.
I I changed my key routine to look for the right menu or enter key it would fire on any message not just my special message so it would be firing when for instance you were reading the normal directtv or tivo message which would not be good and it would be crashing mfs_ftp when it went to try twhich may not be terrible but not very good. alothough maybe with enogh time I could write it to determine that the state file didn't have the correct contents and avoid the crash... definately a possibility.. but the other problem is when I looked at using the right arrow or the enter key directly instead of the thumbs up there was no way to differentiate selecting it from the mesage list and from the message details so if you accidentially say hit right arrow or enter on "done with message "it looked the same as if you did it on the message list and that would be bad because I would be refiring the message again when you where actually done with it.....
(ie to get rid of sendkey I would have to change the callback routine to use right arrow or enter directly as the key I am looking for instead of thumbs up so the state file would be populated after I got the callback and send key would not be necessary). I will look more into differentiating the two cases but was never able to resolve that issue.
hateeecs
06-14-2004, 12:02 PM
Again, thanks for your help and information. Could we add some special text to your messages and look for that when the right/enter key is used?
If we do tag your messages with some special text, is there no way to determine if we are selecting "done" on the message detail vs. "right/enter" on the message list?
Thanks,
-Chris
sanderton
06-14-2004, 01:08 PM
I copied this functionality from sandertons script which means his is also broken in 4.0 ... strange no one ever hit the problem using his... does that mean this script is getting more use... will have to give him crap..
Possibly because the readme on mine says upfront it will not work with 4.0. ;)
I use Sendkey because the mwstate file created while you are in the error screen does not contain the info on the show you just tried to play; so I "press" select to get back to a screen which does.
I would not think that your script needed to do that?
My script (and possibly therefore yours) gets called whenever the ContextChange event is triggered - pretty much any time you press anything - so I wouldn't worry about "false" calls, so long as you can determine which ones are the ones to act on. The mwstate file is populated by the patch calling the event to trigger it, not what key the user pressed.
lgkahn
06-14-2004, 01:18 PM
yes but my problem was there was no way to differentiate pressing enter or right arrow on the message list version pressing done on the message detail... they looked the same in terms of event subevent and id .. unless I can resolve that I cannot use the enter or rright arrow key which will bypass the need for the sendkey functionality...
thus that is why I used the thumbs up because it is a unquie key that you would not be pressing on a normal message....
I will revisit that but I looked at it pretty carefully and they looked exactly the same... I was joking about my message I really wasn't going to give you crap.. I wouldn't have gotten my hack working without your help... thanks again... if you have any other ideas let me know.
sanderton
06-14-2004, 01:20 PM
What's the problem with using the thumb up key?
mwstate is populated by the code in the script, not the key the user pressed.
You can get the context directly without using the mwstate dump.
lgkahn
06-14-2004, 01:27 PM
Again, thanks for your help and information. Could we add some special text to your messages and look for that when the right/enter key is used?
special text is not needed I can probably process the dialag in mwstate as to make sure it is one of my messages
If we do tag your messages with some special text, is there no way to determine if we are selecting "done" on the message detail vs. "right/enter" on the message list?
yep that is the problem .... if the event for selecting done looks the same as the event for selecting the item from the list of messages there is no way to get back from the message list (or you can get back by say selecting live tv or tivo button) but if you accidentially say select done on a record menu item it will try to reprocess it ... this would be *bad*... I will look at the problem again but before I was unable to differentiate the two events and that is why I decided to use the thumbs up with sendkey functionality.
lgkahn
06-14-2004, 01:32 PM
What's the problem with using the thumb up key?
mwstate is populated by the code in the script, not the key the user pressed.
same problem as with yours...
thumbs up on the message items is an error key so mwstate is not getting populated the way mwstate gets populated is by forcing you to goto the message contents with sendkey to get a good mwstate and then calling
get_mwstate
possibly processing thumbs up directly on the message details may work if the mwstate is already populated what do you think... maybe he should go ahead and try commenting out the sendkeys as I outlined and try it....
the only issue is does pressing thumbs up (ie an illegal key) wipe out the good /tmp/mwstate file
also the sendkey functinality was nice because you saved a step and selected the item from the list not from the message dtails and it also gave you a visual indicator of when processing was done.. ie it went back to the list.... If you change it to go directly from the details there is no real good way to do this...
lgkahn
06-14-2004, 01:44 PM
As for the other guys problem sluggishness on the SA boxes during a mfs_ftp store operation do you think there is somewhere in the mfs_ftp code we can put a tcl UPdate statement to get it to process the message loop more regularly and get better performance ... what do you thing stuart... I dont see that sluggishness much on a dtivo box... must be the increase in horsepower...
sanderton
06-14-2004, 01:47 PM
:confused:
No key you press does anything to the mwstate file - the mwstate file is created in the script by triggering an event:
event send $TmkEvent::EVT_MWUSEREVENT 0 [binary format II 6 0]
I'd have thought logic along these lines:
- Register the KeyPress event
- If the keypress is Thumb Up then
- Check the context, if it's the message list then
- dump mwstate and off you go.
sanderton
06-14-2004, 01:48 PM
As for the other guys problem sluggishness on the SA boxes during a mfs_ftp store operation do you think there is somewhere in the mfs_ftp code we can put a tcl UPdate statement to get it to process the message loop more regularly and get better performance ... what do you thing stuart... I dont see that sluggishness much on a dtivo box... must be the increase in horsepower...
Change the insert priority settings in mfs_ftp.
lgkahn
06-14-2004, 01:52 PM
No that wont work because the necessary information on the message list is not enough I need the dialog from the message details.. thus that is why I navigate to the message details via the sendkey....
So a workaround would be check the os version and if it is < 3
disable all the sendkey processing in the code and have them do thumbs up directly from the message details instead of the message list.. sounds kind of kludgy .. also there would be no visual indication that say an operation completed/worked.. There was another thread where I asked how to make the ding ding ding sound ... The only way I know to make sounds was also via sendkey and there was no operation for the ding ding ding sound...
lgkahn
06-14-2004, 01:54 PM
Change the insert priority settings in mfs_ftp.
Guess he will have to figure out how to do that himself because I don't think youd want to do that in general.. but if we could find a spot to put a tcl update statement in that seems like that would be less intrusive and wouldn't upset anyones existing installation... we already are replacing the STOR function anyway.. however when I looked at it , it seems to only be looping for ever PART of a file and that does not seem to be often enough to do any real good.
actually it is mfs_stdinsert that would be chewing up all the cpu and would need to stop and process the event loop and since that is an excutable... I don't think that is going to happen and I'm not sure changing the priority of mfs_ftp will help unless mfs_stdinser inherits its priority from mfs_ftp thread...
sanderton
06-14-2004, 02:07 PM
Guess he will have to figure out how to do that himself because I don't think youd want to do that in general.. but if we could find a spot to put a tcl update statement in that seems like that would be less intrusive and wouldn't upset anyones existing installation... we already are replacing the STOR function anyway.. however when I looked at it , it seems to only be looping for ever PART of a file and that does not seem to be often enough to do any real good.
actually it is mfs_stdinsert that would be chewing up all the cpu and would need to stop and process the event loop and since that is an excutable... I don't think that is going to happen and I'm not sure changing the priority of mfs_ftp will help unless mfs_stdinser inherits its priority from mfs_ftp thread...
The insert priority settings are standard ones to tweak in the settings.tcl file of mfs_ftp. They use setpri to change the priority of the import binary. Check the readme.
sanderton
06-14-2004, 02:10 PM
No that wont work because the necessary information on the message list is not enough I need the dialog from the message details.. thus that is why I navigate to the message details via the sendkey....
So a workaround would be check the os version and if it is < 3
disable all the sendkey processing in the code and have them do thumbs up directly from the message details instead of the message list.. sounds kind of kludgy .. also there would be no visual indication that say an operation completed/worked.. There was another thread where I asked how to make the ding ding ding sound ... The only way I know to make sounds was also via sendkey and there was no operation for the ding ding ding sound...
What do you get if you dumpstate while in the message list then? I'd have expected it to contain all the info you can see on the screen.
I don't beleive anyone knows how to generate sounds directly.
lgkahn
06-14-2004, 02:21 PM
What do you get if you dumpstate while in the message list then? I'd have expected it to contain all the info you can see on the screen.
I don't beleive anyone knows how to generate sounds directly
It didn't appear to have the message id or an easy way to figure out which specific line I was on if I remember correctly, so I could read the message detail as needed when I looked into it... But even If i could get it working that way and read the message contents directly in the mfs database instead of through the message dialog via the state file as I am doing now I would loose the indication that the processing was complete that I am getting now by using the sendkey functionality so I may as well leave it the way it is and try the other route which is to disable the sendkey if os is > 3.0 and try to have them use thumbs up directly on the message details, since I would rather not loose the indication that processing is completed on most of the boxes...
Unless you have some other suggestion as to how to notify that user that the processing is completed....
( I guess I could use the OSD functionality to notify but I believe in the kiss approach and adding more requirements for software that has to be installed in order for this hack to work will just make my maintainence of it more of a nightmare).
The biggest problem with my script right now is not that it doesn't run on 4.x it is that it freezes up the box every few days due to the event bug... I think it is more often than yours becuase I have to process event 28 which is just about every key press in the system so all key presses are going through my callback routine and most are being ignored.. but on the messages menu on 28 really gets processed and I think that is why it freezes up more often than your script does.
Hopefully this guys event server will help but I am not holding my breath... maybe a standalone C process that can sense when it is hung and restart itself will help... who knows.
lgkahn
06-14-2004, 02:31 PM
I think alot of the event bug problems may be due to mfs_ftp hanging and the fact the event 28 callback function goes through this process inside mfs_ftp...
I was thinking of doing somthing similiar to this guys event server and writing my own little tcl script separate from mfs ftp that simply loops waiting on event 28 for my specific thumbs up ignoring the rest just like inside the p1.tcl as now and tries to send the event through a pipe to mfs_ftp
what do you think... do you think this may or may not help the problem?????
Of course I would rewrite the callback function inside p1.tcl to simply wait on the event from the pipe instead of the way it is now...
hateeecs
06-14-2004, 02:37 PM
So a workaround would be check the os version and if it is < 3
disable all the sendkey processing in the code and have them do thumbs up directly from the message details instead of the message list.. sounds kind of kludgy .. also there would be no visual indication that say an operation completed/worked.. There was another thread where I asked how to make the ding ding ding sound ... The only way I know to make sounds was also via sendkey and there was no operation for the ding ding ding sound...
I agree that having to go into the message detail is a bit kludgy. (but again it's better than nothing for ppl in my situation). In terms of user response, could we simply use the OSD text writer thing to possibly show status (%complete, bytes complete, etc, etc)
Thanks,
lgkahn
06-14-2004, 02:47 PM
I agree that having to go into the message detail is a bit kludgy. (but again it's better than nothing for ppl in my situation). In terms of user response, could we simply use the OSD text writer thing to possibly show status (%complete, bytes complete, etc, etc)
see above OSD would work but I don't really want to have to support this script and require another piece of s/w on the box to have it work correctly...
makes my life that much more difficult.. OSD is difficult to install and get working correctly on our boxes....
If I get this working there will be no indication of completeness ... or maybe an option for OSD if I can find a way to make it universal with all the different versions of OSD out there
for instance to show a message with my osd the call is as follows:
/var/hack/newtext2osd -ufont -ttext -sdelay -o90
maybe a flag for osd or not and another variable you set for the options on how to call osd via exec on the box....
daryl
06-14-2004, 09:41 PM
Thanks everyone for your recommendations on how to get better remote response when using the mfs_ftp based PC Media Server.
So now I think I have a better understanding of what's going on:
1) the slow remote response during an ftp upload to my Tivo is due to CPU bandwidth limitations. This certainly seems to be the case, because when I am recording a show, and uploading simultaneously, the remote response is at its worse. But, when I am not recording a show, the remote response is slow, but still usable.
2) I've fiddled with the mfs_ftp priority, and seen how far I need to lower it to maintain good remote response times. Currently (@ setpri of '10') it takes about 20 minutes to upload a 30 minute show at Best Quality. When I lower priority to '50' in settings.tcl I can virtually eliminate the slow response, but now it takes 80 minutes to upload a 30 minute show at Best (200K/second). I guess this proves that CPU bottleneck is indeed the problem.
LGKahn, you've done a great job of simplying the interface to mfs_ftp. Any chance you could add a way for users to change the insertion priority from the Tivo menu itself? What about somehow to cancel a show once it starts uploading from the Tivo menu?
3) the event bug seems to occur for me about 24 hours after using mfs_ftp, or tivoweb. Invariably, I will lose remote response completely within one day if I use either of these apps. It's great that my shows all continue to record, but it's frustrating that I can't login to the shell and kill/restart the problem process.
I don't want to take this thread too far off base, but if anyone has any recommendations for how to get out of the event bug loop via a shell command, etc. (without physically unplugging the Tivo to reboot), I've love to hear them.
Thanks in advance.
Daryl
SA1/3.0 (141 hrs)
tivoftpd
tivoweb 1.9.4
mfs_ftp 1.2.9p
PC media server
tyserver
lgkahn
06-15-2004, 12:21 AM
with tivoweb 1.0 release and the runscript patch you can get into tivoweb and reboot the box when the event bug occurs.... also telnet connections should still work just not remot keypresses or the buttons on the front of the tivo... so you can telnet to the box and do ps x and find the say mfs_ftp process and kill -9 it..which also at least in our dtivos reboot the box.... maybe on your standalones it is differnt.
daryl
06-15-2004, 01:08 AM
with tivoweb 1.0 release and the runscript patch you can get into tivoweb and reboot the box when the event bug occurs.... also telnet connections should still work just not remot keypresses or the buttons on the front of the tivo... so you can telnet to the box and do ps x and find the say mfs_ftp process and kill -9 it..which also at least in our dtivos reboot the box.... maybe on your standalones it is differnt.
Thanks for the recommendation lgkahn. OK. I'll just go ahead and start a new thread and see if I can get to the bottom of this.
lgkahn
06-15-2004, 01:44 AM
hateeecs here is a new version to try you will have to thumbs up from the message detail not the list... it automatically checks the s/w version and should disable the sendkey call if >= 4
also there is an enableOSD line at the bottom of the script and some other lines that are tweeked for osd working on my box hopefully you can tweek them to get it to work on your box.. here are the settings... also this can also work in conjunstion with the sendkey stuff so when you get it all resolved on your box I will also post a new Q version of this which I am using
set info(enableOSD) 0
set info(OSDPath) "/var/hack/bin/newtext2osd"
set info(OSDFont) "-u/tvlib/font/verdana.ttf"
set info(OSDFontSize) "-p15"
set info(OSDDelay) "-s8"
set info(OSDBT) "-o90"
the only thing for osd that is hardcoded is the -tsome text parameter which I assume is the same for all versions of osd ....
so you should enable osd and change the settings for osd on your box but be carefull first time I tried this stuff was fffd up and it crashed my box...
I tested this on my box by changing the line version4 >= 3 and it was working on my box by doing thumbs up on the messge details with osd without the sendkey so it should work ok on yours...
sanderton
06-15-2004, 07:31 AM
with tivoweb 1.0 release and the runscript patch you can get into tivoweb and reboot the box when the event bug occurs.... also telnet connections should still work just not remot keypresses or the buttons on the front of the tivo... so you can telnet to the box and do ps x and find the say mfs_ftp process and kill -9 it..which also at least in our dtivos reboot the box.... maybe on your standalones it is differnt.
Killing mfs_ftp will always reboot the Tivo.
hateeecs
06-15-2004, 10:29 AM
hateeecs here is a new version to try you will have to thumbs up from the message detail not the list... it automatically checks the s/w version and should disable the sendkey call if >= 4
also there is an enableOSD line at the bottom of the script and some other lines that are tweeked for osd working on my box hopefully you can tweek them to get it to work on your box.. here are the settings... also this can also work in conjunstion with the sendkey stuff so when you get it all resolved on your box I will also post a new Q version of this which I am using
Thanks! I had a few minutes last night to start mucking around. I basically also have it working minus the OSD feedback which i'm excited to add. I had two major modifications to make. The first was that the event for the "error" on the message list/detail was id=27 subid=2 and the other key was something very large.
Second, the wait that was allowed before the user command was passed is too small for my machine. To solve this I just put the socket read in a while loop. I still need to learn TCL well enough to break this while loop after a really long time (say a minute).
Just thought I'd let you know my progress. Thanks again,
lgkahn
06-15-2004, 12:09 PM
what do you mean the event for error.. you shouldnt' need to change the event... I am not reading the event for error.. I am reading the event for thumbs up and that should be the same in version 4.x as it is in 3.x
In fact you definately don't want to change it to the event for error.. that event happens on every screen in the system.. anytime an error occurs...
not just the message screen.. you want to leave it on the event I had...
it should work fine with thumbs up on your box....
also what type of box are you trying to connect to ... to get the wait time down.. make sure to add the entries of the ip addresses you are trying to connect to to your host file in /etc/hosts and the wait times that are in the stock file should be fine....
hateeecs
06-15-2004, 01:17 PM
what do you mean the event for error.. you shouldnt' need to change the event... I am not reading the event for error.. I am reading the event for thumbs up and that should be the same in version 4.x as it is in 3.x
In fact you definately don't want to change it to the event for error.. that event happens on every screen in the system.. anytime an error occurs...
not just the message screen.. you want to leave it on the event I had...
it should work fine with thumbs up on your box....
also what type of box are you trying to connect to ... to get the wait time down.. make sure to add the entries of the ip addresses you are trying to connect to to your host file in /etc/hosts and the wait times that are in the stock file should be fine....
Well I didn't actually look at what event that i'm getting. I used the generic print out all event data script to determine that "thumb up" came through as event 27 for me. Maybe the way that events are parsed is different for 4.x boxes.
I think what should be added is a check to make sure that when we get the "thumb up" error (bong) event that the dialog title is "Message Details" and that all the other fields exist. If these things don't exist that just don't do anything (do we have to rethrow the event?)....this should eliminate the concern that if "thumb up" is triggered as an error somewhere else, this thing is going to blow up on us.
As far as the timeouts go, i'll add my ip address to the hosts file. I still think I prefer putting the socket read in a while loop, just seems to eliminate unnecessary waits and timeout failure.
The box that i'm connecting to is gentoo running proftpd.
btw. Why don't you use "LS" instead of "DIR" to eliminate the column width problem? Does LS not work/ not standard? Just throwing that out there.
I guess DIR == LIST and LS == NLIST?
lgkahn
06-15-2004, 02:58 PM
No the thumbs up will come through as more than one event...the 27 you are seeing is the error event for thumbs up in an error case.... becuase of the error ding and then the real thumbs up event of the 28 that I had in the script... you should leave it as is in the stock script... .
also ls is a local ftp function there is no remote ls command
list is the only real command on a remote server.. you ftp client implements the other commands from the list command
ie.
ftp> remotehelp
214-The following commands are recognized (* =>'s unimplemented).
PORT CWD LIST TYPE PWD RETR NLST USER
PASS QUIT CDUP PASV SYST ABOR XCWD HELP
XPWD REST NOOP STRU STOR RNFR RNTO DELE
RMD XRMD MKD XMKD ACCT XCUP SMNT REIN
MODE STOU APPE ALLO SITE STAT
214 HELP command successful.
ftp>
change the script back to the detault event and make sure it works.. I am not going to change the event to 27 in the script...that would break it on the rest of the boxes.. I am sure the stock event works on your box
hateeecs
06-15-2004, 04:03 PM
Thanks for the info. I'll look again but i'm pretty sure that I didn't see 28 coming through. And, IIRC, the subevent was different. When I get some more time infront of the TV i'll try it out again and report back.
I didn't know about remote help. I see NLST as one of the options.
Here is what RFC959 (the FTP standard) says:
NAME LIST (NLST)
This command causes a directory listing to be sent from
server to user site. The pathname should specify a
directory or other system-specific file group descriptor; a
null argument implies the current directory. The server
will return a stream of names of files and no other
information. The data will be transferred in ASCII or
EBCDIC type over the data connection as valid pathname
strings separated by <CRLF> or <NL>. (Again the user must
ensure that the TYPE is correct.) This command is intended
to return information that can be used by a program to
further process the files automatically. For example, in
the implementation of a "multiple get" function.
Looks like you should be able to use that to eliminate the column width thing.
Thanks again,
-Chris
lgkahn
06-15-2004, 04:21 PM
yep that may work I'll look into it and if so... make the appropriate changes...
when you do thumbs up form the message page you will et two events the 27 with a random large id which varies and is the error event then followed by the 28 which is the valid thumbs up event.. I don't think version 4.x would be any differnt. it works in 3.x on dtivos and SA's
cojonesdetoro
06-15-2004, 05:28 PM
To solve this I just put the socket read in a while loop. I still need to learn TCL well enough to break this while loop after a really long time (say a minute).
Just thought I'd let you know my progress. Thanks again,
Look for fxpmerge.tcl and look at the getsock function.
cojonesdetoro
06-15-2004, 05:31 PM
Zirak claims that TCS completely bypasses the event bug but he's never explained exactly how (not that I can find, anyway). I dug through the TCS source code and could not find where and how he does this. I kept meaning to ask him directly but never got around to it.
lgkahn
06-15-2004, 06:37 PM
I remember now why I didn't use the nlst command it doesn't work with tivo to tivo transfer mfs_ftp doesn't support it correctly at least with a wildcard anyway ie *.t* nothing comes back where list *.t* works fine..
However, because of the pain in the ass we are seeing with people having with the line length thing (geeze guys you are hackers I figured if you could hack your boxes you could handle the ftp line length easily :) )...
anyway I have taken another approach...
if line length is one in your remote servers file it uses the nlst command so you don't have to know the line length at all,, if it is anything else it uses the list command and you must know the line length, so it still works with tivo's
A new version will be posted in the first message in the thread along with a new sample remoteservers and a new readme.
version 1.2 also is an in process version for 4.x but I believe it will work, and it does work with OSD as well if you enable and configure it...
hateeecs
06-15-2004, 06:55 PM
I remember now why I didn't use the nlst command it doesn't work with tivo to tivo transfer mfs_ftp doesn't support it correctly at least with a wildcard anyway ie *.t* nothing comes back where list *.t* works fine..
However, because of the pain in the ass we are seeing with people having with the line length thing (geeze guys you are hackers I figured if you could hack your boxes you could handle the ftp line length easily :) )...
anyway I have taken another approach...
Great! I guess that is mfs_ftp's bad. But your solution works well for ppl on both side on the fence. I wonder if just NLST works. If it did, I would suggest that you use that and remove the column length concept all together. The format of LIST is not standard, more text to transfer, more text to parse, etc. Long story short: a pain.
For debugging purposes, it makes sense, when I couldn't get my events to register, the first thing that I was told to do was check my column length, event though I knew that my problems were larger than that.
What does the *.t* get you? If I had barf.txt would it try to insert that? I would suggest that instead we get all the files and then exclude all those (in code) that don't end in extensions that are supported by the insertion tools.
Anyway, thanks for all of your work!
-Chris
sanderton
06-15-2004, 06:58 PM
Zirak claims that TCS completely bypasses the event bug but he's never explained exactly how (not that I can find, anyway). I dug through the TCS source code and could not find where and how he does this. I kept meaning to ask him directly but never got around to it.
IIRC he has the event handler running in a separate process, which quits when done, which seems to release some kind of handle.
dlang
06-15-2004, 10:59 PM
Great! I guess that is mfs_ftp's bad. But your solution works well for ppl on both side on the fence. I wonder if just NLST works. If it did, I would suggest that you use that and remove the column length concept all together. The format of LIST is not standard, more text to transfer, more text to parse, etc. Long story short: a pain.
For debugging purposes, it makes sense, when I couldn't get my events to register, the first thing that I was told to do was check my column length, event though I knew that my problems were larger than that.
What does the *.t* get you? If I had barf.txt would it try to insert that? I would suggest that instead we get all the files and then exclude all those (in code) that don't end in extensions that are supported by the insertion tools.
Anyway, thanks for all of your work!
-Chris
you definantly want to use nlst rather then ls-and-parse unfortunantly when you get really large shows mfs_ftp will have the colums move around.
I haven't updated my mfs_tools since about 1.2.9 or so, but I submitted patches to make nlst work back then and have been useing it (with wildcards) ever since.
I'll look at downloading the new mfs_ftp and see how it works.
since I'm bothering to post here and there have been problems with the remote I'll ask this question while I'm here
I lost my tivo remote almost a year ago now and haven't bothered to replace it (I know, lazy me :-) but have been useing the webremote feature on tivoweb instead. will that work with this package?
lgkahn
06-15-2004, 11:15 PM
Doesn't seem too... not sure why but it is not getting the thumbs up event when done through the web remote....
lgkahn
06-15-2004, 11:19 PM
DO you have the patches to get nlst working in mfs_ftp with wildcards I can roll the patches into my p1.tcl patch file...
lgkahn
06-16-2004, 06:51 PM
I have written some code using the event server and sockets and am trying to tie it in to mfs_ftp without threads in tcl I don't see a way to do it other than replacing the main loop in mfs_ftp ie
set db [dbopen]
EnableTransactionHoldoff true
init_vars
init_procs
set forever start
vwait forever
this is a pain because this cannot be done in the patch code method I would have to replace the mfs_ftp.tcl file in order to do this... does anyone else have any other suggestions or is there a threaded tcl library out there so I can have a fucntion in my patch run in its own thread ?????
thanks...
Instead of the vwait forever here I would call some functions that communicate with the event server and have the vwait in a loop in the code along with a fileevent on the socket and a after wait event to sense that the event server has crashed or hung and restart it.... that is the jist of it... I have it working independently in its own tcl script currently and it will restart the event server if it dies or doesn't give a heartbeat in 30 seconds....
and does get all the events....
here is example output where I killed the eventserver process in another telnet session..
tivo:/var$ etest.tcl
killing old eventserver.tcl
restarting eventserver.tcl
opening socket to 127.0.0.1 port 2002
fconfiguring socket
in process it cancelling restart_it wait eof = 0
got a line: heartbeat
in process it cancelling restart_it wait eof = 0
got a line: heartbeat
in process it cancelling restart_it wait eof = 0
got a line: heartbeat
in process it cancelling restart_it wait eof = 0
got a line: heartbeat
in process it cancelling restart_it wait eof = 0
got a line:
in process it cancelling restart_it wait eof = 1
Got eof in process it so restarting
killing old eventserver.tcl
restarting eventserver.tcl
opening socket to 127.0.0.1 port 2002
fconfiguring socket
in process it cancelling restart_it wait eof = 0
got a line: heartbeat
in process it cancelling restart_it wait eof = 0
got a line: heartbeat
in process it cancelling restart_it wait eof = 0
got a line: heartbeat
in process it cancelling restart_it wait eof = 0
got a line: heartbeat
in process it cancelling restart_it wait eof = 0
processes running
374 ? S 0:00 /bin/bash -login
378 ? S 0:00 /bin/tivoftpd
379 ? S 0:00 /bin/bash -login
421 ? S 0:00 /bin/bash -login
460 ? S 0:01 /tvbin/tivosh ./etest.tcl
468 ? S 0:02 /tvbin/tivosh /var/eventserver.tcl
469 ? R 0:00 ps x
rc3105
06-16-2004, 09:27 PM
good start but it's not that simple, the streaming & import procedures don't yield control to allow threading... (yet) ;)
lgkahn
06-16-2004, 09:41 PM
Well here is what I have so far.. Reily
I have a version using an event server that is a separate tcl process that gets killed and restarted automatically when my p1.tcl patch starts up..
it gets the events (only the one interested in and the heartbeat ever so many seconds)
then in my mfs_ftp patch it is reading the hartbeat and the event of interest
... thumbs up from a socket from the event server...
if I don't get a heartbeat within a user defineable timeout right now set to 45 seconds it closes the socket and tries a kill and restarts the event server...
since the event server doesnt do mfs it wont cause a reboot.. also if I get an eof on a read it does the same thing...
Since there is no threads I had to change the last two lines in the mfs_ftp.tcl main as follows
# lgk new code for event server stuff
restart_event_server $dummy $addr $port
event_loop $addr $port $timeout
# lgk end new code comment out old vwait loop below it is replaced by our
# event_loop fx above
# set forever start
# vwait forever
as you can see I commented out two lines and added my two calls.. the main event vwait loop is in my event_loop fx... I do check for your forever variable and exit my loop if it gets set.. and did check this is working...
current this is working and running on my machine ok on a hacked version of Q that I have kept running but no reason to think it wont work on P as well..
It does seem to be pretty much just as responsive in terms of getting the events as the old approach.
I will test it for awhile days to a week or two to see if my box doesn't freeze up anymore... If it does alleviate the event problem maybe we can itegrated in that I will add a global variable or something and you could possibly check for it or maybe even better make your set forever start and vwait forever be inside a function so I can replace it in my patch script that would seem to be the best approach... what do you think... cross your fingers and lets see if this works everyone... here is an example output in the log..
12:17:21:AM - sourcing settings
12:17:21:AM - Running PC patch 1.0b11 (Q)PC1.3
07:17:22:PM - Listeners set, done here, back to mfs_ftp
07:17:22:PM - syncing PC listing
07:17:22:PM - in parse servers file current file is ./remoteservers
07:17:22:PM - in cleanup server mail
Deleted id 184140
Deleted id 184141
Deleted id 184142
Deleted id 184143
Deleted id 184144
Deleted id 184145
Deleted id 184146
Deleted id 184147
Deleted id 184148
Deleted id 184149
Deleted id 184150
Deleted id 184151
Deleted id 184152
Deleted id 184153
Deleted id 184154
Deleted id 184155
Deleted id 184156
Deleted id 184157
Deleted id 184158
07:17:28:PM - set 216.177.20.119 movies-main 21 .
07:17:28:PM - set 216.177.20.119 movies-horror 21 horror
07:17:28:PM - set 216.177.20.119 movies-kids 21 kids
07:17:28:PM - set 216.177.20.119 movies-mystery 21 mystery
07:17:28:PM - set 216.177.20.119 movies-superheros 21 superheros
07:17:28:PM - set 216.177.20.119 movies-western 21 western
07:17:28:PM - set 216.177.20.119 newmovies 21 hdrive
07:17:28:PM - set 216.177.20.119 newmovies-horror 21 hdrive/horror
07:17:28:PM - set 216.177.20.118 upstairs-tivo 3105 tmf
07:17:28:PM - Done parsing
07:17:28:PM - got total servers = 9 now doing message loops
07:17:33:PM - sourcing p1
07:17:36:PM - updating cached recording info
........................
........................
catch close lastsock val "can't read "info(lastsock)": no such element in array"
07:17:52:PM - killing old lgkeventserver.tcl
07:17:57:PM - restarting lgkeventserver.tcl
07:18:07:PM - opening socket to 127.0.0.1 port 2002
07:18:07:PM - fconfiguring socket
07:26:33:PM - got a line (not heartbeat): remote 28 1 7 calling pc_dumpstate_new
07:26:34:PM - Running get_mwstate
07:26:38:PM - Local ID to get: Subject: <100>Refresh upstairs-tivo (216.177.20.118)
From: <100>upstairs-tivo 216.177.20.118
Date: <100>Wed 6/16
Name: Refresh Recordings from upstairs-tivo (216.177.20.118)
IP: 216.177.20.118
...
sanderton
06-17-2004, 12:54 PM
maybe even better make your set forever start and vwait forever be inside a function so I can replace it in my patch script ...
Can you call it by patching init_procs so it never returns control to the main code?
lgkahn
06-17-2004, 03:45 PM
I don't believe you can patch init_procs since init proces is the procedure that calls the patch routines????
rc3105
06-17-2004, 05:09 PM
sure you can. if you source a patch that hijacks execution it can do whatever it wants (replace procedures in memory, rename them, clear the main vwait loop, unset all the variables & start over)
I've done some secure scripts but this definatly isn't one of them ;)
---
secure script:
Main Entry: ox·y·mo·ron
Pronunciation: "äk-sE-'mor-"än
Function: noun
Inflected Form(s): plural ox·y·mo·ra /-'mor-&/
Etymology: Late Greek oxymOron, from neuter of oxymOros pointedly foolish, from Greek oxys sharp, keen + mOros foolish
: a combination of contradictory or incongruous words (as cruel kindness); broadly : something (as a concept) that is made up of contradictory or incongruous elements
- ox·y·mo·ron·ic / adjective
- ox·y·mo·ron·i·cal·ly / adverb
lgkahn
06-17-2004, 11:02 PM
so If I try to replace init_proces what would happen to the copy in memory that is running ?????? because there is code in it that should be run after my proc is loaded... also if somehow I dont get rid of your vwait variables after mine exit I believe it will get stuck in your loop.... hmmmm
rc3105
06-17-2004, 11:41 PM
well, if I were going to completely hijack a tcl script that used vwait...
source a patch that loads two procedures (humpty / dumpty) & registers a callback for humpty the instant vwait kicks in (after 1 humpty)
humpty deletes init_procs, renames dumpty to init_proc, sets a callback (after 1 init_proc) and returns control to the vwait loop
then init_proc (dumpty) is called, deletes humpty & you've effectively hijacked control
if you're really paranoid unset all variables / file handles / the event loop / callbacks & re-init everything
gottahavit
07-27-2004, 10:42 PM
Very nice tool, now I just need to figure out how to edit TY files and leave them as TY. I want to move stuff off to servers, but I want to edit commercials first. I'mlooking at the chunkeditor, but this seems awful cumbersome compared with tytools. I may have to look into modifying tytools to save back to TY.
Anyway I made a couple minor adjustments to the script and thought I would share with anyone who liked my changes. Here's what I did:
1) I removed the Delete <dir> entry in the mail system and instead simply had each directory load first delete all current entries so the mail list only ever shows one directory worth of files.
2) I modified the script to take you to the Now Playing list once the download is kicked off.
3) I removed the remote key send that would take you to the Tivo screen when the download was complete. It kept interupting me while watching TV.
Please use at your own risk, I am using on S2 DTIVO with mfs_ftp 1.2.9P, so I guess this script is only good for that version of mfs_ftp.
The author is of course welcome to rollback any of my changes into the official version(though they are mostly personal preference changes rather than enhancements).
I will probably do some more tweaking as I learn more.
Once again thanks for the great tool!!
JohnSorTivo
07-27-2004, 11:52 PM
...now I just need to figure out how to edit TY files and leave them as TY. I want to move stuff off to servers, but I want to edit commercials first. I'mlooking at the chunkeditor, but this seems awful cumbersome compared with tytools.
Currently no tool exists for a series 2 DirecTivo to edit a .ty file and save as a .ty file. Chunkeditor is a Tivo Native utilty for series 1 units only, so it would not only be cumbersome, but unusuable for your purpose.
I may have to look into modifying tytools to save back to TY.
Tytool is not an open source tool, so there is no access to the code for you to tweak, at least not without getting jdiner to make it available to you.
gottahavit
07-28-2004, 12:18 AM
Currently no tool exists for a series 2 DirecTivo to edit a .ty file and save as a .ty file. Chunkeditor is a Tivo Native utilty for series 1 units only, so it would not only be cumbersome, but unusuable for your purpose.
Tytool is not an open source tool, so there is no access to the code for you to tweak, at least not without getting jdiner to make it available to you.
is there a reason no one has made an editor to save back to ty files? obviously enough people have figured out how to read them. I have a fair about of expierience with audio and video codecs and container formats, is there any documentation on the TY file fomat?
As for tytools, you are right, I had it confused with tyshow directshow filter, which is opensource. Perhaps I can work backwards from there. If it is a proprietary mpeg-1 derivitive it should not be too difficult to edit out sections.
rc3105
07-28-2004, 12:56 AM
chunedit IS the editor to save back to ty - it just made more sense to do the editing during the extraction process (adapting it to work on pc side files would be nearly as easy as "cat infile.ty | chunkedit_tcl_wrap.exe > outfile.ty"
tystudio & tcs both provide gui's for creating edl's
chunkedit only needs minor updates for s2 streams. the stock version usually works fine here
gottahavit
08-03-2004, 09:39 PM
slightly OT, but is there anyway to know in a script when a file is done playing?
lgkahn
08-04-2004, 03:41 PM
so are you saying anytime you refresh a directory it deletes all other now playing entries.. I am not sure everyone would want that.. the stock version on refreshes the entries for that one directory..
the going to now playing instead of back seems like a good change... have to get a version for the latest mfs_ftp when I get time.. but for now it works ok on my haked verison Q and on P and no one is screaming for version R so not a big priority... a fix for the event bug would be better but nothing seems to work....
gottahavit
08-04-2004, 07:24 PM
it deletes the mail entries for all the folders yes. So it's like a single folder view rather than a built up view and the mail is not cluttered with delete emails. What I am looking for now is a way to know when a file finishes playing. Any file, just a generic event. Is there such a thing?
rc3105
08-04-2004, 08:24 PM
event register $TmkEvent::EVT_BACKHAUL callback_proc
subtype 14 is what you want to check for
gottahavit
08-08-2004, 10:28 AM
event register $TmkEvent::EVT_BACKHAUL callback_proc
subtype 14 is what you want to check for
Thanks, does this fire only when a file finishes playing or will it also fire when I hit some tuvo button to suspend or stop playback?
gottahavit
08-08-2004, 10:01 PM
nevr mind I figured it out and it works perfectly thanks. I taught my tivo a new trick ;-). I set it up so that is continuously plays from the file you start with. So you sort by name then go to the first file of the group you want and hit play, when that file is complete it automatically starts to play the next one. Rightnow I actually coded this as part of tivoweb, but will be moving it to my modified version of this tool. Still needs some tweaking and I want to make it work with files setup from this tool tool. Proably need it to auto delete the file if being played from download. Anyway thanks for the help and when I get something useful I will post.
Ugotnext
08-24-2004, 05:32 PM
I didn't see that this is specifically S2 for but I gather from various comments in that thread that it is a S2 specific solution.
Anything like this PC interaction free -- "Pull from Tivo/FTP Server to Push to Tivo" solutions exist to S1 users?
Thanks
lgkahn
08-31-2004, 05:22 PM
there is nothing in the hack that is s2 specifiec... pre say... I just don't have a hacked s1 box to support it... I believe others have gotten it working.. you are welcome to try.
blueman2
10-08-2004, 12:43 AM
I am not having luck getting this working. Here is my setup:
HDVR2 Series 2
4.01b
WinXP SP1
Running BPFTP 2.21, on port 21
PC IP 192.168.1.200
Tivo IP 192.168.1.250
p1.tcl (edited part)
global remotetivo calendaroffset info leftarrow thistivo tivo select ping listenport dummystation dummychan delete refresh last31 remotepc listenportcommas thistivocommas fileno db tivoswversion swsystem version
outd $info(snpdbl) "Initialising SNP variables"
#set remotetivo "211.177.20.126"
set remotepc "192.168.1.200"
# change to the IP of the remote TiVo
set listenportcommas "19,149"
set thistivo "192,168,1,250"
# change to the IP of this TiVo WITH COMMAS NOT FULL STOPS
remoteservers file:
192.168.1.200
21
Movies
user
pwd
.
1
port3105.log file
[quote]
03:41:01:AM - sourcing settings
03:41:02:AM - Running PC patch 1.0b8 (P)PC1.2
04:41:08:AM - Listeners set, done here, back to mfs_ftp
04:41:08:AM - syncing PC listing
04:41:08:AM - in parse servers file current file is /var/mfs_ftp/remoteservers
04:41:08:AM - in cleanup server mail
Deleted id 1171052
Deleted id 1171053
Deleted id 1171054
04:41:11:AM - set 192.168.1.200 Movies 21 .
04:41:12:AM - Done parsing
04:41:12:AM - got total servers = 1 now doing message loops
04:41:18:AM - sourcing p1
04:41:18:AM - sourcing p2
04:41:38:AM - updating cached recording info
..............................................
[\quote]
My Tivo shows 3 email messages, but no indication of any shows (which I have in the root ftp directory). Also, when I select one of the email messages, then hit the up button, it just "bongs" like it is an error.
Any clue what is going on?
darrin75
10-08-2004, 06:00 PM
make sure your using this one from this thread alloymate is different than the one below..Don't worry i will help you figure it out, as some people sure helped me..
http://www.dealdatabase.com/forum/showthread.php?t=34334&highlight=pc+media+server
darrin75
10-08-2004, 06:08 PM
catch close lastsock val "can't read "info(lastsock)": no such element in array"
doe sit say this at the bottom of your log file??
blueman2
10-08-2004, 06:09 PM
Thanks so much. I really appreciate any advice on this.
THat is the file I am using (mediaserverP). And I am running MFS_FTP 1.2.9P.
I think the issue is my box is an HDVR2 (S2) running 4.01b. There might be an issue with 4.0 software related to the sendkey. The author says he has disabled sendkey for 4.0 to avoid issues, but no joy here yet.
Could you recheck my p1.tcl and remoteservers files above (compare to yours) and see if I might have made some dumb mistake? I commented out the remotetivo line, since I only have 1 tivo. Other than that, I think I followed standard instructions.
blueman2
10-08-2004, 06:11 PM
The log file (listed above about 4 posts) is my entire log file. I deleted the old file, rebooted my tivo, tried to select the refresh in mail, and then copies the entire port.3105.log file and pasted it above.
So, no, it does not have that at the end.
darrin75
10-08-2004, 06:27 PM
m pretty sure i read some where that bulletproof ftp server does not work...I am pretty sure of this...Try filezilla beta 0.89
darrin75
10-08-2004, 06:28 PM
set up look good to me
expect if you use filezilla where you have the 1 put 56.
AlphaWolf
10-08-2004, 07:00 PM
For the 4.x and 5.x boxes, why don't you have the tivo side populate a folder with a complete list of tystreams stored on the server instead of using the messages? That way it would work exactly like regular HMO does, only in this case you can download from a PC instead of just another tivo. AFAIK the scripting to do all of this is available. I'd look into it if I had more time.
If you wanted to take it a step further you could add a beacon service for the PC so that it will be a plug and play setup.
blueman2
10-08-2004, 07:11 PM
darrin,
Well, filezilla server made some impact. I now get
catch close lastsock val "can't read "info(lastsock)": no such element in array"
Does that mean I need to change the 1 to a 56? I will go ahead and try that now.
AlphaWolf,
Yes, that is what I would prefer. I too am trying to learn more about that. This method is a bit of a kludge, but I am hoping to get it working for now.
darrin75
10-08-2004, 07:18 PM
the tivo is listening for commands...let me know what you get
blueman2
10-08-2004, 07:26 PM
Well, it seems to be still acting just the same. It does not list any of the .ty+ or .tmf files and does no seem to react to my thumbs up press. Log, after trying all of that, is:
10:11:40:PM - sourcing settings
10:11:41:PM - Running PC patch 1.0b8 (P)PC1.2
11:11:42:PM - Listeners set, done here, back to mfs_ftp
11:11:42:PM - syncing PC listing
11:11:42:PM - in parse servers file current file is /var/mfs_ftp/remoteservers
11:11:42:PM - in cleanup server mail
Deleted id 1173926
Deleted id 1173927
Deleted id 1173928
11:11:43:PM - set 192.168.1.200 Movies 21 .
11:11:43:PM - Done parsing
11:11:43:PM - got total servers = 1 now doing message loops
11:11:45:PM - sourcing p1
11:11:45:PM - sourcing p2
11:11:59:PM - updating cached recording info
.................................................................................................... .......................
.................................................................................................... .......................
catch close lastsock val "can't read "info(lastsock)": no such element in array"
I did change the last line in remoteservers file from 1 to 56 as you suggested. SHould I try back to 1?
darrin75
10-08-2004, 07:38 PM
when you press thumbs up does it do anything different than before..
second thing in filezilla is it logged on etc.. And have you set up user in the filezilla perfence, this is where you tell it what files to list...
darrin75
10-08-2004, 07:39 PM
leave it at 56 for now
We first need to make sure that when you hit thumbs up key it is reacting with your pc. And from your log it is not doing that yet..
blueman2
10-08-2004, 07:41 PM
No, the thumbs up still just bongs, and does not seem to do anything. port.3105.log also shows nothing added when I hit thumbs up. But I read in this thread that with 4.0 software on my Tivo, it will only 'bong', and that I have to go into message details to hit the thumbs up, which I have also tried. Just no success.
The log in Filezilla shows the Tivo has logged in, but has not issued any commands