Transmission installed and running on 1.7.1

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Transmission installed and running on 1.7.1

Post by ispyisail »

I was having problems with a 32Gig

Nothing conclusive so I didn't take it any further

Once the other bugs are ironed out I might do some more tests

griftopia
Posts: 35
Joined: Sat Mar 28, 2015 9:10 am

Re: Transmission installed and running on 1.7.1

Post by griftopia »

Lantis wrote:i have sitting on my desk a usb stick that reports itself to windows as 256GB.
its actual size is 8GB.
you can write 256GB to it all day and all night, but when you try to recover that data, it is corrupted, because it doesn't actually exist.
Have you ever written 64GB to it and recovered it without corruption?
you never explicitly answered this question.

upon taking time out of my day to try and find an answer for you, i found a person in a similar situation. his problem happened to be that he had a usb stick that misrepresented its size and that caused these errors.

upon further taking time out of my day to try and find an answer for you, i decided to plug a 128GB (unpowered) harddrive into my router and it mounted without hassles.

and you reward me by taking the time to be "smart" in your answer?
Happy Easter, or is that against your religion also.
:roll:
Sheesh! When I was in school my professor once graded my paper incorrectly. It took me 3 hours to convince him he had graded an answer incorrectly.

I thought this was a community where we help each other. Not hold on to ONE thing and keep harping on it. My comment regarding religion was trying to convey that.

I mentioned before both are Sony sticks of the same "Family". This is not some cheap crap from china / hong kong formatted to seem larger than it is. I repeatedly said both USB sticks work fine.

I understand you are trying to help, since you are bothering to reply, but we need to get beyond whether my problem is the USB stick itself. Otherwise you are not the only one wasting his time.
ISP Provided Router [Irrelevant]
WD MyNetN750 Client Bridge - Garygoyle @ 5.0Ghz Yes !!!

griftopia
Posts: 35
Joined: Sat Mar 28, 2015 9:10 am

Re: Transmission installed and running on 1.7.1

Post by griftopia »

ispyisail wrote:I was having problems with a 32Gig

Nothing conclusive so I didn't take it any further

Once the other bugs are ironed out I might do some more tests
Thanks ispy.

I have tried all 32 GB sticks I have. Sony. SanDisk. MicroCenter brand. Princeton. Even 32GB SDHC card stuck in a USB adapter. The USB adapter is not name brand. All of them mounted.

64GB Sony USB stick does not mount
64GB SDHC card mounted in USB adapter does not mount.

1TB External USB Seagate POWERED does mount.

Now it could very well be the brand of the USB stick. This has happened to me in the past. However I'm using both Sony sticks, so that should not be part of the equation.

So again, I need one kind soul to tell me > 32GB unpowered USB stick has worked. If someone tells me it worked in WD N750, I can then ask smarter questions. It is either the hardware or the firmware and I don't think there is another way to figure it out.
ISP Provided Router [Irrelevant]
WD MyNetN750 Client Bridge - Garygoyle @ 5.0Ghz Yes !!!

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Transmission installed and running on 1.7.1

Post by Lantis »

when you have eliminated the impossible, whatever remains, however improbable, must be the truth

thanks for clearing up that the USB sticks aren't to blame.
i have nothing further to offer.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

CarpeNoctem
Posts: 51
Joined: Fri Mar 06, 2015 11:15 am

Re: Transmission installed and running on 1.7.1

Post by CarpeNoctem »

I dunno how relevant this is, but newer USB sticks show up as "fixed" drives instead of removable (Kingston flash drives come to mind).

Since I use a lot of bootable sticks, it was an issue for me that these drives wouldn't lend themselves to be formatted as "removable drives", until I used an app from HP I think, which allowed the drive to be recognized as removable.

The point to all of this, is that before I changed it to removable, it would not work at all with either stock, dd-wrt or gargoyle firmwares. Once it became "removable", it was accesible and ready to be used.

May be a longshot but doesn't hurt to check.

griftopia
Posts: 35
Joined: Sat Mar 28, 2015 9:10 am

Re: Transmission installed and running on 1.7.1

Post by griftopia »

CarpeNoctem wrote:I dunno how relevant this is, but newer USB sticks show up as "fixed" drives instead of removable (Kingston flash drives come to mind).

Since I use a lot of bootable sticks, it was an issue for me that these drives wouldn't lend themselves to be formatted as "removable drives", until I used an app from HP I think, which allowed the drive to be recognized as removable.

The point to all of this, is that before I changed it to removable, it would not work at all with either stock, dd-wrt or gargoyle firmwares. Once it became "removable", it was accesible and ready to be used.

