Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 02-27-2016, 03:08 PM   #1
reup
Connoisseur
reup began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jul 2009
Device: hp ipaq hx2750
trigger device connection manually

hello all,

a quicky, someone know how to stop the automatic detection of the device when calibre starts or when the device is connected ?

am looking for a way to have a button and trigger the connection manually

the reason is that sometime, I am copying something to my device and I start calibre. the device will be immediately passed offline then online again, but the copy will fail a this point.

also, if I start calibre with the device connected, calibre will hang until it has scan my device for ebook. that can take some time and be annoying if I need to just locate a book or some simple manipulation that does not concern the device

thanks for the help

reup
reup is offline   Reply With Quote
Old 02-27-2016, 03:20 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,054
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by reup View Post
hello all,

a quicky, someone know how to stop the automatic detection of the device when calibre starts or when the device is connected ?

am looking for a way to have a button and trigger the connection manually

the reason is that sometime, I am copying something to my device and I start calibre. the device will be immediately passed offline then online again, but the copy will fail a this point.

also, if I start calibre with the device connected, calibre will hang until it has scan my device for ebook. that can take some time and be annoying if I need to just locate a book or some simple manipulation that does not concern the device

thanks for the help

reup
You can disable the Device Driver in Preferences: Plugins
The gotcha is you have to go there to re-enable.
If you don't need driver features. Sharing Icon: Connect to folder
The 'Eject' item will be available on the Folder Device icon when connected
theducks is offline   Reply With Quote
Old 02-27-2016, 08:57 PM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Try the Unplugged plugin. It can disable and enable the device recognition at the touch of a toolbar button.
davidfor is offline   Reply With Quote
Old 02-27-2016, 09:48 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by davidfor View Post
Try the Unplugged plugin. It can disable and enable the device recognition at the touch of a toolbar button.
By time the OP clicks the button the already in-progress non calibre copy job would have failed

If I get my brain into gear and fathom how calibre-customize works maybe it can be used, see https://bugs.launchpad.net/calibre/+bug/1550791

My thinking is that the OP would start calibre via a script/batch file that disables their device before starting calibre - yes he/she will have to enable via preferences when they wanted calibre to see it, but they wont ever lose 20 minutes of copying the remastered Gone with the Wind again

BR

Last edited by BetterRed; 02-27-2016 at 09:54 PM.
BetterRed is offline   Reply With Quote
Old 02-27-2016, 10:26 PM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by BetterRed View Post
By time the OP clicks the button the already in-progress non calibre copy job would have failed
On my laptop, I have four or five seconds between calibre starting and the device jobs starting. I have used that in the past do do things before the calibre connects to the device. But, for this, it doesn't work.

Quote:
If I get my brain into gear and fathom how calibre-customize works maybe it can be used, see https://bugs.launchpad.net/calibre/+bug/1550791

My thinking is that the OP would start calibre via a script/batch file that disables their device before starting calibre - yes he/she will have to enable via preferences when they wanted calibre to see it, but they wont ever lose 20 minutes of copying the remastered Gone with the Wind again
The simplest solution is to turn Unpluggable on before closing calibre. That way calibre won't attempt to connect to the device when started. Of course, I'd never remember to do that. Maybe the plugin author could add an option to do this. That has a big advantage over disabling the driver as you don't need to restart calibre to re-enable it.
davidfor is offline   Reply With Quote
Old 02-27-2016, 10:40 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@reup - I think I have the kernel of an answer but I can't fully test because I don't have any working devices here. First a couple of questions.

What device driver do you have selected ?
What operating system do you use ?

If I assume Android and Windows then you could try starting calibre with a command script that looks like this

Code:
calibre-customize --disable-plugin "Android driver"
calibre
The first line disables the Android driver before calibre starts - I assume it sets a flag somewhere in calibre's configuration data, the second starts calibre. To have calibre see the device you'll have to enable the driver via Preferences->Plugins->Device interface plugins->Android Driver->Enable/Disable plug-in. I'm hoping that will trigger the scan.

@theducks, @davidfor etc - maybe someone with a working device can test this out, I'm thinking that after enabling it might necessary to use the Unplugged PI to trigger the scan. Or maybe the OP will need two command scripts - one that disables the device before starting calibre and another that enables the device first.

BR

Last edited by BetterRed; 02-27-2016 at 10:59 PM.
BetterRed is offline   Reply With Quote
Old 02-27-2016, 11:20 PM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by davidfor View Post
On my laptop, I have four or five seconds between calibre starting and the device jobs starting. I have used that in the past do do things before the calibre connects to the device. But, for this, it doesn't work.

The simplest solution is to turn Unpluggable on before closing calibre. That way calibre won't attempt to connect to the device when started. Of course, I'd never remember to do that. Maybe the plugin author could add an option to do this. That has a big advantage over disabling the driver as you don't need to restart calibre to re-enable it.
Nor would I... remember to turn Unpluggable on before closing calibre... so why would we expect the OP to remember.

