Introduction

I ran into a serious dilemma with my TiVo one day. I have a Series 2 TiVo that suffered a fatal hard disk failure. No problem, I thought, I'll just order a new disk from NewEgg and revert to a backup image.

Things would not turn out as easy as it would seem. Sure, I had no problems writing the image to my new disk via MFSTools. But when I restarted the TiVo I discovered that it contained TiVo OS 3.0 - the release prior to USB ethernet support. The problem is that I have no landline within my residence, and hence no way (easy) way to get a newer OS release. So how do I get the TiVo to update itself?

Acknowledgements

This HOWTO is based upon the work of "ylee" who got the connection working on Red Hat 7.2 with a 2.4 kernel. My contributions are the commands to get it to work with 2.6. Another reference describes how to use Windows XP as the host.

Setup

Here were my specific circumstances:

TiVo
I have a Series 2 TiVo, specifically the one branded by AT&T. Its model number is 130040. The TiVo has a dongle that connects to its serial port; on the other end is a 9-pin male serial port.
Linux workstation
I have a Debian/unstable system running a custom-compiled 2.6.14 kernel. It already has a working Internet connection by way of its IP, 192.168.1.2. The computer has a 9-pin male serial port at /dev/ttyS0.

I will assume that the reader has a basic grasp of NATing and PPP. If not read the excellent IP Masquerade HOWTO. Consult the PPP Howto to get your serial port working.

Test the physical connection

Now that you have your basics covered, connect your workstation to the TiVo by way of a null modem. Ensure that you have your serial port either compiled into your kernel or compiled as a module (serial_core). Install minicom, then run it as root:

$ aptitude install minicom    # or whatever you use for package management
$ minicom -s

Go to serial port setup and change your serial device to /dev/ttyS0, assuming that is where your serial port resides. Hit escape, save your setup as default, then exit to minicom's main screen.

On your TiVo, go to your phone setup and then dialing options. Set the dial prefix to ,#211 (hit pause, enter, then 2 1 1). This enables the TiVo's hidden PPP-over-serial feature. Now force your TiVo to make a test call. If all goes well you will see garbage characters appear on your minicom window. Go ahead and close your minicom session (ctrl-A, then Q).

Enabling NAT and pppd

Follow the aforementioned Masquerade HOWTO to get your kernel prepared. On my system I compiled and installed the modules ip_tables, ip_conntrack, ip_nat, ipt_MASQUERADE, iptable_nat, ipt_state, and iptable_filter. Recall that my workstation is at 192.168.1.2. I will assign the unused IP 192.168.10.1 to my ppp0 connection and 192.168.10.2 to the TiVo. As root enter the following:

$ echo 1 > /proc/sys/net/ipv4/ip_forward
$ iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 192.168.1.2
$ iptables -A FORWARD -i ppp0 -j ACCEPT
$ iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

Use iptables -L and iptables -t nat -L to verify your settings. Ensure that you have ppp support in your kernel or as modules; I needed to compile ppp_generic, ppp_async, and crc_ccitt for my system. Next launch the ppp daemon like so:

$ pppd /dev/ttyS0 115200 noauth debug proxyarp nocrtscts \
        nobsdcomp nodeflate persist local lcp-max-configure 28800 \
        192.168.10.1:192.168.10.2
$ tail -f /var/log/syslog &

Your log files should not report any errors. Now when the TiVo attempts to call out you should see the message:

Apr  2 19:26:14 localhost pppd[8836]: sent [LCP ConfReq id=0x1    ]
 ( . . . )
Apr  2 19:28:14 localhost pppd[8836]: Cannot determine ethernet address for proxy ARP
Apr  2 19:28:14 localhost pppd[8836]: local  IP address 192.168.10.1
Apr  2 19:28:14 localhost pppd[8836]: remote IP address 192.168.10.2

Congratulations! Your TiVo is now connected.

Jason Tang / tang@jtang.org