qBittorrent Controller for Android

Other platforms, generic questions.
lgallard

Re: qBittorrent Controller for Android

Post by lgallard »

For those using HTTPS, here I explain how to use a self-signed certificate in qBittorrent Controller

Enjoy  8)
HomeDope

Re: qBittorrent Controller for Android

Post by HomeDope »

Hello there.
First of all thank you for the great app!

I would have a feature request =)

Wake-On-Lan.
Have an option to send WOL to that Specific Computer(IP / MAC) and wait it to wake and then add those torrent.

Thanks again!

~Home
ciaobaby

Re: qBittorrent Controller for Android

Post by ciaobaby »

Have an option to send WOL to that Specific Computer(IP / MAC) and wait it to wake and then add those torrent

If the computer is "sleeping" the client and therefore the WebUI interface, which is how this controller communicates with the client is NOT going to be running to 'receive a signal.
It is your BIOS settings that determine whether the computer will 'wake up' if it receives a request at the network interface.
HomeDope

Re: qBittorrent Controller for Android

Post by HomeDope »

ciaobaby wrote:
Have an option to send WOL to that Specific Computer(IP / MAC) and wait it to wake and then add those torrent

If the computer is "sleeping" the client and therefore the WebUI interface, which is how this controller communicates with the client is NOT going to be running to 'receive a signal.
It is your BIOS settings that determine whether the computer will 'wake up' if it receives a request at the network interface.
Yes I know this. Thats why I asked to Add an Option to Wol pc with Mac address before trying to connect the qbit Web ui
KitKat

Re: qBittorrent Controller for Android

Post by KitKat »

ciaobaby wrote:
Have an option to send WOL to that Specific Computer(IP / MAC) and wait it to wake and then add those torrent

If the computer is "sleeping" the client and therefore the WebUI interface, which is how this controller communicates with the client is NOT going to be running to 'receive a signal.
I believe hes asking for a WoL "magic packet" function.
Because modern pcs in sleep/low power mode actively listen on ports 7 & 9  they can be woken /w a crafted packet containing MAC address regardless of the state of running applications on the machine.
Last edited by KitKat on Tue Mar 29, 2016 5:45 pm, edited 1 time in total.
ciaobaby

Re: qBittorrent Controller for Android

Post by ciaobaby »

okay,


Not really possible in any case, as MAC addresses are not 'routable' over TCP. only over NET BIOS (WINS resolver)
KitKat

Re: qBittorrent Controller for Android

Post by KitKat »

[quote="ciaobaby"]
okay,
Not really possible in any case, as MAC addresses are not 'routable' over TCP. only over NET BIOS (WINS resolver)
[/quote]
Normally you'd be correct buuuuuut....
http://www.howtogeek.com/192642/how-to- ... -internet/

You can cheat by portforwarding :)
Also you can shell into a headless box on the LAN then route the WoL call from there but that setup is unrealistic (2 servers??)

Honestly i cant think of a use scenario where I'd want a dedicated seed box to enter a sleep state ;)
Last edited by KitKat on Tue Mar 29, 2016 8:48 pm, edited 1 time in total.
ciaobaby

Re: qBittorrent Controller for Android

Post by ciaobaby »

Sure, but what has that got to do with adding it as a 'feature' to the WEB UI or the Android controller App??

You set it up on your router and your computer BIOS or NiC and that is what will happen any time a request  received that is to be routed to that particular LAN IP.

No 'special feature' needed.

Whether the computer and the client WILL start up in sufficient time to service that request, is a whole different can of worms.
ciaobaby

Re: qBittorrent Controller for Android

Post by ciaobaby »

And .... ....

What happens when your 'sleeping' machine doesn't connect the drive or filing system BEFORE the client starts???
KitKat

Re: qBittorrent Controller for Android

Post by KitKat »

[quote="ciaobaby"]
And .... ....

What happens when your 'sleeping' machine doesn't connect the drive or filing system BEFORE the client starts???
[/quote]
RIP torrent progress hf force rechecking.

[quote="ciaobaby"]
Sure, but what has that got to do with adding it as a 'feature' to the WEB UI or the Android controller App??

You set it up on your router and your computer BIOS or NiC and that is what will happen any time a request  received that is to be routed to that particular LAN IP.

No 'special feature' needed.

Whether the computer and the client WILL start up in sufficient time to service that request, is a whole different can of worms.
[/quote]
I'd assume he's talking about the android controller app, because if he were at a PC there are alot of tools in existance already to perform this task..
I suspect the guy wants an all-in-one mobile solution for something hes doing or has encountered, where the "best" solution is NOT to let the machine sleep in the first place.
(Qbittorent > Tools > Options > Behaviour > Inhibit System Sleep When Torrents Are Active)
Or ya know plain old disable sleep mode..
Or failing that..  to use some form of RA tool to resolve/manage those scenarios outside of the qbittorent client.

Still you are correct, there are alot of problems related to this requested feature, thus why its a suggestion!
ciaobaby

Re: qBittorrent Controller for Android

Post by ciaobaby »

there are alot of problems related to this requested feature, thus why its a suggestion!
Of course,  that is why I am explaining why it is not really a viable suggestion, and hopefully making people learning or want to learn a bit more about networking before making impractical "feature" requests.

I'd assume he's talking about the android controller app
Given that this IS the forum thread for the Android 'app' I'd say that is a pretty reasonable assumption :)
KitKat