May be a longshot but doesn't hurt to check.
All my USB sticks show up as "removable" on windows. I also tried formating under linux. It does not exactly say "removable" in linux and I had the same issue. I'm also trying to borrow larger USB sticks before I buy them and waste money.

I will pick this up again on the weekend. It has to be something stupid. I have been told the alignment of the planets was not correct when I was born, so my experience is par for the course.
ISP Provided Router [Irrelevant]
WD MyNetN750 Client Bridge - Garygoyle @ 5.0Ghz Yes !!!

CarpeNoctem
Posts: 51
Joined: Fri Mar 06, 2015 11:15 am

Re: Transmission installed and running on 1.7.1

Post by CarpeNoctem »

griftopia wrote:I will pick this up again on the weekend. It has to be something stupid. I have been told the alignment of the planets was not correct when I was born, so my experience is par for the course.
Preaching to the Choir, brother!

ant75
Posts: 3
Joined: Mon Oct 26, 2015 9:16 am

Re: Transmission installed and running on 1.7.1

Post by ant75 »

I followed this install guide when installing Transmission. It helped enormously!

**************************************************************************

Install Transmission on Gargoyle Routers for Noobs

Gargoyle is an easy GUI based configuration tool for routers. It runs on top of OpenWRT an open source router firm ware using basic text command line for configurations. Transmission must be installed using the routers OpenWRT command line system. Gargoyle does not currently (at v1.8) have Transmission or other torrent clients as easy to install GUI plugins. (A shame…..)

My TP Link Router TL-WR1043ND v2.x is using the Qualcomm Atheros QCA9558 CPU at 720 MHz with 64MB DDR Ram. This is quite fast for a router but limited as far as file transfer and Transmission goes. However, Transmission works well on this setup. I have tested it with over 20 files seeding and 4 downloading all at once. Many are large 20G+ files as well. The Transmission GUI (v5.01) works well and is very similar to uTorrent. You only need to use the command line to setup Transmission but not to operate it once its been setup.

The router USB hard disk must be formatted with EXT4. NTFS works (Even 4TB), but is 25% the speed with heaps of extra CPU overheads for the router. I am not joking when I say this! EXT4 is 4-5 times the speed, especially on file transfer across the network to the PC. Expect about 10mb when router is mostly idle and 3mb when router is under Transmission full load. We also need EXT4 to setup a SWAP partition of around double memory size. This is important for UNIX memory management when running Transmission.

Format the drive in Gargoyle itself to make sure it is setup right. The swap partition need only be about 512mb in size. (At least double RAM size.) We talk more later on setting the router to use this swap partition. For now lets start the Transmission install.

So here goes. In Gargoyle under “system” select “plugins”. Go to bottom and do “refresh plugins”. Now install the “services manager” and “webshell” plugins. We can use the webshell to enter text commands, however, I found that SSH was better. Under “access router” enable SSH and download a SSH client. “Putty” was simple and good.

Open Putty and enter the router IP address and click save and then open. 192.168.1.1
Login as root Password is what you use for router web login.

Need to install transmission daemon. The daemon runs in the background and is designed to not have any form of visual interface. I'm using version 2.84 (14307) at present.
opkg update
opkg install transmission-daemon

Need to control the transmission daemon. Can use the more limited web interface system or Transmission JSON-RPC (Remote Procedure Call) system. RPC is better since we can run a GUI on a remote host machine with functionality similar to uTorrent. I used “Transmission Remote GUI”. So install RPC:
opkg install transmission-remote

Assuming successful installs above it is time to enable Transmission in the router. We can't connect to it using our RPC front end GUI until it is enabled in its configuration file. We will also setup other Transmissions settings here.

cd ..
ls
cd /etc/config
vi transmission


Now you are editing the transmission settings file. Press the ins key and change:
option enabled 1
Plug the Torrent drive into the USB port on the router. In Gargoyle go to the webshell and type: mount
We are looking for the mount name for the drive to use for torrent downloading. It might look something like this.
/tmp/usb_mount/499deee3-a38a-4384-b4f5-f32aa4aa6f91

Change the config file to look like so:
option config_dir '/tmp/usb_mount/499deee3-a38a-4384-b4f5-f32aa4aa6f91/transmission'
You need to set the download directory and the incomplete directories as well. If you want to access transmission remotely from the web. RPC White listing allows only computes at certain ip addresses to connect. It blocks all others hence the * added below:
option rpc_whitelist '127.0.0.1,192.168.*.*,*.*.*'
You will want to add a user name and password to the Remote section of Transmission to block any unauthorized access:

option rpc_username 'your username'
option rpc_password 'your password'


