Making a Swedish TiVo - Part 2
Written by Stephen Baines   
Saturday, 04 April 2009

In Part 1 we went over collecting the tools together, and then gathering the XMLTV data.

In this part we will create the channels and control the Canal Digital set top box.

If you can't add channels to the TiVo there isn't much point in going any further with the data. And if you can't control your Set Top Box, again there is very little point in going futher.

Adding a fake time server

For guided setups, guide loading, etc, you need a fake time server.

Upload dumbntpd to your /var/hack directory in binary.

Telnet to your tivo, and change to the /var/hack directory. Type the following.

chmod +x dumbntpd

Using Steve Conrad's guides on modifying files on the TiVo, CAREFULLY edit the  /etc/rc.d/rc.net file

To the end, add the following:

/sbin/ifconfig lo up
/var/hack/dumbntpd

Double double check that you do this right. If you do this wrong, when you reboot the TiVo it won't start!

Now set the "fake time" on your TiVo

The time at the moment in Sweden is UTC+2 as it's summertime. The clock has to be set to UTC-1 for some strange reason I've yet to fathom. So if the time was 14:30 on 5th April 2009, I'd use the command

settime 20090405113000

settime -rtc

 NOTE: The hour is set to the hour -3 in the summertime and NOT the actual time. Bizarre, yes... How long did it take me to fathom that one out? A long time.

Preparing the TiVo for "new" channels

You need to wipe the TiVo completely. To do this you need to upload the clearanddelete.tcl script to your /var/hack directory in binary. If you haven't already got a /var/hack directory, make it with the following command.

mkdir /var/hack

Once it's uploaded telnet to your TiVo and type the following

tivosh /var/hack/clearanddelete.tcl

It will then give you instructions on what to do. You want a full clear and delete. So type

tivosh /var/hack/clearanddelete.tcl 1

It will tell you if it's ok and tell you you need to reboot the TiVo. Type

reboot

And the TiVo will reboot. It will take anything from 20 minutes to an hour to completely wipe the TiVo. If it was used with Sky Digital previously, it will take an hour. If it was a fresh install, it'll be 10-20 minutes. Once it's restarted, it will go into Guided Setup. DO NOT COMPLETE GUIDED SETUP!

Now telnet to your TiVo again, preferably using PuTTY.

Create a /var/hack/guide directory

mkdir /var/hack/guide

And upload the following scripts in binary to it

  • add-av.tcl
  • add-whole-channel.tcl
  • dbload25.tcl
  • dbset
  • fixup25.tcl
  • force_index.tcl
  • timezoneadjust.tcl
  • setcodes-3pm.tcl

You need to remove the existing source, but to do this you need to find out what it is first.

tivosh

mls /

It will print out a load of information. You are looking for a line like this starting with Setup.:

    Setup                     tyDb     1209911  04/02/09 14:32   4248

 Note the number I've put in bold. This is the number you need. It will be different on every TiVo.

now type

dumpobj 1209911

 Change the number to whatever number you found above. You will get a screen full of stuff. You are looking for a line starting with Source

  Source         = 1209911/14

 You may have more than one source listed. That's fine and normal. Note the full number. Type

exit

If you don't have a source, you can skip down to the section about creating a new source.

Edit removesource.tcl and put the channel numbers in as explained in the file. Then upload it to your /var/hack/guide directory using FTP in binary.

Now in your telnet session, change to the /var/hack/guide directory and type the following

tivosh removesource.tcl

You want it to say that the source has been removed.

Creating the new source

If it has all gone ok, type

tivosh add-av.tcl

It will now add a source that YOU have full control over.

Do the 

tivosh

mls /

dumpobj xxxxxx

As above, and make a note of your new source number.

Add the new IR codes

Change to the /var/hack/guide directory if you are not already there.

Add the IR control.

tivosh
source setcodes-3pm.tcl

setcodes

