How to install transmission for Optware on Asus RT-AC68U router

32
2
i
Rate This


This method can be used for other Asus routers, but I tested it only on my Asus RT-AC68U.

Prerequisites:

  • [optional, but highly recommended] Custom firmware to get extended router functionality and better stability (I recommend asuswrt-merlin);
    • [optional] jffs partition enabled – if you want to access transmission from WAN using custom firewall scripts or to mount a network shared drive to router;
  • Optware installed on your router. Entware is not yet compatible with Asus RT-AC68U. Link for New Generation Optware method at the end of the article;
  • Be sure Optware is installed on a linux partition system (check if your router supports ext4. If not, ext3 or ext2 can be used. The Asus RT-AC68U supports ext4). NTFS and FAT32 are unstable for Optware. I used MiniTool Partition Wizard to format the drive before connecting it to the router.
  • Be sure Download Master is uninstalled (it is incompatible with transmission);
  • libiconv library (converts between character encodings) installed on Optware;
  • nano text editor installed on Optware;
  • You need to enable SSH connection to your router;
  • PuTTY installed on your computer;
  • [optional] Transmission Remote GUI for PC; Torrnado for Android.
  • [optional, but recommended] SWAP activated on the router.

Installing transmission

To install transmission, you need to login to router with PuTTY terminal. Use the username and password required to login to the router’s web interface and run each of the following lines.

1
2
3
4
5
6
7
8
9
10
11
12
13
ipkg update
ipkg upgrade
ipkg install libiconv
ipkg install nano
ipkg install transmission
wget -c -O /opt/etc/init.d/S95transmission http://tinyurl.com/jd4ovhy
chmod 777 /opt/etc/init.d/S95transmission
/opt/etc/init.d/S95transmission start
/opt/etc/init.d/S95transmission stop
chmod 777 /opt/etc/transmission-daemon/settings.json
rm -r /opt/etc/transmission-daemon/settings.json
wget -c -O /opt/etc/transmission-daemon/settings.json http://tinyurl.com/hbce2xl
app_set_enabled.sh transmission yes

If you receive a 5xx error on wget, it might be because of high traffic on the Dropbox server which hosts the files and you have to try again later or try using the Google cache. If you received no error, transmission should be available at your router’s LAN IP on port 9091 (usualy 192.168.1.1:9091 or router.asus.com:9091). The default username and password are admin / password.

Now you have to stop the transmission-daemon and edit the settings file to customize it to fit your needs (don’t forget to change the default username and password). If you don’t stop the daemon first, the settings will not be saved.

1
2
/opt/etc/init.d/S95transmission stop
nano /opt/etc/transmission-daemon/settings.json

For a better understanding of the parameters, check the official transmission documentation (old version of same file here). Now start transmission-daemon again and you can use Transmission Remote GUI / Torrnado to connect to it if you want more features than what the web interface offers. Both apps offer a better way to change the main settings, manage the downloads and they can register to be the default applications for .torrent files and magnet links.

1
/opt/etc/init.d/S95transmission start

IMPORTANT ISSUE I had with transmission running on Optware

The partition I use to download files to has a label, so instead of using /tmp/mnt/sda1/Torrents I had to use /tmp/mnt/Downloads/Torrents, where “Downloads” is the label of my partition. In my case, if I don’t include the label, Transmission would use /root/tmp as download path which has only a couple of MB free on the disk and transmission-daemon would crash when downloading a torrent.

To check how your drive was mounted and if it has to be used with a label or not, run the following command in PuTTY terminal:

1
ls -l /tmp/mnt

Download torrents on NAS drives

If you don’t want to download torrents on a disk mounted on the USB port of your router, here are the steps to download on a network shared drive (ex: from a NAS)

1
2
3
4
5
6
#create a directory where you will mount the network shared drive
mkdir /mnt/sda1/nasdrive
chmod 777 /mnt/sda1/nasdrive
 
#mount drive
mount \\\\192.168.10.1\\MyNetworkSharedDrive /mnt/sda1/nasdrive -t cifs -o "username=shareUser,password=sharePassword"

Replace “\\\\192.168.10.1\\MyNetworkSharedDrive” with the path of your network drive you want to mount on the router.
Backslashes should be escaped or else the shell will misinterpret them.
The effect of the mount command is not persisting after a reboot.

To automatically mount the shared drive on your router after reboot, follow these steps:

  • Activate jffs on your router. You might have to reboot a couple of times for the jffs to be created and formatted;
  • Create/update file “/jffs/scripts/post-mount” with these lines:
1
2
#Create/update script
nano /jffs/scripts/post-mount
1
2
#!/bin/sh
mount \\\\192.168.10.1\\MyNetworkSharedDrive /mnt/sda1/nasdrive -t cifs -o "username=shareUser,password=sharePassword"
1
2
#Give execute rights to the script
chmod a+rx /jffs/scripts/post-mount

WARNING! Anyone with access to post-mount script can see the user name and password of your network shared drive.