We should also cover our tracks relative to error reporting. These can be read with logread if we change:
option message_level 2

When done press ESC and now type ZZ to exit and save the config file. Close the SSH session window. In Gargoyle select “services” and tick transmission to start and auto start. Save the settings.

We can now connect using our RPC GUI program.
Create a connection. Use 192.168.1.1 (unless you changed it) and leave other options alone. Port 9091 is default and should work fine.

You need to stop and restart the Transmission service after editing and saving its config file with vi to get the changes to take effect.

All Torrents work better with their ports opened. Open port 51413 for the Transmission daemon to have incoming access from the WAN. Back to SSH and Putty.
vi /etc/config/firewall
Now add the following rule:
config rule
option target 'ACCEPT'
option src 'wan'
option proto 'tcpudp'
option dest_port '51413'
option name 'transmission-daemon'


If you want to control Transmission from any computer connected to the internet then also open port 9091.
config rule
option target 'ACCEPT'
option src 'wan'
option proto 'tcpudp'
option dest_port '9091'
option name 'transmission-daemon 9091'


Restart the firewall to activate the new settings.
/etc/init.d/firewall restart
Transmission GUI port test still indicates a closed port but the following web page indicates it is open. The client acts as if its open and I think the port test is a bug in v5.01 of the GUI client. May take some time after Transmission is started for the ports to indicate open on this web page.
http://www.yougetsignal.com/tools/open-ports/

If the port never opens on this web page also check the WAN IP under status in Gargoyle. You should not run double NAT and this IP listed should be your internet IP address. If its the address of your ADSL modem for example (10.0.0.1) then you are running double NAT and your ADSL modem is properly blocking the port. Either open the port in the ADSL modem or set it to use DMZ on its LAN connection to the WAN on the TP-Link.

Remote web access includes Android phones. Install the free Tornado app or Transdrone from Google Play. Use your internet IP address and port 9091 opened above. You will also need to enter the RPC user name and password you specified earlier.

Last setup part relates to Transmission memory usage. When you add larger torrents and they start to download you may find that the Router keeps stopping and restarting or locking up.

It has properly run out of memory! While free shows resources it isn't real accurate. Transmission will take most available resources when downloading large files. Make sure your EXT 4 formatted drive has a working swap partition. You should see the swap partition listed under Status/Overview in Gargoyle if its actually working and enabled or listed with more than 0 beside it with free.
If not, enable the swap partition in Putty:
vi /etc/config/fstab
Make sure there is a 1 beside enabled:
config 'swap'
option 'device' '/dev/sda2'
option 'enabled' '1'



Troubleshooting:

If something can go wrong it usually does at some point... Changing drives and even reformatting the same USB router drive results in a different drive ID. This means transmission will have to be setup again to work with the drive. This also means re-adding all the torrents and re-verifying them which is very slow for large torrents. (Hours…...)

The transmission/torrents folder contains the torrents. Move these out and rename them to get rid of the numbers off the end. You then need to double click each one which will add it back into the Transmission daemon. Transmission GUI needs to be setup as the default handler of torrent files for this to work. In the GUI under Application Settings/Advanced/Integration tick the two boxes.

Don't just rename these torrent files and put them back in the torrents folder. For some reason they will start and verify every time the daemon is started. A bug?

The resume folder contains the exact info relative to each torrent. Just delete the resume files. The torrents will not start to re-verify and download where they were left off unless these files are gone. The old resume files appear locked to the old hdd drive id and don't transfer over to the new drive. I tried….

Also there are some other issues if the Transmission daemon stops during the verifying stage. The files already verified will restart to seed or download where they left off but the ones in the queue will be stopped. This is open bug #4545. Don't click them to start. This will re-download and not re-verify. Manually click on verify instead. We don't want to re-download what we already have!

logread can help with other errors reported during boot. I actually solved one memory error in the log file by adding the following:
vi /etc/sysctl.conf
net.core.rmem_max=4194304
net.core.wmem_max=1048576





Hope this helps a few people. It really helped me. Nice to have all the needed information in one place! Enjoy Transmission!

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Transmission installed and running on 1.7.1

Post by Lantis »

Great comprehensive guide.
I was surprised you were able to run so many torrents at once without a crash however your tips about memory management and the EXT file system were right on point :)
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

ant75
Posts: 3
Joined: Mon Oct 26, 2015 9:16 am

Re: Transmission installed and running on 1.7.1

Post by ant75 »

Thanks. The router is running great. No crashes at all! Even with that number of Torrents. It just took a while to set it all up. Having that guide with all the info in the one place was a life saver!

Post Reply