This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device.
I assume you've read the TiVo Hack FAQ and you have either shell access to your TiVo or you have its disk connected to a PC booted with one the boot disks for TiVo hackery. Much of this info was gleaned from other people's posts on the AVS TiVo Underground Forum without which this wouldn't be possible. Thanks!
I did things a little bit differently than the other methods I've seen on this subject so I thought I'd share my experiences. I had the following goals:
You want things to look like this:
if [ "$shondss" = "true" ]; then echo "Starting bash on /dev/ttyS3" bash -login </dev/ttyS3 >& /dev/ttyS3 & fi if [ "$pppondss" = true ]; then echo "Starting pppd on /dev/ttyS3" /var/hack/ppp/startppp & tnlited 23 /bin/bash -login & fiThis will start our PPP script and a telnet daemon whenever pppondss=true is defined in the boot flags.
If you don't have the ROM password (and thus are unable to set the shondss or pppondss variable), are setting this up from a boot floppy, or if you just want to run a shell on the dss port whenever pppondss is not set you may wish to use the following instead:
if [ "$pppondss" = true ]; then echo "Starting pppd on /dev/ttyS3" /var/hack/ppp/startppp & tnlited 23 /bin/bash -login & else echo "Starting bash on /dev/ttyS3" bash -login </dev/ttyS3 >& /dev/ttyS3 & fiIf you don't have the ROM password, you can set it from the bash prompt when you boot the TiVo by running:
crypto -u -srp "password"where "password" is the password you wish to use.
Note that you will probably need to run:
stty saneFrom the bash prompt to turn on echo and normal tty processing. This is not a problem if you start bash from a tnlited connection.
ln -s /sbin/pppd /var/hack/mypppdI put the actual PPP options in /var/hack/ppp/options.ttyS3 as follows:
/dev/ttyS3 57600 nocrtscts noauth local xonxoff asyncmap 0 netmask 255.255.255.0 defaultroute lcp-echo-failure 2 lcp-echo-interval 60 connect "/var/hack/ppp/chat.ttyS3"I also edited /etc/ppp-options and commented out the debug and kdebug paramters. These are not needed and in fact, because syslog.conf isn't setup to record the information they are logging all these do is chew up CPU unnecessarily. Why bother? Because /etc/ppp-options will be read before /var/hack/ppp/options.ttyS3. That means if there is anything in it we don't like we must either disable it in our own config or comment it out of /etc/ppp-options directly.
Because there are no modem control lines we specify the local option (this is also why we do not need to use the cua version of the device). Due to the lack of hardware flow control on the DSS port we have to turn off rts/cts flow control (since it was specified in /etc/ppp-options) and turn on software flow control (xon/xoff).
The lcp-echo-failure and lcp-echo-interval options allow pppd to detect when the connection is no longer working (usually because either machine has rebooted) and to tear down the connection. We send a packet every 60 seconds to verify that the link is still up. If, after 3 minutes, there has been no reply the link will drop and automatically restart (more on that later).
You'll notice there is a chat script specified. With a normal pppd, the argument to the connect option is a program or line to run through the shell. The TiVo version has been hacked to pass the argument to the chat program directly. For connecting to an OpenBSD machine that starts pppd from getty(8), a simple chat script is all that is needed. I use the following for my /var/hack/ppp/chat.ttyS3 file. All it does is send a return and wait for the login prompt.
TIMEOUT 10 '' '' ogin:--ogin: ''We can't use the passive option in this setup because it would lead to deadlock with both sides of the connection waiting for the other to start up. Because a chat script is used, there's no real need for passive anyway. I don't specify the persist or holdoff options because they did not function as expected. Specifically, holdoff seems to have been ignored and while the connection did retry with persist enabled, pppd would never get a good connection (probably because the other end was not ready) and did not re-run the chat script! Therefore, I use the following script, /var/hack/ppp/startppp to continuously start pppd after waiting a bit between connections:
while : ; do
/var/hack/mypppd nodetach file /var/hack/ppp/options.ttyS3
sleep 30
done
tty00 "/usr/libexec/getty PPP.57600" unknown on localAnd PPP.57600 is defined in /etc/gettytab thusly:
PPP.57600:\
:sp#57600:np:pp=/etc/ppp/ppplogin:
In other words, it is a 57600 bps connection with no parity using
/etc/ppp/ppplogin as the script to run when it detects a
PPP connection. Here's what I used for /etc/ppp/ppplogin:
ifconfig ppp0 down >/dev/null 2>&1
ifconfig ppp0 delete >/dev/null 2>&1
route -n delete 192.168.2.4 >/dev/null 2>&1
route -n delete 192.168.2.5 >/dev/null 2>&1
exec /usr/sbin/pppd $TTY $SPEED proxyarp nocrtscts local \
noauth xonxoff lcp-echo-failure 2 lcp-echo-interval 60 \
192.168.2.4:192.168.2.5
This script sets the local (server) IP address of the connection
to 192.168.2.4 and the remote end to 192.168.2.5. It uses proxy
arp to make the TiVo visible to the local network.
if [file exists /var/tmp/pppaddr] {
We add:
if [info exists env(pppondss)] {
if {$env(pppondss) == "true" || $env(pppondss) == "TRUE"} {
putlog "pppondss set in prom, using existing connection"
catch {file delete /var/tmp/pppaddr}
}
}
Note that this will only have an effect if pppondss=true is set in
the boot flags (or in the rc files).
If your TiVo is behind a firewall that only allows passive ftp out you will need to make the TiVo use passive ftp for its log uploads. Unfortunately, the version of ftp_lib.tcl TiVo ships has broken passive ftp support. You can replace /tvlib/tcl/ftp_lib.tcl with version 1.2 from the author's web site. TiVo has made some changes to ftp_lib.tcl (grep for 'DNS' in the TiVo ftp_lib.tcl) but I was able to use the stock 1.2 ftp_lib.tcl without problems. You may want to edit it and unset the VERBOSE and DEBUG variables to reduce the verbosity to the level of the TiVo-shipped version. Now that ftp_lib.tcl supports passive ftp we need to make the TiVo use it. This is fairly simple as it just requires us to add the -mode passive argument after the password in the FTP::Open line. In version 2.X of the TiVo software this is located in /tvbin/upload.tcl. In version 1.3 you should edit /tvlib/tcl/tv/CmdStr.itcl instead. Most people won't have to bother with passive ftp.
df /on the TiVo to see which root partition is active and mount the other one.
In the following example, the current root partition is /dev/hda4 so the old pppd will live on /dev/hda7.
TiVo [~] # df / Filesystem 1024-blocks Used Available Capacity Mounted on /dev/hda4 126911 30233 90125 25% / TiVo [~] # mount /dev/hda7 /mnt TiVo [~] # ls -l /mnt/sbin/pppd -rwxr-xr-x 1 0 0 154472 Oct 5 11:30 /mnt/sbin/pppd TiVo [~] # rm -f /var/hack/mypppd TiVo [~] # cp /mnt/sbin/pppd /var/hack/mypppd
Once you have backdoors enabled you can see the log files by entering "Clear Enter Clear Thumbs-Up" on the remote. The right arrow will cycle through the available log files and the channel up/down key will page up/down. You are probably only interested in the /var/log/messages file for debugging the PPP connection itself. If you are having a problem when the TiVo does its "daily call" you should look at /var/log/tvlog, /var/log/tclient, and /var/log/tverr.
That should do it!
Another good source of info on setting up PPP on your TiVo is
the
TiVo Updating Over Dedicated Internet HOWTO