Finally got it!
First of all, sorry about my poor english, and sorry if you find this post long and messy. It was a challenge to me to make all work in the first place, and now I am recalling the steps. Comments are wellcome, confirmations of this working on this on that...are welcomed to. I will edit the post or update if necesary, and may be someone with better english and order skills can make a no-brainer step by step tutorial suited for the impatient ones.
Almost a year ago, when I first try to go from optware to entware in my ASUS RT-N16, I was discouraged because there was no full replacement solution for the buggy download manager.
My first attempts with aria2 were frustrating. I could not manage to set up any of the front ends, except for webui-aria but then, I could not start downloading anything except http files. No torrent, no nothing.
Saddly, went back to optware and download manager.
Now I found the way. So lets go step by step.
Prerequisites:
entware working (It can be tricky if you allready have optware, because it will install, and you may be able to do all the steps and even test it, but if you reset the router... it can go back to optware, even if you uninstall download manager. After many tryes, finally got surviving the reset. You have to erase all traces of optware on the microsd (or pendrive/hard drive) attached. I unplugged it... and erase everything except the old download folder from mi PC... even the hidden files that begins with a dot.
The general tutorial for aria that most fitted me was at first this: I recomend you to follow it in one window and continue reading my post on the other to make necesary changes.
I use that changing some things that I will explain below.
You have to install aria2, off course using
opkg update
opkg install aria2
And if you want to use the webui pointing the browser to the router (or from outside) you will need a web server. I used the lighttpd, but installed it using this instructions
In my case, the only webui that worked is webui-aria for many reasons. The one in that tutorial was keep throwing errors on line 17... something about SESSION, so I installed lighttpd_mod_session and that error dissapear, but never get to work. Other UI that I try was a cgi file, but it was in source form and I never manage to compile it on linux mint 14. Not to mention that uGet didnt worked too... so lets drop it, use whatever you want/find but I recommend zuahmza's webui-aria2 that doesn't require anything... it can work on your PC, on his website, on the www folder of the router... and probably on the download folder itself mounted with samba or NFS... and a web browser.
This is my own aria2.conf (BTW it is located in /opt/etc directly.. and NOT in the /opt/etc/aria2. You can use any folder you want for download, but it should exist.
Don't get fooled by the OPTWARE string... it is just the name of my pendrive that I didn't changed after coming from the optware past. I remove the lines of rpc password and user, but they work. I didn't enabled them again because I removed the access from outside to the virtual server (it worked with the external IP when i tried)... I use it from inside mi LAN. The way to get to the web server is, in my case: 192.168.1.1:81 and you will add /webui-aria2 if that is the name of the folder inside www.
Now the most annoying problem..solved:
The aria2 that came with the entware in the repos, DOESNT have support for bittorrent and many other features...
First I think of cross-compile it myself, buy before I even started to get a clue on that, I found a page with a set of scripts for compiling inside the router directly... time consuming but accurated and optimized results, as stated by the mantainer of the toolkit. It is called tomatoware and will allow you to compile in the router updated versions of applications for entware or optware, and even compile stuff that not exist yet on the repositories.
But it gets better... in the case of aria2 you may be not need to compile it at all. Searching the proyects tied to tomatoware (different forks of tomatousb) I found a files repository for the same guy, that have binaries allready compiled. I download a few (including aria2). Here is the link
Then I stopped aria in the router going to /opt/etc/init.d and issuing
./S81aria2 stop
And make a backup of the aria2c binarie (you can enter vía samba to the entware/bin folder and copy the file to you PC)
Finally copied the new, updated binary replacing the one in the router.
in my case:
cp /mnt/OPTWARE/Download2/aria2c /opt/bin
then start again aria with
./S81aria2 start
and thested the features with:
aria2c -v
Which showed me that it has all the features I want enabled... and the binary is smaller than the previous one.
Enabled Features: Async DNS, BitTorrent, Firefox3 Cookie, GZip, HTTPS, Message Digest, Metalink, XML-RPC
Hash Algorithms: sha-1, md5
After that, I pointed once more my browser to the routerip:81/whatever-folder-the-webui-is-on and this time, when I pushed Add, it showed me more optiones, including torrent.
In my tests, I whas able to download a torrent following the link... also able to download a torrent searching for the .torrent in my PC
The mangnets this time where decoded, but I am not done with the tests... It allways showed the metadata, but in some cases it dont started to donwload, and in my hurry, I give it myself the .torrent and delete the old magnet one. But I will update here when I tested it more extensively.
Now that I can download, I will keep the entware...
PS. Other caveat that I found trying to follow the previous tutorials is the location of the aria2.conf... It will be in the etc folder...and ^NOT^ in the etc/aria2 folder. You will lose time if you dont verify this.
First of all, sorry about my poor english, and sorry if you find this post long and messy. It was a challenge to me to make all work in the first place, and now I am recalling the steps. Comments are wellcome, confirmations of this working on this on that...are welcomed to. I will edit the post or update if necesary, and may be someone with better english and order skills can make a no-brainer step by step tutorial suited for the impatient ones.
Almost a year ago, when I first try to go from optware to entware in my ASUS RT-N16, I was discouraged because there was no full replacement solution for the buggy download manager.
My first attempts with aria2 were frustrating. I could not manage to set up any of the front ends, except for webui-aria but then, I could not start downloading anything except http files. No torrent, no nothing.
Saddly, went back to optware and download manager.
Now I found the way. So lets go step by step.
Prerequisites:
entware working (It can be tricky if you allready have optware, because it will install, and you may be able to do all the steps and even test it, but if you reset the router... it can go back to optware, even if you uninstall download manager. After many tryes, finally got surviving the reset. You have to erase all traces of optware on the microsd (or pendrive/hard drive) attached. I unplugged it... and erase everything except the old download folder from mi PC... even the hidden files that begins with a dot.
The general tutorial for aria that most fitted me was at first this: I recomend you to follow it in one window and continue reading my post on the other to make necesary changes.
I use that changing some things that I will explain below.
You have to install aria2, off course using
opkg update
opkg install aria2
And if you want to use the webui pointing the browser to the router (or from outside) you will need a web server. I used the lighttpd, but installed it using this instructions
In my case, the only webui that worked is webui-aria for many reasons. The one in that tutorial was keep throwing errors on line 17... something about SESSION, so I installed lighttpd_mod_session and that error dissapear, but never get to work. Other UI that I try was a cgi file, but it was in source form and I never manage to compile it on linux mint 14. Not to mention that uGet didnt worked too... so lets drop it, use whatever you want/find but I recommend zuahmza's webui-aria2 that doesn't require anything... it can work on your PC, on his website, on the www folder of the router... and probably on the download folder itself mounted with samba or NFS... and a web browser.
This is my own aria2.conf (BTW it is located in /opt/etc directly.. and NOT in the /opt/etc/aria2. You can use any folder you want for download, but it should exist.
Code:
daemon=true
enable-rpc=true
rpc-listen-port=6800
rpc-listen-all=true
dir=/tmp/mnt/OPTWARE/Download2
log=/opt/var/log/aria2.log
log-level=warn
enable-dht=false
#dht-listen-port=6801
#dht-file-path=/opt/var/run/aria2c
auto-save-interval=30
max-concurrent-downloads=5
lowest-speed-limit=1K
max-overall-upload-limit=20K
max-upload-limit=10K
max-overall-download-limit=150K
max-download-limit=30K
bt-max-peers=25
bt-max-open-files=50
bt-request-peer-speed-limit=2K
seed-ratio=1.0
seed-time=1460
#to use epoll is a bit better than select
event-poll=epoll
Don't get fooled by the OPTWARE string... it is just the name of my pendrive that I didn't changed after coming from the optware past. I remove the lines of rpc password and user, but they work. I didn't enabled them again because I removed the access from outside to the virtual server (it worked with the external IP when i tried)... I use it from inside mi LAN. The way to get to the web server is, in my case: 192.168.1.1:81 and you will add /webui-aria2 if that is the name of the folder inside www.
Now the most annoying problem..solved:
The aria2 that came with the entware in the repos, DOESNT have support for bittorrent and many other features...
First I think of cross-compile it myself, buy before I even started to get a clue on that, I found a page with a set of scripts for compiling inside the router directly... time consuming but accurated and optimized results, as stated by the mantainer of the toolkit. It is called tomatoware and will allow you to compile in the router updated versions of applications for entware or optware, and even compile stuff that not exist yet on the repositories.
But it gets better... in the case of aria2 you may be not need to compile it at all. Searching the proyects tied to tomatoware (different forks of tomatousb) I found a files repository for the same guy, that have binaries allready compiled. I download a few (including aria2). Here is the link
Then I stopped aria in the router going to /opt/etc/init.d and issuing
./S81aria2 stop
And make a backup of the aria2c binarie (you can enter vía samba to the entware/bin folder and copy the file to you PC)
Finally copied the new, updated binary replacing the one in the router.
in my case:
cp /mnt/OPTWARE/Download2/aria2c /opt/bin
then start again aria with
./S81aria2 start
and thested the features with:
aria2c -v
Which showed me that it has all the features I want enabled... and the binary is smaller than the previous one.
Enabled Features: Async DNS, BitTorrent, Firefox3 Cookie, GZip, HTTPS, Message Digest, Metalink, XML-RPC
Hash Algorithms: sha-1, md5
After that, I pointed once more my browser to the routerip:81/whatever-folder-the-webui-is-on and this time, when I pushed Add, it showed me more optiones, including torrent.
In my tests, I whas able to download a torrent following the link... also able to download a torrent searching for the .torrent in my PC
The mangnets this time where decoded, but I am not done with the tests... It allways showed the metadata, but in some cases it dont started to donwload, and in my hurry, I give it myself the .torrent and delete the old magnet one. But I will update here when I tested it more extensively.
Now that I can download, I will keep the entware...
PS. Other caveat that I found trying to follow the previous tutorials is the location of the aria2.conf... It will be in the etc folder...and ^NOT^ in the etc/aria2 folder. You will lose time if you dont verify this.