Access transmission from WAN

If you want to be able to connect from WAN to transmission, you have to open the port 9091 in you firewall.

If you cannot open it using the router’s web interface you can do it by using a firewall script in jffs. For this you need custom firmware with jffs partition enabled (I recommend asuswrt merlin build). If you don’t have a firewall-start script, run the following commands.

1
2
3
4
wget -c -O /jffs/scripts/firewall-start http://tinyurl.com/hczpg5g
chmod a+rx /jffs/scripts/firewall-start
nano /jffs/scripts/firewall-start
reboot

If you already have the script, skip line 1 and 2 and just add the following rules to your existing script.

1
2
3
4
5
6
#transmission web interface
iptables -I INPUT -p tcp --destination-port 9091 -j ACCEPT
 
#transmission listening port
iptables -I INPUT -p tcp --destination-port 51413 -j ACCEPT
iptables -I INPUT -p udp --destination-port 51413 -j ACCEPT

Email notifications from transmission

If you are interested in having email notifications, check merlin’s tutorial to email notifications.

Uninstall transmission

1
ipkg remove transmission

New Generation Optware

If this tutorial doesn’t work for you, you can also try to install Transmission Download Manager through New Generation Optware.

Info sources:
https://github.com/RMerl/asuswrt-merlin/wiki/Transmission-through-Optware
http://forums.smallnetbuilder.com/showthread.php?t=8696
http://www.nslu2-linux.org/wiki/Optware/Transmission

Latest updates

On 8th of January 2017 this tutorial was still working and the files to be downloaded were available. Let me know in the comments if you encounter any issues.

24 thoughts on “How to install transmission for Optware on Asus RT-AC68U router

  1. Pingback: Useful Optware applications that I run on my Asus RT-AC68U router | Software development tutorials

  2. Pingback: How to install Optware on Asus RT-AC68U router | Software development tutorials

  3. Transmission crashed because you didn’t set the right downloading path in settings.json before adding the first torrent. If your hdd has a label then transmission won’t find /sda1 partition and use /root/tmp instead, witch will be filled with data in short time.
    Anyway, good tutorial and thanks for posting info sources.

    • I know why it crashed and this is why I wrote this tutorial based on yours. Because I wanted to add some troubleshooting info. I noticed you also updated yours. That’s good, it will help others in future.

  4. Wow – I just dont know how to thank you enough for this! Hugs. The default download manager Asus supplies just doesnt cut it. Thank you so much for this tut!

  5. Hello. Would you please help me? I tried to follow the tutorial on RT-AC55U. Trying to apply
    ipkg install libiconv
    ipkg install nano
    ipkg install transmission

    I’m getting the following message:

    Nothing to be done
    An error ocurred, return value: 4.
    Collected errors:
    Cannot find package transmission.
    Check the spelling or perhaps run ‘ipkg update’

    I ran ipkg update – no effect:

    Nothing to be done
    Successfully terminated.

    I failed to find a solution on the web. Am i doing something wrong or this tutorialis completely not valid for my router.

    I would really appreciate your help

    • Sorry, my mistake.
      I recieve the message: “Nothing to be done Successfully terminated.” upon running ipkg upgrade command.

      ipkg update leads to following:

      Downloading http ://nw-d lcdnet.asus. com/asusware/mipsb ig/stable/Pac kages.gz
      Inflating http ://nw- dlcdnet.asus.c om/asusware/mipsbig /stable/Packages. gz
      Updated list of available packages in /opt/lib/ipkg/lists/optware.asus
      Successfully terminated.

      I also forgot to mention that i’m using native firmware, becuse there is no merlinwrt for my router model

  6. ok thanks I tried and it works, do you know by chance if the merlin firmware also exist for modem routers?
    Also if I want to change the USB drive, I have to redo everything or just put a formatted one?
    thank you

  7. Hello,
    thank you so much for your post.
    I also find a another tutorial on github, but the setting file couldn’t connect.
    I still have 2 questions in my router and hope you could give a help:
    1, the transmsission settings:a, I don’t know how many cashing should be OK,
    b, peer connect limits global and every peer connect limit is safe for
    router.
    2,the setting file for transmission(/opt/etc/transmission-daemon/setting.json) can’t keep the save data after reboot. I don’t know why. Does it should change anohter file ?

    Hope could get help.!

    • I recommend you start with the default settings (cache, peer limit, etc,) and monitor the performance/stability. If it is OK, you can slightly change the settings.
      To update the settings file you need to STOP transmission daemon, update the file then START the daemon.

  8. I just changed disk for bigger in my Asus RT-AC68U. I have ext4 and NTFS, same as on the old HDD. Router firmware Asuswrt-Merlin 380.69_2. On my existing (old) disk I have installed optware and transmission (years ago, don’t remember how I did that). On new disk, after installing Download Master there is no optware-ng.arm folder on ext4 partition like on the old disk so I assume there is no optware. ipkg is not installed so I can’t install transmission. Can you help?

Leave a Reply