Difference between revisions of "How to use rTorrent"

From WikiDLXTV
Jump to: navigation, search
(Created page with 'rTorrent is a BitTorrent client for the WD TV. It will download torrents any time your WD TV is on, so if you leave it on even when you are not watching TV it will continue down…')
(No difference)

Revision as of 12:07, 12 September 2010

rTorrent is a BitTorrent client for the WD TV. It will download torrents any time your WD TV is on, so if you leave it on even when you are not watching TV it will continue downloading torrents in the background.

Installation

As of firmware version 4.2.1, rTorrent is included in the base package. However, you will need to do a few things in order to configure it properly.

Prepare the Torrent Drive

  • On the hard drive that you will store your torrents on, create an empty file named '.mnt' in the root of the drive.
  • Also in the root of that drive, create a folder called "rtorrent".
  • Reboot your WD TV.
  • The drive should now be mounted in the directory /tmp/mnt with a name like B0BE-456Y77 - it will be a random combination of capital letters and numbers. Find out what this is by either ssh'ing or telneting into your box and looking for it under /tmp/mnt, or from the file manager in webend look for it in /tmp/mnt. If you have multiple drives connected to your computer, you will see multiple mounted directories. In this case, you will need to look inside each of those folders to determine which one is your hard drive.
  • Save this information form the next step.
  • telnet or ssh into your WD TV and set the permissions on the rtorrent folder so that it is writable. Do this using the command below. In this example, the drive was mounted at /tmp/mnt/ABC123-XYZ.

chmod 777 /tmp/mnt/ABC123-XYZ


Editing your configuration

On the USB key that you used to install b-rad's firmware, edit the file S00-custom-options. Make the following changes:

  • Uncomment this line:

config_tool -c RTORRENT=ON

  • Uncomment this line:

config_tool -c RTORRENT_DIR=/tmp/mnt/123ed956-1256-4825-9e79-86fc1e0febaa/

  • Change everything after /tmp/mnt to the name of the folder that your drive is mounted on (using the folder name you found in the last step). For example:

config_tool -c RTORRENT_DIR=/tmp/mnt/ABC123-XYZ


Prepare The Router

If your WD TV is behind a router (which is the case in most home networks), you may need to make some changes to your router configuration in order to get rTorrent working properly. If you find that torrents aren't downloading or are downloading very slowly, follow these steps.

Each router is configured differently, but most have a web interface you can log into. Check the manual for your router for further details.

Set the WD TV Network Settings

While it is easiest to configure your WDTV to ask the router for an IP Address, this causes problems when trying to download torrents. Consequently, you will need to assign a static IP address to your WD TV as follows. This isn't as scary as it sounds, and if you ever have problems you can always just switch your router back to getting its IP address automatically.

1) Ensure that your WD has a static IP address on your network. You can do this on your WD TV by going to Settings > Network Settings and manually setting the values there. You will need to choose "manual" instead of "automatic".

  • IP Address: You can typically assign your device any IP address you want on your subdomain

as long as it doesn't conflict with any other IP addresses on your network. Your router probably has a range that it reserves for dynamic IP addresses, which you can find in your router configuration. Ensure that you do not pick an IP address in this range. This may be listed under "DHCP range". For example, if your DHCP range is set from 10.0.0.100 to 10.0.0.200, you can safely choose the address 10.0.0.3. Do not use any address ending in .1, as this is the gateway address (see below).

  • Subnet Mask: In most cases this will be 255.255.255.0. Check your router configuration

if you are unsure.

  • Gateway: If your IP address is AAA.BBB.CCC.DDD, then your gateway is usually

AAA.BBB.CCC.1. For example, if you assign an IP address of 10.0.0.3 to the WD TV, the router is usually 10.0.0.1.

  • DNS: You should be able to get this from your internet provider. When in doubt,

I use AT&T's DNS (206.13.28.12), just because it's one of the few IP addresses I know off the top of my head :)

Configure The Router

Set up your router to send traffic to rTorrent on the ports that it expects. This is done using something called "port forwarding". Port forwarding tells your router that when it receives traffic on a particular port (say 38000), it should send that traffic to your WD TV.

While the method of configuration varies from router to router, you want to indicate that traffic on the ports of interest are forwarded to the IP address you assigned to the WD TV in step #1 above.

I suggest forwarding at least the following: HTTP: port 80 (so you can get to the web interface HTTPS: port 443 (for secure web traffic) FTP: port 21 SSH: port 22

Speed Up Torrent Downloads

Many ISPs now slow down torrent traffic to the point of unusability. Specifically, once they see torrent files start to download on your computer, they will drop that connection.

If rTorrent seems to be sending uploads quickly but downloads are very slow, then this is likely the issue. The way to get around this is to encrypt your torrent traffic using the following steps.

  • Log into the WDTV web frontend. Click the "rtorrent" link in the left-hand navigation. Click "stop rtorrent".
  • On your WDTV, edit the file /conf/rtorrent.rc. You can do this either by logging into the WDTV using SSH or Telnet and editing using vi or Nano, or you can download the file to your computer from the "file manager" in the web frontend, make the changes using a text editor, and re-uploading the file.
  • Add the following line to the file:

encryption = allow_incoming,try_outgoing,require,require_RC4,enable_retry

  • In the web frontend, click on the "rtorrent" link again. Click "start rtorrent".
  • It may take a while for rTorrent to re-check all of your existing downloads (you can tell this is the case if the status of the file in rtorrent is "checking"). After this is done, though, you should see a 10x to 100x improvement in download speeds.