Just getting the TiVo to run PPP over its serial port is not quite enough—you need your PC to accept the call and route it to the Internet.
PPP requires two computers for the communication to work, hence the Point-to-Point moniker. We've already set TiVo up [Hack #47] as the initiating end. Now we need to get the PC to answer the call, as it were, on the receiving end and route data between TiVo and the Internet.
Assuming you already have a PC with Internet access over some sort of broadband connection (cable modem, DSL, dedicated connection, etc.), and that computer has a free serial port, you're just about there. All that's left is a little configuration.
Windows XP already has all the software it needs to make this magic happen. We are, however, going to have to coerce it to interoperate properly with TiVo.
|
Just hooking the two machines—your TiVo and PC—together doesn't magically set up a PPP connection between the two. The base question is, how are these two computers going to know when to start talking to each other? Windows egotistically assumes that anybody connecting to it is going to say CLIENT over the serial line to get its attention. TiVo has no intention of doing so, instead preferring to send a ~ (tilde) to announce itself. One of the two is going to have to alter its expectations, and Windows is the pushover, so we'll make the appropriate adjustments there.
Launch Notepad, the simple Windows text editor, and open c:\windows\inf\mdmhayers.inf for editing. Scroll down (quite a way) until you run into a section that looks something like this:
[M2700Reg] ; Null-Modem HKR, Init, 1,, "None" HKR, Init, 2,, "NoResponse" HKR, Monitor, 1,, "None" HKR, Answer, 1,, "CLIENTSERVER" HKR, Answer, 2,, "NoResponse" HKR, Settings, DialPrefix,, "CLIENT" HKR,, Properties, 1, 00,00,00,00, 00,00,00,00, 00,00,00,00, 00,00,00,00,00,00,00,00, 30,00,00,00, 00,c2,01,00, 00,c2,01,00 HKR, Responses, "CLIENT", 1, 08, 00, 00, 00, 00, 00, 00,00,00,00 ; Server side - the client is requesting a connection HKR, Responses, "<h00>CLIENT", 1, 08, 00, 00, 00, 00, 00, 00,00,00,00 ; Server side - the client is requesting a connection HKR, Responses, "CLIENTSERVER", 1, 02, 00, 00, 00, 00, 00, 00,00,00,00 ; Client side - the server has acknowledged
Slip the following between the last two lines in the block:
HKR, Responses, "~", 1, 08, 00, 00, 00, 00, 00, 00,00,00,00 ; Server side - the client is requesting a connection HKR, Responses, "<h00>~", 1, 08, 00, 00, 00, 00, 00, 00,00,00,00 ; Server side - the client is requesting a connection
It should now look like this (inserted lines are called out in bold):
[M2700Reg] ; Null-Modem HKR, Init, 1,, "None" HKR, Init, 2,, "NoResponse" HKR, Monitor, 1,, "None" HKR, Answer, 1,, "CLIENTSERVER" HKR, Answer, 2,, "NoResponse" HKR, Settings, DialPrefix,, "CLIENT" HKR,, Properties, 1, 00,00,00,00, 00,00,00,00, 00,00,00,00, 00,00,00,00,00,00,00,00, 30,00,00,00, 00,c2,01,00, 00,c2,01,00 HKR, Responses, "CLIENT", 1, 08, 00, 00, 00, 00, 00, 00,00,00,00 ; Server side - the client is requesting a connection HKR, Responses, "<h00>CLIENT", 1, 08, 00, 00, 00, 00, 00, 00,00,00,00 ; Server side - the client is requesting a connection HKR, Responses, "~", 1, 08, 00, 00, 00, 00, 00, 00,00,00,00 ; Server side - the client is requesting a connection HKR, Responses, "<h00>~", 1, 08, 00, 00, 00, 00, 00, 00,00,00,00 ; Server side - the client is requesting a connection HKR, Responses, "CLIENTSERVER", 1, 02, 00, 00, 00, 00, 00, 00,00,00,00 ; Client side - the server has acknowledged
Save the changed file, and you have convinced your Windows machine to expect the ~ (tilde) character TiVo is planning to send.
Next, launch Windows XP's Control Panel, and from there the Phone and Modem Options. Select the Modems tab and click the Add button to launch the Add Hardware Wizard. You'll be asked whether you wish the Wizard to detect your modem, as shown in Figure 4-1.
Since we're not actually using a modem, check the "Don't detect my modem; I will select it from a list" checkbox and click the Next button to move on.
Your computer should chug away awhile as it compiles a list of modems from which to make your selection. When it's good and ready, the wizard will show you a list of all the modems it knows (see Figure 4-2). Under Manufacturer, select "Standard Modem Types," and select "Communications cable between two computers"—that's our null modem connection—under Models. Click Next.
You'll be prompted for a COM (read: serial) port, as shown in Figure 4-3. To the question "On which ports do you want to install it?," choose "Selected ports." Then highlight the COM port to which you wired your TiVo. Click Next, and Windows will set up the connection. It should report that all went well, leaving you to click the Finish button to leave the Wizard.
The Wizard's only capable of taking care of the broad strokes; you still need to tweak and fine-tune the connection a little. Back at Phone and Modem Options, select the new "Communications cable between two computers" connection the Wizard created and click Properties to get to all its fine-tuning knobs. Select the Modem (see Figure 4-4) tab, where you'll need to make sure that the Maximum Port Speed matches the baud rate at which TiVo is set to talk [Hack #47], then click OK.
The modem is now set up, so you can go ahead and click the OK button back at Phone and Modem Options.
With the physical connection configured, you'll now create a network connection. From the Control Panel, select Network Connections. Up comes the Network Connections window, shown in Figure 4-5. In the Network Tasks box in the left column, click "Create a new connection" to bring up the New Connection Wizard. Click Next to begin creating a new network connection.
When asked what type of network connection you want, select "Set up an advanced connection." If you read the small print, you'll see you're offered a direct connection via a serial port, which is precisely what you're trying to do. Select the option and click Next.
A dialog box asks what kind of connection you want—whether the PC is going to be receiving or sending data. Since TiVo is going to want to make an outgoing connection when it needs to make its daily call, select "Accept incoming connections" and click Next.
When asked to choose Devices for Incoming Connections (Figure 4-6), check the "Communications cable between two computers" box. That's the "modem" you just configured. Click Next again.
You're not going to be setting up any kind of Virtual Private Connection (VPN), so tell Windows not to allow VPNs and click—you guessed it!—Next.
The Wizard will ask you what users are allowed to connect. Since your TiVo is only using your PC as a proxy to the Net and won't be needing any kind of user privileges on the PC, just allow the Guest user. Click Next.
Now it's time to set up Networking Software and configure the PPP interface to please TiVo. Select Internet Protocol and click Properties to bring up the Incoming TCP/IP Properties dialog box shown in Figure 4-7.
Your TiVo is expecting to use the serial connection to access your home network and the Internet. To make this possible, check "Allow callers to access my local area network." Don't worry, this isn't opening your PC to just any vagabond on the network; only the TiVo is coming in via that serial cable, nobody else.
If you have a DHCP server on your network—everybody on your home network is being assigned IP addresses by your DSL router or cable modem—then allow for TCP/IP addressing to be done automatically using DHCP by clicking the appropriate radio button. That takes the burden of configuring the TCP/IP connection off your shoulders. If you don't have a DHCP server, just select "Specify TCP/IP addresses" and put in a range of addresses that are not already being used on your network.
Chances are, if you set up your networking as shown in Figure 4-7, you'll be fine. Click OK to close the dialog box. Then click Next and Finish to dispatch the wizard, and you're almost done.
Go back to the Network Connections window, and you should now see a shiny new incoming connection. Right-click on the connection and select Properties to bring up the Incoming Connections Properties. Select the Users tab and check the "Always allow directly connected devices such as palmtop computers to connect without providing a password" checkbox, as shown in Figure 4-8. The TiVo has no notion of a password.
Last step—I promise. Select the General tab in the Incoming Connections Properties dialog, select "Communications cable," and click the Properties button to bring up the dialog box shown in Figure 4-9. Turn off flow control (select "None"), as TiVo's serial port does not have the extra lines needed for any kind of hardware flow control, nor does it bother with software flow control.
Click OK and OK again, and you're done. Whew!
While this may be hard for Windows users to believe, Linux configuration for accepting a PPP connection from TiVo is considerably less involved.
Edit your /etc/rc.d/rc.local file, appending:
echo "Enabling IP forwarding." echo 1 > /proc/sys/net/ipv4/ip_forward echo "Setting up TiVo connection" /sbin/ipchains -P forward DENY /sbin/ipchains -A forward -i eth0 192.168.1.2 -j MASQ /usr/sbin/pppd /dev/ttyS0 9600 noauth debug proxyarp nocrtscts nobsdcomp \ nodeflate persist local lcp-max-configure 28800 192.168.1.1:192.168.1.2
Note that this configuration makes a couple of assumptions, both easily changeable. First, we're assuming your Internet-enabled interface is eth0 (bolded); if it's something different, change it as appropriate. Second, we're assuming 9600 baud over serial interface /dev/ttyS0; this should reflect the serial port you chose, and the baud rate should match that of the TiVo side [Hack #47]. We're assigning your Linux box a private IP address of 192.168.1.1 and your TiVo gets 192.168.1.2—at least as far as this interface is concerned.
For further guidance, consult the Home Networking mini-HOWTO (http://www.ibiblio.org/pub/Linux/docs/HOWTO/mini/other-formats/html_single/Home-Network-mini-HOWTO.html), the Linux IP Masquerade HOWTO (http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/IP-Masquerade-HOWTO.html), and the Linux IPCHAINS-HOWTO (http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/IPCHAINS-HOWTO.html).
Now that you've wired up your TiVo to the Internet via your PC, let's make sure that it all works as expected.
Unplug your phone line from your TiVo; you won't be needing that anymore. Get TiVo to make a test call by selecting Make Test Call from Messages & Setup Recorder & Phone Setup Phone Connection on OS 3.x and TiVo Messages & Setup Settings Phone & Network Setup Test connection under OS 4.0 After a few seconds, you should see the usual messages indicating a successful connection; only this time the call's routed over the Internet. TiVo will now use this connection each time it makes its daily call.
After a successful trial at 9,600 baud, take things up a notch or two on both the TiVo and PC ends (they must match to work) and see if you can work your way up to downloading program data at a top speed of 115,200 baud (see Table 4-1 for the associated TiVo dial prefixes).
—"Otto"
Top |