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!

TeHashX

Very Senior Member
New site with updated guide



I made a tutorial for those who want to install Transmission through Optware, the most part is from RT-N56U project and special thanks to Merlin for his custom firmware and advices.
Why installing native Transmission?
- Because it's easier to update, use less memory and let the hdd disk to sleep when is not in use (Asus Download Master doesn't allow the disk to go offline).
Works fine only on merlin's custom firmware.
We need a usb-flash formatted EXT2 or a usb-hdd formated EXT3. DON'T TRY TO INSTALL ON NTFS OR FAT32 FORMATTED DISKS BECAUSE YOU ONLY GET A BIG HEADACHE!!!
On router UI we have to enable Telnet or SSH under Administration / System Tab.


• To start the optware environment we have to install Download Master and right after uninstall because can't coexist with transmissionbt.
• Login to router with putty terminal
ipkg update (ignore wget: server returned error: HTTP/1.1 404 Not Found)
ipkg upgrade
ipkg install transmission wget-ssl
• For arm devices like RT-AC56U or RT-AC68U ipkg install libiconv
/opt/bin/wget -c -O /opt/etc/init.d/S95transmission http://goo.gl/VCgvw2 --no-check-certificate
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
/opt/bin/wget -c -O /opt/etc/transmission-daemon/settings.json http://goo.gl/PIHW2f --no-check-certificate
app_set_enabled.sh transmission yes (this is for starting transmission automatically on every router reboot)

