What's new

[TUTORIAL] Native Transmission on asuswrt routers through optware

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Hi TeHashX,

I'm going to get rid of Download Master soon and install Transmission on a new flash drive, but I can't decide if I should use Entware or Optware. Which would you recommend? I use an RT-N66U with Asuswrt-Merlin. Thanks!
 
Hi TeHashX,

I'm going to get rid of Download Master soon and install Transmission on a new flash drive, but I can't decide if I should use Entware or Optware. Which would you recommend? I use an RT-N66U with Asuswrt-Merlin. Thanks!

Entware...
 
Last edited:
You will need Asuswrt-Merlin for this (the original firmware doesn't support mounting CIFS filesystems).

You need to escape the backslashes or else the shell will misinterpret them. For example:



In your case, you will probably want to put the mount point on your USB disk so Download Manager can access it, instead of on /cifs1.

can u help me? i dont install transmission on my dsl-n66u

KqAPlW.jpg


e2O85v.jpg
 
Thanks to TeHashX, ryzhov_al
it works flawlessly on DSL-N55U latest stock firmware with WD passport 500GB NTFS

i just add this rules http://forums.smallnetbuilder.com/showthread.php?t=8715

Code:
nvram set apps_dl_share=1
nvram set apps_dl_share_port_from=51413
nvram set apps_dl_share_port_to=51414
nvram commit

so i do not need enter this on every reboot
Code:
iptables -I INPUT -p tcp --destination-port 51413 -j ACCEPT
iptables -I INPUT -p udp --destination-port 51413 -j ACCEPT
 
I have a question. I got everything setup and running correctly on my ac68u. What i can't seem to figure out is for some reason my mac cannot access the default transmission download folder at all. I can access it on my PC but the path is a little wonky. it uses something like This This PC\RT-AC68R. can anyone point me in the right direction? i'm still pretty new to linux.
 
I have a question. I got everything setup and running correctly on my ac68u. What i can't seem to figure out is for some reason my mac cannot access the default transmission download folder at all. I can access it on my PC but the path is a little wonky. it uses something like This This PC\RT-AC68R. can anyone point me in the right direction? i'm still pretty new to linux.

Maybe something like this?
smb://RT-AC68R
 
Creating swap file

SWAP FILE
If transmission crashes sometimes "without reason", most probably router goes out of memory and this can be fixed by creating a swap partition but it's a little bit to complicated for most users and we will create a swap file instead, 256MB is more than enough:
cd /opt
dd if=/dev/zero of=swapfile bs=1024 count=262144
mkswap swapfile
chmod 0600 swapfile
swapon swapfile
To enable swap file when router booting, add this lines to /jffs/scripts/post-mount script
Code:
#!/bin/sh

swapon /opt/swapfile
To unmount add this lines to /jffs/scripts/services-stop script
Code:
#!/bin/sh

swapoff /opt/swapfile
Code:
chmod a+rx /jffs/scripts/post-mount
chmod a+rx /jffs/scripts/services-stop
 
Last edited:
I just installed Transmission on my ASUS DSL-N55U, but I have a problem.
If I load any torrent file, suddently transmission-daemon stops and I get kicked off from web page and/or Transmission Remote GUI.
Any ideas? I cannot try Entware because my router cannot run asuswrt-merlin...
 
I wondered if anyone could help me.

I recently flashed 3.0.0.4.374.40 on my RT-N16 after migrating from Tomato-Shibby builds. I read that Merlins firmware gave better performance.

My aim is to set up Transmission instead of using download master because I read it is suppose to use far less resources and should be more stable. Sadly for me, the built-in Asus client seems to work better. But I know the reasoning behind the recommendation and I used this guide to install. (thanks)! I don't want to give up yet!

Anyway, I am having a bunch of problems, first my router was rebooting itself with high cpu usage (I think) when downloading a single torrent- I checked in top.

Then a moment a go my router forgot its internet connection settings and I had to re-enter them for it to connect to my modem.

And now after a few mins of downloading, instead of rebooting the process seems to just hang, I can't connect via web browser or via remote gui and cpu usage goes down to next to nothing.

I can force close and start the daemon but the same happens over again in a cycle. If I leave it 10 mins, it starts to work again, but at a very low transfer rate.

Is there anything I can do to troubleshoot this? I just want to get stable.

I already made a 500mb swap file that doesn't seem to help. (Does it matter the swap file being on the same disk as the torrent download destination)?

I am using the default settings posted here, so total number of connections shouldn't be the problem?

My internet connection is 60/20 fibre.

My total aim is to use the media server and samba server too, is this asking too much of my RT-N16?

Thanks!
 
Post here outputs of: mount, free, df, top -b -n1, and settings.json

Thanks for helping me

Mount:
Code:
thenames@RT-N16:/tmp/home/root# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw)
devfs on /dev type tmpfs (rw,noatime)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /tmp/mnt/sda1 type ext3 (rw,nodev,noatime,data=ordered)
thenames@RT-N16:/tmp/home/root#

Free:
Code:
thenames@RT-N16:/tmp/home/root# free
             total         used         free       shared      buffers
Mem:        126452        44208        82244            0         3908
-/+ buffers:              40300        86152
Swap:       524280         4736       519544

df:

Code:
thenames@RT-N16:/tmp/home/root# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                24512     24512         0 100% /
tmpfs                    63224      2400     60824   4% /tmp
devfs                    63224         0     63224   0% /dev
/dev/mtdblock4            6656       516      6140   8% /jffs
/dev/sda1            480719056   2929876 453369980   1% /tmp/mnt/sda1
thenames@RT-N16:/tmp/home/root#

top -b -n1:

I took this when temporary lost connection to the daemon, at the time it was downloading at 600 kB/s but after it connected again, it fell down to 100. This seems to often happen.

Code:
thenames@RT-N16:/tmp/home/root# top -b -n1
Mem: 124428K used, 2024K free, 0K shrd, 1132K buff, 7836K cached
CPU: 92.3% usr  7.6% sys  0.0% nic  0.0% idle  0.0% io  0.0% irq  0.0% sirq
Load average: 1.99 0.91 0.39 4/60 4144
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
 4121  4118 thenames R     169m137.1   0 92.1 /opt/bin/transmission-daemon -a *.*.*.* -g /opt/etc/transmission-daemon
 4144  4078 thenames R     1436  1.1   0  7.6 top -b -n1
 4124  4118 thenames S     169m137.1   0  0.0 /opt/bin/transmission-daemon -a *.*.*.* -g /opt/etc/transmission-daemon
 4122  4118 thenames S     169m137.1   0  0.0 /opt/bin/transmission-daemon -a *.*.*.* -g /opt/etc/transmission-daemon
 4117     1 thenames S     169m137.1   0  0.0 /opt/bin/transmission-daemon -a *.*.*.* -g /opt/etc/transmission-daemon
 4118  4117 thenames S     169m137.1   0  0.0 /opt/bin/transmission-daemon -a *.*.*.* -g /opt/etc/transmission-daemon
 4069     1 thenames S     3868  3.0   0  0.0 httpd
  579     1 thenames S     3244  2.5   0  0.0 smbd -D -s /etc/smb.conf
  578     1 thenames S     2380  1.8   0  0.0 nmbd -D -s /etc/smb.conf
  294     1 thenames S     2332  1.8   0  0.0 watchdog
    1     0 thenames S     2300  1.8   0  0.0 /sbin/init noinitrd
  265     1 thenames S     2296  1.8   0  0.0 /sbin/wanduck
  303   294 thenames S     2296  1.8   0  0.0 ots
 1124     1 thenames S     2296  1.8   0  0.0 usbled
  860     1 thenames S     2296  1.8   0  0.0 ntp
 1038     1 thenames S     2296  1.8   0  0.0 disk_monitor
  282     1 thenames S     2296  1.8   0  0.0 wpsaide
  143     1 thenames S     2288  1.8   0  0.0 console
 1131  1130 thenames S     2104  1.6   0  0.0 u2ec
 1130     1 thenames S     2104  1.6   0  0.0 u2ec
 1132  1131 thenames S     2104  1.6   0  0.0 u2ec
 1120     1 thenames S     1892  1.5   0  0.0 /bin/wps_monitor
  928     1 thenames S     1508  1.1   0  0.0 /usr/sbin/pppd file /tmp/ppp/options.wan0
 1123     1 thenames S     1508  1.1   0  0.0 nas
  287     1 thenames S     1440  1.1   0  0.0 crond
 4078  4076 thenames S     1440  1.1   0  0.0 -sh
  896   862 thenames S     1440  1.1   0  0.0 wget --spider -q -t 2 -T 30 http://dlcdnet.asus.com/pub/ASUS/LiveUpdate/Release/Wireless/Packages.gz
  926     1 thenames D     1436  1.1   0  0.0 udhcpc -i eth0 -p /var/run/udhcpc0.pid -s /tmp/udhcpc -b -O33 -O249
  147   143 thenames S     1436  1.1   0  0.0 /bin/sh
  862     1 thenames S     1436  1.1   0  0.0 {app_update.sh} /bin/sh /usr/sbin/app_update.sh
 3978     1 thenames S     1428  1.1   0  0.0 syslogd -m 0 -S -O /tmp/syslog.log -s 256 -l 7
 4002     1 thenames S     1428  1.1   0  0.0 telnetd
 3980     1 thenames S     1428  1.1   0  0.0 /sbin/klogd
  291     1 thenames S     1292  1.0   0  0.0 rstats
  443     1 thenames S     1180  0.9   0  0.0 lpd
 4076  3993 thenames S     1176  0.9   0  0.0 dropbear -p 22 -j -k
  305     1 thenames S     1156  0.9   0  0.0 lld2d br0
 1116     1 thenames S     1108  0.8   0  0.0 /bin/eapd
 3993     1 thenames S     1108  0.8   0  0.0 dropbear -p 22 -j -k
 1128     1 thenames S     1100  0.8   0  0.0 networkmap
  288     1 thenames S     1088  0.8   0  0.0 /usr/sbin/infosvr br0
 4005     1 nobody   S     1008  0.8   0  0.0 dnsmasq --log-async
 4075     1 thenames S      812  0.6   0  0.0 miniupnpd -f /etc/upnp/config
  114     1 thenames S      648  0.5   0  0.0 hotplug2 --persistent --no-coldplug
  213     2 thenames SW<      0  0.0   0  0.0 [usb-storage]
    3     2 thenames RWN      0  0.0   0  0.0 [ksoftirqd/0]
   93     2 thenames SW<      0  0.0   0  0.0 [mtdblockd]
   48     2 thenames SW<      0  0.0   0  0.0 [kswapd0]
 1278     2 thenames SW       0  0.0   0  0.0 [pdflush]
 1232     2 thenames SW       0  0.0   0  0.0 [pdflush]
  352     2 thenames SW<      0  0.0   0  0.0 [kjournald]
   20     2 thenames SW<      0  0.0   0  0.0 [kblockd/0]
    4     2 thenames SW<      0  0.0   0  0.0 [events/0]
    2     0 thenames SW<      0  0.0   0  0.0 [kthreadd]
  110     2 thenames SW<      0  0.0   0  0.0 [kmmcd]
  152     2 thenames SWN      0  0.0   0  0.0 [jffs2_gcd_mtd4]
   49     2 thenames SW<      0  0.0   0  0.0 [aio/0]
    5     2 thenames SW<      0  0.0   0  0.0 [khelper]
  158     2 thenames SW<      0  0.0   0  0.0 [khubd]
  212     2 thenames SW<      0  0.0   0  0.0 [scsi_eh_0]

settings.json

Code:
   "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": true,
    "blocklist-url": "http://list.iblocklist.com/?list=bt_level1",
    "cache-size-mb": 200,
    "dht-enabled": true,
    "download-dir": "/tmp/mnt/sda1/Transmission",
    "download-queue-enabled": true,
    "download-queue-size": 3,
    "encryption": 0,
    "idle-seeding-limit": 180,
    "idle-seeding-limit-enabled": true,
    "incomplete-dir": "/tmp/mnt/sda1/Transmission/Incomplete",
    "incomplete-dir-enabled": false,
    "lpd-enabled": false,
    "message-level": 2,
    "peer-congestion-algorithm": "",
    "peer-id-ttl-hours": 6,
    "peer-limit-global": 80,
    "peer-limit-per-torrent": 30,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "pidfile": "/var/run/transmission-daemon.pid",
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 3,
    "ratio-limit-enabled": true,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "{ba5e80c958a816bac9e2b323e05c652cc89bf6aej/IFNxRm",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "thenames",
    "rpc-whitelist": "*.*.*.*",
    "rpc-whitelist-enabled": true,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 0,
    "upload-slots-per-torrent": 10,
    "utp-enabled": false

It looks from top that thre is high cpu usage, but it seems to jump from 10-50% straight to 90%+ and then the daemon freezes/can't connect to it any more via remote gui. I sit watching the cpu usage and it seems fine and then suddenly it just stops, sometimes temporarily, sometimes for 10 mins, sometimes for good.
 
Heres another top entry, this time quite a while after the connection to the daemon stopped.

Code:
thenames@RT-N16:/tmp/home/root# top -b -n1
Mem: 124584K used, 1868K free, 0K shrd, 576K buff, 5080K cached
CPU:  0.0% usr 15.3% sys  0.0% nic  0.0% idle 53.8% io  7.6% irq 23.0% sirq
Load average: 2.23 1.99 1.10 4/59 4182
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
 4121  4118 thenames R     309m250.3   0  7.6 /opt/bin/transmission-daemon -a *.*.*.* -g /opt/etc/transmission-daemon
 4182  4078 thenames R     1436  1.1   0  7.6 top -b -n1
 4124  4118 thenames S     309m250.3   0  0.0 /opt/bin/transmission-daemon -a *.*.*.* -g /opt/etc/transmission-daemon
 4118  4117 thenames S     309m250.3   0  0.0 /opt/bin/transmission-daemon -a *.*.*.* -g /opt/etc/transmission-daemon
 4117     1 thenames S     309m250.3   0  0.0 /opt/bin/transmission-daemon -a *.*.*.* -g /opt/etc/transmission-daemon
 4069     1 thenames S     3868  3.0   0  0.0 httpd
  579     1 thenames S     3244  2.5   0  0.0 smbd -D -s /etc/smb.conf
  578     1 thenames S     2380  1.8   0  0.0 nmbd -D -s /etc/smb.conf
  294     1 thenames S     2332  1.8   0  0.0 watchdog
    1     0 thenames S     2300  1.8   0  0.0 /sbin/init noinitrd
  265     1 thenames S     2296  1.8   0  0.0 /sbin/wanduck
  303   294 thenames S     2296  1.8   0  0.0 ots
 1124     1 thenames S     2296  1.8   0  0.0 usbled
  860     1 thenames S     2296  1.8   0  0.0 ntp
 1038     1 thenames S     2296  1.8   0  0.0 disk_monitor
  282     1 thenames S     2296  1.8   0  0.0 wpsaide
  143     1 thenames S     2288  1.8   0  0.0 console
 1131  1130 thenames S     2104  1.6   0  0.0 u2ec
 1130     1 thenames S     2104  1.6   0  0.0 u2ec
 1132  1131 thenames S     2104  1.6   0  0.0 u2ec
 1120     1 thenames S     1892  1.5   0  0.0 /bin/wps_monitor
  928     1 thenames S     1508  1.1   0  0.0 /usr/sbin/pppd file /tmp/ppp/options.wan0
 1123     1 thenames S     1508  1.1   0  0.0 nas
 4078  4076 thenames S     1448  1.1   0  0.0 -sh
  287     1 thenames S     1440  1.1   0  0.0 crond
  896   862 thenames S     1440  1.1   0  0.0 wget --spider -q -t 2 -T 30 http://dlcdnet.asus.com/pub/ASUS/LiveUpdate/Release/Wireless/Packages.gz
  926     1 thenames S     1436  1.1   0  0.0 udhcpc -i eth0 -p /var/run/udhcpc0.pid -s /tmp/udhcpc -b -O33 -O249
  147   143 thenames S     1436  1.1   0  0.0 /bin/sh
  862     1 thenames S     1436  1.1   0  0.0 {app_update.sh} /bin/sh /usr/sbin/app_update.sh
 3978     1 thenames S     1428  1.1   0  0.0 syslogd -m 0 -S -O /tmp/syslog.log -s 256 -l 7
 4002     1 thenames S     1428  1.1   0  0.0 telnetd
 3980     1 thenames S     1428  1.1   0  0.0 /sbin/klogd
  291     1 thenames S     1292  1.0   0  0.0 rstats
  443     1 thenames S     1180  0.9   0  0.0 lpd
 4076  3993 thenames S     1176  0.9   0  0.0 dropbear -p 22 -j -k
  305     1 thenames S     1156  0.9   0  0.0 lld2d br0
 1116     1 thenames S     1108  0.8   0  0.0 /bin/eapd
 3993     1 thenames S     1108  0.8   0  0.0 dropbear -p 22 -j -k
 1128     1 thenames S     1100  0.8   0  0.0 networkmap
  288     1 thenames S     1088  0.8   0  0.0 /usr/sbin/infosvr br0
 4005     1 nobody   S     1008  0.8   0  0.0 dnsmasq --log-async
 4075     1 thenames S      812  0.6   0  0.0 miniupnpd -f /etc/upnp/config
  114     1 thenames S      648  0.5   0  0.0 hotplug2 --persistent --no-coldplug
  213     2 thenames SW<      0  0.0   0  0.0 [usb-storage]
    3     2 thenames SWN      0  0.0   0  0.0 [ksoftirqd/0]
   93     2 thenames SW<      0  0.0   0  0.0 [mtdblockd]
   48     2 thenames DW<      0  0.0   0  0.0 [kswapd0]
 1278     2 thenames SW       0  0.0   0  0.0 [pdflush]
 1232     2 thenames SW       0  0.0   0  0.0 [pdflush]
  352     2 thenames SW<      0  0.0   0  0.0 [kjournald]
   20     2 thenames SW<      0  0.0   0  0.0 [kblockd/0]
    4     2 thenames SW<      0  0.0   0  0.0 [events/0]
    2     0 thenames SW<      0  0.0   0  0.0 [kthreadd]
  110     2 thenames SW<      0  0.0   0  0.0 [kmmcd]
   49     2 thenames SW<      0  0.0   0  0.0 [aio/0]
  152     2 thenames SWN      0  0.0   0  0.0 [jffs2_gcd_mtd4]
  212     2 thenames SW<      0  0.0   0  0.0 [scsi_eh_0]
    5     2 thenames SW<      0  0.0   0  0.0 [khelper]
  158     2 thenames SW<      0  0.0   0  0.0 [khubd]

I repeat that command and sometimes it shows 95% sometimes 5%. Now transmission remote gui says error 301: Moved permanently. Oh the other thing is, if I use :
Code:
/opt/etc/init.d/S95transmission stop
after the daemon disconnects, it takes quite a while to close down the client, probably because it needs to force it close?
Code:
Stopping transmission-daemon:......................[KILLED]
 
Last edited:
Code:
"cache-size-mb": 200,
??????????????????

Should be 2 or 4MB at maximum.
On Tomato-Shibby worked fine?
 
Last edited:
Sorry I forgot to mention I changed the cache to see if it would start to use the SWAP, with only the default of 2, no swap was being used.

Having said that, before I changed the cache from 2 too 200 the router was rebooting when downloading torrents, instead now it just freezes/disconnects the remote ui.

When I was using Tomato shibby it was similar, but I didn't have swap activated for that. I do remember though it wasn't using anywhere near the limit of memory, but I was having the same slowdowns/disconnects of the server.

I am wondering if the culprit is my USB drive, if you can't see anything else wrong with my config I'll plug my USB flash drive in instead to see if it suffers from the same problems.

Edit* Just put cache back to 2mb and its still using the swap, thats an improvement at least. It lasted a lot longer without crashing, but eventually things came to an end. The web interface of transmission says "unable to save resume file - input output error". The router is working for web browsing, just can't access its web interface any more, so its crashed again, not just transmission, but the web interface too. I can't even access via telnet or ssh. I also had a reboot just now.
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top