[TUTORIAL] Native Transmission on asuswrt routers through optware

Discussion in 'Asuswrt-Merlin' started by TeHashX, Nov 22, 2012.

  1. TeHashX

    TeHashX Very Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    767
    Location:
    Europe
    New site with updated guide

    [​IMG]

    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...
    Stop transmission daemon, change this two lines in /opt/etc/transmission-daemon/settings.json and start transmission again
    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
    [​IMG]

    Youtube video here
    [​IMG]

    Initially posted here
     
    Last edited: Oct 28, 2014
  2. Log in / Register to remove this ad

  3. sk1887

    sk1887 Occasional Visitor

    Joined:
    Aug 22, 2012
    Messages:
    14
    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.
     
  4. AndreaS

    AndreaS Regular Contributor

    Joined:
    Feb 15, 2012
    Messages:
    96
    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: Nov 24, 2012
  5. sk1887

    sk1887 Occasional Visitor

    Joined:
    Aug 22, 2012
    Messages:
    14
    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
     
  6. AndreaS

    AndreaS Regular Contributor

    Joined:
    Feb 15, 2012
    Messages:
    96
    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)
     
  7. morfy

    morfy Occasional Visitor

    Joined:
    Nov 28, 2012
    Messages:
    11
    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:
     
  8. TeHashX

    TeHashX Very Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    767
    Location:
    Europe
    When this happens, after a router reboot?
    If yes, type:
    app_set_enabled.sh transmission yes
     
    Last edited: Nov 30, 2012
  9. morfy

    morfy Occasional Visitor

    Joined:
    Nov 28, 2012
    Messages:
    11
    Thanks very much ;)
     
  10. mmmmmm

    mmmmmm Occasional Visitor

    Joined:
    Nov 29, 2012
    Messages:
    35
    Is there a way to have transmission download torrents to a Network Attached Storage?

    Maybe using merlin version that cand has CIFS client feature?
     
  11. TeHashX

    TeHashX Very Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    767
    Location:
    Europe
    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...
     
  12. RMerlin

    RMerlin Part of the Furniture

    Joined:
    Apr 14, 2012
    Messages:
    13,662
    Location:
    Canada
    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.
     
  13. Fab30

    Fab30 Regular Contributor

    Joined:
    Jul 13, 2012
    Messages:
    57
    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]
     
  14. TeHashX

    TeHashX Very Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    767
    Location:
    Europe
    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
     
  15. Fab30

    Fab30 Regular Contributor

    Joined:
    Jul 13, 2012
    Messages:
    57
    That,s the same error... :(
     
  16. TeHashX

    TeHashX Very Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    767
    Location:
    Europe
    Witch file system is your usb device formatted: ntfs, fat32, ext2, ext3?

    Sent from my HTC One S using Tapatalk 2
     
  17. thealphonso

    thealphonso Occasional Visitor

    Joined:
    Dec 27, 2012
    Messages:
    19
    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!
     
  18. egx11

    egx11 New Around Here

    Joined:
    Jan 2, 2013
    Messages:
    2
    hi, what about uninstalling transmission? simply needs to erase folder or format usb stick? Thanks in advance!
     
  19. TeHashX

    TeHashX Very Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    767
    Location:
    Europe
    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
    [​IMG]

    Verify here if the port is opened.
     
    Last edited: Jan 2, 2013
  20. TeHashX

    TeHashX Very Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    767
    Location:
    Europe
    Type in terminal:

    • ipkg remove transmission
     
    Last edited: Jan 2, 2013
  21. egx11

    egx11 New Around Here

    Joined:
    Jan 2, 2013
    Messages:
    2
    and to remove ipkg?
     

Share This Page