Updated: July 11, 2002
Author: David Beckemeyer
Works with Tivo software Releases 1.3, 2.0, 2.5, and 3.0!
This document provides technical information for a PPP/Ethernet Gateway for Tivo. See the description of the gateway for general information about the device.
I had planned to do a step-by-step FAQ or HOWTO, and I may still get around to that someday, but enough people have asked me about this project that I have decided to post this rather limited documentation, such as it is, in the mean time, along with references to additional sources of related information.
This document assumes you are somewhat familiar with TiVo internals and TiVo hacking, as it is called. A few good places to start are the TiVO Hack FAQ and the AVS Underground Forum. This document also assumes familiarity with Linux and PPP, as well as building and installing software from source code. If you wish to build a device like the microcontroller gateway I'm using, you will also need to have some experience with soldering and basic knowledge of electronics.
Overview
This document briefly describes how my Tivo Gateway works and provides links
to the source code and other resources to allow others to build a similar
gateway, either stand-alone or using a generic Linux PC.
The overview of how it works is that codes sent from the TiVo software (myworld) are captured by a program and forwarded to a Linux/UNIX system via the PPP link (using IP/UDP) which are then forwarded on to the DSS receiver over a spare serial port on the UNIX/Linux system. I use a Linux microcontroller-based system, but it should work with any UNIX/Linux/BSD system. In theory this could work with an NT/Windows box or anything supporting PPP and sockets, but I don't know how difficult it would be to port the code to non-UNIX platforms.
Getting PPP Working
The first step is to get PPP working over the DSS port. This is best
described in the following document:
TiVo Updating Over Dedicated Internet HOWTO. Refer to that
document for getting PPP up and running over the DSS port.
Note for 3.0: Instructions below still apply for version 3.0, but the above TiVo Updating Over Dedicated Internet HOWTO document has not been updated to reflect the changes for getting PPP working under version 3.0 of the TiVo software. Check the TiVo Community Forum for more information.
The DSS Control Hack
Once you have PPP working over /dev/ttyS3 (/dev/cua3) connected to
a Linux system, we now must take a spare serial port on the Linux system
and connect it to the DSS
receiver serial port. This may require some cable tweaking for specific
receivers. In my case I have a Sony and this page helped:
http://www.isd.net/mevenmo/sonydsscodes.html
To test the connection, use tip or equivalent set to 9600,8n1 and hit Return to confirm that you get a binary character response from the receiver. This distribution includes a short program to confirm that you can change channels on your DSS over over the serial port. The included README file contains more information.
Now to the fun part. The TiVo software developers did a good job with the DSS
interface, doing some "abstraction" by talking via an "alias" called
/dev/ttyDSS which normally is the same as /dev/ttyS3. This made it easy to
redirect the DSS interaction, by replacing /dev/ttyDSS. What I did is point it
at a PTY
/dev/ttyq0 with:
mv /dev/ttyDSS /dev/ttyDSS.orig
mknod /dev/ttyDSS c 3 16
I wrote a small program for the TiVo that listens on the master side of the PTY
and forwards to a UDP port on a target host (the Linux system connected to the
DSS). This TiVo-side program is started as follows:
dsspty 192.168.2.4 16400 /dev/ptyq0 &
where 192.168.2.4 is the IP address of the Linux host connected to the DSS serial port (the Gateway) and 16400 is the UDP port the server is listening on. The dsspty program also simultaneously listens on port n+1 (e.g. 16401 in this case) for responses from the DSS, which it forwards back to the myworld program via the PTY.
On the Linux system (Gateway), another small server program is used
to forward anything
received on the UDP port to the DSS via the serial port and to forward anything
received from
the DSS on the serial port back to the TiVo on the n+1 UDP port. It is started
like this:
dssserv 192.168.2.5 16400 /dev/ttyS2 &
Where 192.168.2.5 is the IP address of the TiVo, 16400 is the port number which needs to be the same as that used with the above dsspty program, and /dev/ttyS2 is the serial port connected to the DSS (may have to use a /dev/cuaN device).
In theory, this hack should work with any receiver that has a serial port and is normally controllable by TiVo because it is a "dumb" forwarder; it simply passes anything it sees back and forth between TiVo (myworld) and the DSS receiver.
Download
The code isn't polished, but it's been working for me and a few others
for several months. The Tivo binaries and these instructions have been
shown to work on Tivo software 1.3, 2.0, 2.5, and 3.0.
On the TiVo side, I offer source and a pre-built
statically linked binary. On the UNIX/Linux side, I'm only providing
sources
and you'll have to build it for your specific UNIX/Linux system, but it should
compile with no problems on most systems (Linux/BSD/Solaris).
You can find the software at the following url: http://www.bdt.com/david/tivo/dssppp.tar.gz . Here's the README if you wish to review it before downloading.
The Microcontroller Gateway Device
The software described here should work on most Linux/UNIX platforms
but I wanted a smaller stand-alone device rather than a full PC.
The device that I'm using as the PPP/Ethernet Gateway is packaged
in a 3" x 5" x 5" metal box. It has two serial ports and an
Ethernet port and runs a microcontroller version of Linux called
uClinux.
I built it myself, but using mostly pre-made components. The major parts are the uCsimm and uCgardner host board from www.rt-control.com
I did a modification to add a serial port to the uCsimm. Schematics and the driver for which, along with a number of photos of the uCsimm and components, are available at this url: http://www.bdt.com/david/ucsimm/ .
Then I put it all in a metal case from Radio Shack with a wall wart AC adapter for power.
I used the uCsimm because it was handy and easier to prototype. This is a little pricy (overkill) for this application, but it was there and I didn't want to hack a lot of PIC code or 8-bit stuff until I proved the concept, especially since I only needed one (or two).
Enjoy!