rt2mei - Installation for the Linksys NSLU2

Before You Install
If you already have unslung to hard drive and installed PHP, Puppy and ntpclient then you can move straight to the next section.
You must have a USB hard drive for your NSLU2. It doesn't have to have a large capacity but it should be quiet or it will annoy you. I believe that it is possible to unsling to a USB flash disk but I cannot help you with this.
You must install Unslung 5.5 and unsling to hard disk. Follow the instructions in the README to the letter. Make sure that you also read this first.
Once you have re-flashed your firmware and unslung to hard drive you are ready to install a couple of packages. Note also that your NSLU2 has now become what is affectionately known as a SLUG, and that is what I shall refer to it as from now on.
On the Administration->LAN page of the web interface, ensure that the Gateway and DNS Servers are correctly set up to give internet access.
Enable telnet and then login as root, as per the instructions in the README.
Test your internet connection by typing in the following
ping google.com
If your internet connection is good then you will get no timeout messages. You should now type the following commands
ipkg update
ipkg install php
ipkg install puppy
ipkg install ntpclient
ipkg install ftpd-topfield
Install And Run rt2mei
Read the FAQ below.
Connect your Toppy to the second USB port on the slug and bring it out of Standby.
Enable telnet and then login as root, as per the instructions in the README.
Create a directory called rt2mei off the DISK 1 share (can be accessed as /public/rt2mei via telnet) and unzip the downloaded file to it (if you choose a different directory then substitute that in these instructions).
At the slug´s shell prompt type the following:
chmod 755 /public/rt2mei/rt2mei
Edit the rt2mei configuration file (/public/rt2mei/rt2mei.cfg) in a text editor such as vi (see to How to Configure rt2mei) so that the correct EPG data for you is downloaded. This will vary according to region and taste.
Test that the EPG data can be grabbed and the output files created by typing the following at the slug·s shell prompt
php /public/rt2mei/rt2mei.php
There should be no error messages given and when the script finishes /public/rt2mei/MyStuff.mei should exist.
If this is the case then ensure that the Toppy is not Off or in Standby and type the following at the slug·s shell prompt
/public/rt2mei/rt2mei
Again there should be no error messages given. The MyStuff.mei file should have been written to the \ProgramFiles folder on your Toppy. The rt2mei.mcl file should have been written to the \ProgramFiles\Settings\MyStuff\FavLists folder on your Toppy.
Making the Slug Feed the Toppy
Now that you have tested that the system works, it is time to make it do it automatically for you every day.
The rt2mei shell script has been written to be 'fault tolerant'. This means that it will first keep trying to grab the data from the Radio Times website until it has succeeded. Once it has all the data and has made the MyStuff.mei file it will keep trying to copy it to the Toppy until it succeeds. Only once it has succeeded in doing all this will it terminate.
We can now instruct rt2mei to reject RT data if it is old. This means that it will wait until new data appears on the RT website before grabbing it and sending it to the Toppy.
Empirical tests have shown that the data on the Radio Times website is updated at approximately 0700 hrs. This information is useful to help us set our cron job and possibly a wake up timer on the Toppy.
To make rt2mei run shortly after 0700 hrs every day and wait until the RT website has posted new data, you should add the following line to the end of /etc/crontab
5 7 * * * root /public/rt2mei/rt2mei -new >/public/rt2mei/rt2mei.log
Note the use of the -new option to ensure that it waits until the RT website has been updated with today's EPG data files.
Now at 0705 hrs every day the rt2mei script will run ... or will it?
Unfortunately the clock on the Slug only aspires to keep time. To overcome this you will have to setup the ntpclient. This webpage tells you how to do it. You will probably have to experiment a bit. My cron job runs every 20 minutes and connects to uk.pool.ntp.org
FAQ
Can I install rt2mei in a different folder to the one mentioned above?
Yes, of course you can. If you use the rt2mei script then remember to change paths in it.
Can the MyStuff.mei and rt2mei.mcl files be written to a different folder?
Yes, of course. Just add -o <path to folder> on the end of the line that invokes the script in the batch file. For example:
php /usr/home/rt2mei/rt2mei.php -- -o /usr/home/mei
Remember to put the '--' before any options.
NOTE: This is not applicable if you are using the rt2mei shell script.
What other options exist for rt2mei?
The options are explained here.
How can I link my NSLU2 wirelessly to my network?
If you already have a wireless router elsewhere in the house then consider one of these. Please note that I have not tried any of them so I cannot vouch for their operation.
How can I link my NSLU2 to my wired network?
If you already have a wired router with a free port elsewhere in the house then consider one of these. Please note that I have not tried them so I cannot vouch for their operation. A long CAT5 cable works well though :)

|