exit

 I've got the standard Canal Digital STB .  If you've got something else, you need to obtain the remote control codes with a Phillips Pronto and use the Pronto Converter to turn it into a script you can use.

Adding the New Channels

It's now time to create the actual channels. Make sure you know your new source number, as shown how on the previous page!

The next bit is easier to prepare in Excel or OpenOffice first, and then copy and paste into your terminal window. You can do it all by hand, but it's hard work.

Make sure you know what channel number each channel is on. You can safely ignore any channels you are not actually interested in or don't receive.

You are going to create a spreadsheet like this.

A B C D E F G H I J K L M
Command Space TiVo Number Space Channel Number Space Call Sign Space Quote Channel Name Quote Space Source Number
tivosh add-whole-channel.tcl  7300101   1   CANALFIRST  " Canal First 1209911/14
tivosh add-whole-channel.tcl  7300102   2   CANALCOMDY  " Canal Comedy 1209911/14
tivosh add-whole-channel.tcl  7300103   3   CANALDRAMA  " Canal Drama 1209911/14
tivosh add-whole-channel.tcl  7300104   4   CANALHITS  " Canal Hits 1209911/14
tivosh add-whole-channel.tcl  7300105   5   CANALACTN  " Canal Action 1209911/14

Change the source number to your source number, and the Channel Number to your channel numbers for your channels.

Call Signs should not have spaces in. They should be ideally less than 10 characters.

Channel Names can be longer. Note column I and K. I contains a space followed by a quote. K a quote followed by a space. Colums C E G all contain a space.

The TiVo number you choose. Usually, people use numbers in the 7300000 range. DON'T repeat numbers. Ideally, have a link between the TiVo number and the Channel Number.

Repeat for all the channels you are interested in.

Save your spreadsheet.

Copy all the Tivosh lines to your clipboard and into notepad or similar. It will look something like this:

tivosh add-whole-channel.tcl             7300101         1         CANALFIRST     "    Canal First    "     1209911/14
tivosh add-whole-channel.tcl             7300102         2         CANALCOMDY     "    Canal Comedy    "     1209911/14
tivosh add-whole-channel.tcl             7300103         3         CANALDRAMA     "    Canal Drama    "     1209911/14
tivosh add-whole-channel.tcl             7300104         4         CANALHITS     "    Canal Hits    "     1209911/14
tivosh add-whole-channel.tcl             7300105         5         CANALACTN     "    Canal Action    "     1209911/14

 Note all the extra tabs! Get rid of the tabs, but NOT the spaces. It will then look like this:

tivosh add-whole-channel.tcl 7300101 1 CANALFIRST "Canal First" 1209911/14
tivosh add-whole-channel.tcl 7300102 2 CANALCOMDY "Canal Comedy" 1209911/14
tivosh add-whole-channel.tcl 7300103 3 CANALDRAMA "Canal Drama" 1209911/14
tivosh add-whole-channel.tcl 7300104 4 CANALHITS "Canal Hits" 1209911/14
tivosh add-whole-channel.tcl 7300105 5 CANALACTN "Canal Action" 1209911/14

Telnet to your TiVo and change to the /var/hack/guide directory again.

Copy the lines to your telnet session one line at a time. You can paste multiple lines, but NEVER more than about 10, otherwise you will lock up your TiVo!

You've now manually added new channels to your TiVo.

Type

tivosh timezoneadjust.tcl

tivosh fixup25.tcl
touch /var/timestamp

reboot

If you don't do this, when you reboot you will still be in guided setup. It also gets the time zone set in the right way.

Test Set Top Box Control

You should now be at a "standard" TiVo welcome page.

Go to "Messages and Setup" and change the set top box control to Pace 20000. Test Fast Medium and Slow and see which works best for you.

Go to Live TV and change channels, make sure your TiVo can control your set top box.

Congrats! You've got the next stage of your Swedish TiVo under way!

 In the next step, we're going to prepare the data for the final push!

 

 

 

 

 

Last Updated ( Tuesday, 07 April 2009 )