• go to 192.168.1.1:9091 on preferred internet browser (by default username: admin and pass: admin)
• default download folder is on /mnt/sda1/Transmission (will be created automatically with the first downloaded torrent and can be changed editing settings.json file, for this you need the nano editor:
ipkg install nano (in putty terminal)
be sure transmission-daemon is not running when editing settings.json /opt/etc/init.d/S95transmission stop or will be overwritten
nano /opt/etc/transmission-daemon/settings.json here you can edit any settings like enable/change username, password and save with CTRL-O and ENTER, to exit nano CTRL-X

ACCESS FROM WAN
• If you want to access transmission from WAN like work, school, smartphone, tablet or some other device we need to open the port 9091 but the firmware doesn't allow port forwarding to the router himself, for that we will use the scripts on /jffs partition:
• On router UI we have to enable "jffs partition" and "Format JFFS partition at next boot" under Administration / System Tab (available only on custom firmware) and reboot router
/opt/bin/wget -c -O /jffs/scripts/firewall-start http://goo.gl/ZFHdHC --no-check-certificate
chmod a+rx /jffs/scripts/firewall-start (make it executable)
reboot
• after rebooting type YourWanIp:9091 on preferred internet browser, ...

Or, install Transmission Remote GUI from here

EMAIL NOTIFICATIONS
If you have a slow internet connection and you want to be notified when a torrent has finished downloading, place the folowing script witch I called tmail.sh in /jffs/scripts but first don't forget to fill: SMTP, FROM, TO, USER and PASS with your credentials.
WARNING, may become annoying if you are downloading lots of torrents...
#!/bin/sh

SMTP="your-smtp-server:587"
FROM="your-email-address"
TO="your-email-address"
USER="email-user-name"
PASS="email-password"
FROMNAME="Asus Router"
torrent_name="$TR_TORRENT_NAME"

echo "Subject: Download notification!" >/tmp/tmail.txt
echo "From: \"$FROMNAME\"<$FROM>" >>/tmp/tmail.txt
echo "Date: `date -R`" >>/tmp/tmail.txt
echo "" >>/tmp/tmail.txt
echo Transmissionbt has finished downloading "$TR_TORRENT_NAME" on `date +\%d/\%m/\%Y` at `date +\%T` >>/tmp/tmail.txt
echo "" >>/tmp/tmail.txt
echo "Your friendly router." >>/tmp/tmail.txt
echo "" >>/tmp/tmail.txt

cat /tmp/tmail.txt | /usr/sbin/sendmail -S"$SMTP" -f"$FROM" $TO -au"$USER" -ap"$PASS"

rm /tmp/tmail.txt
Stop transmission daemon, change this two lines in /opt/etc/transmission-daemon/settings.json and start transmission again
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/jffs/scripts/tmail.sh",

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

TROUBLESHOOTING

If you have difficulties with installation process or transmissionbt usage, copy paste from terminal the next commands and post here followed by issue details:
Code:
mount
df
free


Youtube video here


Initially posted here
 
Last edited:
very good tutorial!
I've successfully installed it. You could add to ignore the first asus error when doing ipkg update.
Also I had to reboot the router because it was not loading ipkg.

Right now trasmission-daemon keeps closing on its own. I am trying to see if it's about the default port being closed.
 
Thanks for the tutorial.
I didn't test it, but in my opinion it won't work if downloadmaster is running and it's transmission isn't disabled. The problems I see are:
- DoiwnloadMaster already uses all the available ram: disabling amule, as suggested by Merlin in another post, I recovered roughly 64 K of ram.
- port 9091 is already used by transmission in DownloadMaster, as I normally connect to the downloadmaster's transmission through that port using transmission remote gui.

So I guess that we need to know which script launches downloadmaster and to rem-out the lines that in downloadMaster launch transmission.

I agree that the last transmission is far better than the version currently used in by Asus, as I tried it in my nas and gets much more peers and has no problem with udp trackers.
 
Last edited:
Thanks for the tutorial.
I didn't test it, but in my opinion it won't work if downloadmaster is running and it's transmission isn't disabled. The problems I see are:
- DoiwnloadMaster already uses all the available ram: disabling amule, as suggested by Merlin in another post, I recovered roughly 64 K of ram.
- port 9091 is already used by transmission in DownloadMaster, as I normally connect to the downloadmaster's transmission through that port using transmission remote gui.

So I guess that we need to know which script launches downloadmaster and to rem-out the lines that in downloadMaster launch transmission.

I agree that the last transmission is far better than the version currently used in by Asus, as I tried it in my nas and gets much more peers and has no problem with udp trackers.
I think the actual reason to switch to transmission was to avoid using DownloadMaster.
DM doesn't have a feature that is quite needed. When you download some torrents, you can't check out files you don't want.

DM uses 8081.

Anyway, transmission worked all night; I downloaded 20Gb just fine.
I had issues at first which were the port being closed and reported as "current status:???" in log.
Next the log also reported a lack of space on my usb drive, which was not true. Instead, it the wrong mount point was set.
My current issue is to change the root folder for transmission. The root folder currently stays at /opt/etc/transmission-daemon
so if you set the download folder to be /tmp/mnt/sda1/Torrents it would be created a folder at /opt/etc/transmission-daemon/

it wouldn't be an issue at all, if I don't need to access the files from smb and have to check out all the links.

Another note: if you set a name label to the drive, which I did, you would have different mount points. The script works just fine of course, it's just that the settings need to be customized :p
 
I think the actual reason to switch to transmission was to avoid using DownloadMaster.
DM doesn't have a feature that is quite needed. When you download some torrents, you can't check out files you don't want.

:p

You can, if you access transmission through Transmission Remote Gui (http://code.google.com/p/transmisson-remote-gui/) which is available both for windows and Linux.
In any case I guess that the lack of updates in trasmission is something that asus should fix, as the last versions of the client are far better than the one that downloadmaster is currently using. Even the optware repository needs some refresh, because it is several months that I see no updates in it (transmissionb at version 2.6.1 while version 2.7.3 has been released is just an exsample)
 
I just finished installing the "transmission" and it works perfectly. The only thing I noticed is after sometimes the "transmission process" is kill automatically and I have to restart it manually. It's normal?:confused:
 
When this happens, after a router reboot?
If yes, type:
app_set_enabled.sh transmission yes
 
Last edited:
Is there a way to have transmission download torrents to a Network Attached Storage?

Maybe using merlin version that cand has CIFS client feature?
 
Dunno much about cifs but should be something like this:
mount -t cifs //192.168.1.2/media -o guest /mnt/HDD
Maybe Merlin can help us...
 
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:

mount \\\\192.168.1.100\\ShareName /cifs1 -t cifs -o "username=User,password=Pass"

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.
 
Hi, please, i have this problem with tranmission. Can you someone help me with this? THX

Starting transmission-daemon:.[12:19:09.861] JSON parser failed in /opt/etc/transmission-daemon/settings.json at line 66, column 5: ""umask": 2,
"
[FAILED]
 
Hi, please, i have this problem with tranmission. Can you someone help me with this? THX

Starting transmission-daemon:.[12:19:09.861] JSON parser failed in /opt/etc/transmission-daemon/settings.json at line 66, column 5: ""umask": 2,
"
[FAILED]

nano /opt/etc/transmission-daemon/settings.json
change umask from 2 to 0, save and try to start transmission again

Sent from my HTC One S using Tapatalk 2
 
Witch file system is your usb device formatted: ntfs, fat32, ext2, ext3?

Sent from my HTC One S using Tapatalk 2
 
...
I had issues at first which were the port being closed and reported as "current status:???" in log....:p

OK, I'm having this issue since last year (that would be 2012:)

With firewall enabled, no matter what port I'm setting in transmission configuration the firewall will not open it. Please advise!
 
hi, what about uninstalling transmission? simply needs to erase folder or format usb stick? Thanks in advance!
 
OK, I'm having this issue since last year (that would be 2012:)

With firewall enabled, no matter what port I'm setting in transmission configuration the firewall will not open it. Please advise!

Asus stock firmware don't allow port forwarding to himself 192.168.1.1, you have to flash Merlin's firmware and enable /jffs, after reboot type in terminal:
mkdir /jffs/scripts
wget -c -O /jffs/scripts/firewall-start http://tinyurl.com/firewall-start
chmod a+rx /jffs/scripts/firewall-start (make it executable)
reboot

Now, port 9091 and 51413 will be automatically opened.
Ignore "port is closed" error
bezc4l.png


Verify here if the port is opened.
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

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