Re: qBittorrent Controller for Android

Post by KitKat »

ciaobaby wrote:
there are alot of problems related to this requested feature, thus why its a suggestion!
Of course,  that is why I am explaining why it is not really a viable suggestion, and hopefully making people learning or want to learn a bit more about networking before making impractical "feature" requests.
It is viable though, the only real concern would be loss of torrent state upon resuming due to slow to connect network drives, which in an "average user envrionment" (no network shares, everything saved to internal HDD) shouldn't be an overt concern and should merely be listed as a warning, infact its likely that the same "slow to connect" network drives would cause the same hypothesized faults/problems if qbittorent is set to start with the operating system without a delay.

IIRC qbittorent(libtorrent really..) currently has a bug(doesn't correctly set missing flag or no differentiation between deleted and missing files) regarding network drives & external HDDs when the computer goes into a sleep/hibernation state while qbittorent is still open. I cant remember the negative ramifications of it off the top of my head, i don't believe it was "overwriting 100% torrent with 0.01% torrent leading to massive dataloss" i think it was just simply torrents getting set to 0.00% and put into error state until force rechecked.
utorrent "fixes" this by not checking state of torrents until they are actually used.. and that behaviour is one of the last remaining "core" differences between utorrent and libtorrent.
I cant remember whether this has been resolved or not, i do recall sledgehammer been the person who brought the issue up on the libtorrent bug tracker & it been a relatively "new" issue.

ANYWAY BACK ON TOPIC!!
For casual use what hes asking is possible, android controller app only needs to supply fields for the user to enter an IP address(send here) MAC address(packet payload) and port (assuming portforward method for getting routed properly) this is all its required to do (along with actually craft & send the packet ofc..) the rest relies on the user setting their network up correctly..

If a user sets up their PC and network to work in that manner then 0 changes need to be made to qbittorent itself to support this as you are correct, this is entirely external to qbittorent itself, and thus why its a "viable" feature for the android based qbittorent controller and not qbittorent's internal webui itself.
The feature/addition itself may be outside the scope of the qbittorent android controller application however.

/e: the "alot of problems" i was was speaking about were hardware and user skill requirements, the hardware has to support portforwarding to ports 7 or 9, and the user has to be tech savvy enough to enable WoL and port forward himself correctly. There isnt a practical way of automating those things in either qbittorent or the controller application..
This would be an advanced user feature and to be completely honest, advanced users would NOT let their OS go to sleep with an active torrent client, because that is just begging for IO problems when it wakes..
Last edited by KitKat on Wed Mar 30, 2016 12:13 am, edited 1 time in total.
ciaobaby

Re: qBittorrent Controller for Android

Post by ciaobaby »

network drives would cause the same hypothesized faults/problems if qbittorent is set to start with the operating system without a delay.
The 'problem' is NOT hypothetical https://github.com/qbittorrent/qBittorr ... er-restart, and having a delayed start will not help in the case of an external drive being disconnected or switched off for any reason.

And this is not likely to be solved any time soon, as it is a libtorrent issue not qbittorrent.


All that said, it is up to lgallard if {s}he is willing to "MacGyver"  this into the controller but would it not be far simpler for the ONE person who apparently 'needs' this, to install an already working "App" https://play.google.com/store/apps/deta ... l&hl=en_GB
HomeDope

Re: qBittorrent Controller for Android

Post by HomeDope »

Heya. Thanks all for your replies.
I think that I was not really clear what is the situation atm.

Currently My qbit config is that it wont sleep IF torrents are downloading. What I Just wanted is this.

ADD torrent using app.
Ping the host PC to xheck IF its alive.
IF not then use wol to wake it up.
ADD torrents. Thats it.

Ofc I can send WoL commabd via My phone atm but I was Just asking IF it could Be added to app itself.
Thanks.
ciaobaby

Re: qBittorrent Controller for Android

Post by ciaobaby »

Ping the host PC to xheck IF its alive.
IF not then use wol to wake it up.
The Android qbittorrent controller communicates directly with qbittorrent which acts as a "web server", it does NOT communicate with the host machine directly. To do what you want, cannot be done with with qbittorrent, simply because if the machine  IS 'sleeping', qbittorrent is NOT running to act on the instructions from the WebUI.

You need to set this up on your network card and/or machine BIOS, so when your router forwards a packet to your machine for ANY requests to the port that your webui listens on it will send a "wake-up" call as well.

Simply "pinging" the IP will do absolutely nothing at all, because you are NOT sending a 'ping' to your machine. It is your router that responds to ICMP traffic ( PING, ToD Traceroute etc.), unless you forward ICMP ports to the machine you want to respond (Commonly known as a DMZ (DeMilitarised Zone) in LAN security terms which is NOT something you should do to a unless the machine has been 'hardened' against attacks and intrusions, and if the machine is running some edition of M$ Windows. Do not even contemplate about the merest possibility of  thinking of doing it.

Wake-up On LAN is really ONLY for use with machines that are all on the same LAN or LAN subnet it is not intended for WAN - LAN operations. IF you want a LAN machine to 'wake-up' to WAN activity, this HAS, HAS to be done by tour router sending the "magic packet".

The important bit you absolutely need to understand is that MAC (Media Access Control) addresses are NOT routable beyond your LAN, so a "magic packet" CANNOT be sent from a location that is outside (WAN/Internet) of your local area network (LAN) to a machine that is inside,
Post Reply