I can't see what's wrong with the expecting the user to enable the device via Preferences - providing that will trigger the scan or there's some simple way to make that happen if it wasn't done at startup.

How about having an option in the Connect to device drop down - Enable and scan device now. Then the OP (and others with a similar need - like me) could disable before starting and select that option as when needed.

BR

Last edited by BetterRed; 02-27-2016 at 11:23 PM.
BetterRed is offline   Reply With Quote
Old 02-27-2016, 11:25 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I dont understand the premise of this thread. calibre scans devices in the background -- therefore having it detect a device does not prevent you from using it for other functions while it is scanning the device.

It is true (only on linux and os x) that for mtp devices only a single application can connect to a device a time. That's an OS limitation and only for MTP based devices at that.
kovidgoyal is offline   Reply With Quote
Old 02-28-2016, 12:16 AM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
When I first installed calibre its device scanning prevented me doing things in Autocad, the latter would lock up, probably that was Autocad's fault, but at that time Autocad was a critical application and its one I've used for ~20 years.

I don't keep many 'books' on my tablet and phone - about a dozen reference texts, and half dozen transient 'current books', so I don't need calibre to 'manage' them, hence they're ignored.

I'm also adverse to things that happen automatically with no opt-out. Automatic scanning would probably be acceptable if I used a dedicated ebook-reader, but not for a GP device like an iPad or Android. My photo downloader doesn't scan my phone when I plug it in, but only because I have it configured to scan and download on demand.

BR
BetterRed is offline   Reply With Quote
Old 02-28-2016, 02:06 AM   #10
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Either you want calibre to connect with a device, or not. You can disable a device driver, or blacklist Android devices -- surely that is enough.

As Kovid said -- calibre is still usable even while background processes scan the device, and any other program which locks up is obviously down to mysterious incompatibilities. Not sure why that would be the fault of the device connection per se.
eschwartz is offline   Reply With Quote
Old 02-28-2016, 03:52 AM   #11
reup
Connoisseur
reup began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jul 2009
Device: hp ipaq hx2750
Kovid and all,

sorry for the delay in answering, timezone difference is the culprit

for my work, I travel a lot, and need to access a lot of documentation on my Android tablet. but I read my books while in the plane or train

yesterday, I was copying few Gb of documentation on the tablet, and decided to open calibre to choose which book I would add to it.

as soon as Calibre started, the copy failed because LMDE/KDE could not see the device anymore. Calibre grab the device immediately.

yes it is MTP. to my understanding, Google has remove all other way for Linux to connect to an Android

this happens only once in a while, but I thought that it should be possible to select a moment when Calibre would connect to the device manually.

I will try some of the solutions provided in this thread and report the result here.

thanks all
reup is offline   Reply With Quote
Old 02-28-2016, 03:58 AM   #12
reup
Connoisseur
reup began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jul 2009
Device: hp ipaq hx2750
here is the first attempt with the disable-plugin option
Code:
reup ~ $ calibre-customize --disable-plugin "Android driver"
reup ~ $ calibre
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
I connect the tablet, open Dolphin (file manager) browse the device, open calibre as above. it went wrong at the "Attempt to reset device" kicked me out of the filemanager
reup is offline   Reply With Quote
Old 02-28-2016, 04:46 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The plugin you need to disable is not Android Driver, but

"MTP Device Interface"
kovidgoyal is offline   Reply With Quote
Old 02-28-2016, 04:48 AM   #14
reup
Connoisseur
reup began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jul 2009
Device: hp ipaq hx2750
will try, thanks Kovid
reup is offline   Reply With Quote
Old 02-28-2016, 05:41 AM   #15
reup
Connoisseur
reup began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jul 2009
Device: hp ipaq hx2750
it does work but I have to restart calibre to reactivate the plugin, or some other way that I haven't found yet

the plugin "unplugged" is great to start with no device detection then trigger it manually but it has to be activated before closing calibre to work at the next start.

I wonder if there is a command to start with the plugin in a certain state, but this has to be discuss with the plugin creator I suppose.
reup is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Migrating highlights & notes from manually uploaded content to a new Kindle device Analoggab Amazon Kindle 6 02-04-2015 11:26 PM
Send to device WIFI connection Smallpox Kobo Reader 15 10-30-2014 03:27 PM
WiFi Device Connection (wishlist) ericZollman Calibre 2 04-13-2014 06:43 AM
7.56: error on device connection jesscat Calibre 13 04-17-2011 06:19 PM
Device connection Bsibbo Calibre 2 10-23-2010 08:46 AM


All times are GMT -4. The time now is 08:35 AM.


MobileRead.com is a privately owned, operated and funded community.