Installing BitTorrent client Transmission on D-Link DNS-315

This text was made from instruction mentioned in the 1st post of conference Обсуждение NAS D-Link DNS-325 (thanks Panchenko for his work). This instruction edited for NAS D-Link DNS-315 that different from DNS-325 in central processing unit (CPU). Familiarity with Panchenko's instruction also will be good because something themes described more detailed in it and something—differently.

Necessary files

IMPORTANT!

To work with command line on NAS you'll need some program that works with telnet or SSH protocols. You can use PuTTY or standard Windows utility telnet.

Installation

  1. Copy files into root dir of Volume_1 (version numbers may be vary):
  2. Reboot NAS. It must happen some changes when booting:
  3. Connect to NAS with telnet protocol. For example, using command telnet <IP_address_NAS>.
  4. In telnet console install file fun_plug.local using commands (note, <Tab> key appends file name with appropriate one):

    cd /mnt/HD/HD_a2
    mv fun_plug.local /ffp/etc
    chmod a+x /ffp/etc/fun_plug.local

  5. Reboot NAS.
  6. Install additional packages and Transmission itself using commands:

    cd /mnt/HD/HD_a2
    funpkg -i uClibc-0.9.33_git-arm-1.txz
    funpkg -i curl-7.21.4-arm-1.txz
    funpkg -i Transmission-2.83-arm-1.txz

  7. Change permissions of Transmission control script in autorun directory:

    chmod a+x /ffp/start/transmission.sh

  8. Change permissions of device file /dev/urandom because Transmission daemon that started by user nobody uses it but nobody haven't rights to read this file:

    chmod a+r /dev/urandom

    Without that Transmission will permanently write error messages about problems with random numbers generation into its log, and log will be filled up with lines like this:

    tr_crypto error:24064064:random number generator:SSLEAY_RAND_BYTES:PRNG not seeded (crypto.c:113):

    It's possible that the file /dev/urandom created on each boot. So it is good idea to add nobody's permissions adding into fun_plug that runs every NAS boot. For example:

    # create /ffp link
    echo "ln -snf $FFP_PATH /ffp"
    ln -snf $FFP_PATH /ffp
    
    # *** Add rights for others to urandom device
    echo "chmod a+r /dev/urandom"
    chmod a+r /dev/urandom
    

  9. Reboot NAS. There must be new process transmission-daemon. You can see it in the NAS WEB interface (see above) or in the telnet console using command top. Aside from this there must be new hidden directory .transmission-daemon in the root of Volume_1 that contains Transmission configuration file—settings.json.
  10. You can change some settings Transmission:
    1. Stop Transmission:

      /ffp/start/transmission.sh stop

      Wait for a while so Transmission can shutdown cleanly.

    2. Change settings by editing file settings.json. Basically, it need for daemon's remote access control. There are some methods to do it:
      • Using vi in telnet as written in the Panchenko's instruction and running it by

        vi /mnt/HD/HD_a2/.transmission-daemon/settings.json

      • By LAN using any plain text editor that can open hidden files and understand and can save files with UNIX end of line format.

        Configuration file can be found on Volume_1 and has name .transmission-daemon\settings.json. Directory .transmission-daemon has attribute “hidden” set.

      Some parameters (see also Transmission Support and Development):

      Parameter Default value Description (may be some inaccuracy)
      message-level 2 Verbosity of transmission messages. 0 = None, 1 = Error, 2 = Info, 3 = Debug
      preallocation 1 Set disk preallocation method. 0 = Off, 1 = Fast, 2 = Full (slower but reduces disk fragmentation)
      rpc-enabled true Permit access from LAN (true) or deny (false)
      rpc-port 9091 Port number for access to Transmission WEB interface or control daemon by third-party program. For example, if NAS resides at address 192.168.1.196 and value of port equals 9091, you need type http://192.168.1.196:9091 in your browser address bar
      rpc-authentication-required false Use login/password pair (true) or no (false) for remote access
      rpc-username empty string User name (login) for remote access
      rpc-password password hash Password for remote access. You enter it as plain text. After start Transmission will change it to hash sum
      rpc-whitelist-enabled true Use (true) on do not use (false) “whitelist”
      rpc-whitelist 127.0.0.1 Comma-separated list of IP addresses that permitted remote access when rpc-whitelist-enabled = true. To permit access from computers that address starts with 192.168.1. add this as “127.0.0.1,192.168.1.*
      umask 18 Sets transmission’s file mode creation mask. See the umask(2) manpage for more information. Users who want their saved torrents to be world-writable may want to set this value to 0. Bear in mind that the json markup language only accepts numbers in base 10, so the standard umask(2) octal notation “022” is written in settings.json as 18.
    3. Start Transmission:

      /ffp/start/transmission.sh start

You can control Transmission daemon using WEB interface at URL: http://<IP_address_NAS>:<port> or you can use third-party tool. For example, Transmission Remote GUI.

Updating

Partially quoted text found at DSM-G600, DNS-3xx and NSA-220 Hack Forum. Original updated by KyleK (2013-09-24 21:32:34).

Latest version: 2.83.

Transmission 2.83 uses new libevent-2.0, so you can receive the error:

can't load library 'libevent-2.0.so.5'

Download library from http://downloads.zyxel.nas-central.org/.../0.7/arm/libevent-2.0.16-arm-0.txz and install it with command

funpkg -i libevent-2.0.16-arm-0.txz

Source

WARNING: It was observed that Transmission 2.83 hangs up when adding new torrent for downloading. (now observed on rutracker.org only). It is recommended to not install this version or downgrade to 2.82 using same procedure as below.

To update:

  1. Download Transmission 2.83 (ffp-0.7-arm).
  2. Copy Transmission-2.83-arm-1.txz into root dir of Volume_1.
  3. Run commands:

    /ffp/start/transmission.sh stop

    (wait for a while so Transmission can shutdown cleanly—you can admire by work of top command)

    funpkg -u Transmission-2.83-arm-1.txz
    /ffp/start/transmission.sh start

  4. Done!

Incomplete history of changes of Transmission

Изменения