01-30-2015, 01:52 PM | #1 |
Wizard
Posts: 1,176
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
Suggested workaround for libimobiledevice detecting wifi idevices
I suspect quite a few idevice owners are having problems when trying to get IOSRA/Marvin plugins working because of a known problem in the libimobiledevice library.
Please see here for an instance of the problem: https://www.mobileread.com/forums/sho...d.php?t=255105. I actually use a private build of libimobiledevice in which I have added a small workaround so that wifi detected idevices are ignored. I raised this issue (with my suggested workaround/fix) some time ago on GitHub: https://github.com/libimobiledevice/...muxd/issues/22, where it is acknowledged that there is a problem, but the issue is still open. One option would be to just add my existing fix to the Calibre libimobiledevice source, so at least plugin users will get the benefit of it, whilst we await an official fix. |
01-30-2015, 09:32 PM | #2 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Does this require patching of libimobiledevice.py or the actual usbmuxd library?
|
01-31-2015, 03:18 AM | #3 |
Wizard
Posts: 1,176
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
The usbmuxd library (Windows & Linux).
In libusbmuxd.c, usbmuxd_get_device_list, add a check for product_id != 0, e.g., in the Windows version (Linux should be very similar): Code:
got_device_list: // explicitly close connection UNLOCK; socket_close(sfd); // create copy of device info entries from collection newlist = (usbmuxd_device_info_t*)malloc(sizeof(usbmuxd_device_info_t) * (collection_count(&tmpdevs) + 1)); dev_cnt = 0; FOREACH(usbmuxd_device_info_t *di, &tmpdevs, usbmuxd_device_info_t *) { /* Devices connected by WIFI or USB may be reported. Ignore any without a valid USB product_id, i.e., WIFI connected. */ if (di && di->product_id != 0) { memcpy(&newlist[dev_cnt], di, sizeof(usbmuxd_device_info_t)); free(di); dev_cnt++; } } ENDFOREACH collection_free(&tmpdevs); |
01-31-2015, 08:35 AM | #4 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
OK I will add that patch the next time I am working on the build system.
|
02-01-2015, 02:46 AM | #5 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Done.
|
02-01-2015, 07:01 AM | #6 |
Wizard
Posts: 1,176
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
Great, thanks.
|
02-07-2015, 05:52 AM | #7 |
Wizard
Posts: 1,176
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
Excuse me for asking, but is this change meant to be in 2.19? Because I have just tried 2.19 and it is still detecting idevices via WIFI.
For my reference, to repro the bug: Power up two idevices, both connected to the same WIFI network. Do not connect either idevices via USB. Run Calibre, get error: iOSRA plugin not installed. Re-install plugin manually, to get the error: Code:
calibre, version 2.19.0 ERROR: Plug-in installation failed: A problem occurred while installing this plug-in. This plug-in will now be uninstalled. Please post the error message from the details below into the forum thread for this plug-in and restart Calibre. Traceback (most recent call last): File "site-packages\calibre\gui2\dialogs\plugin_updater.py", line 712, in _install_clicked File "site-packages\calibre\customize\ui.py", line 392, in add_plugin File "site-packages\calibre\customize\ui.py", line 559, in initialize_plugin InvalidPlugin: Initialisation of plug-in Traceback (most recent call last): File "site-packages\calibre\customize\ui.py", line 553, in initialize_plugin File "calibre_plugins.ios_reader_apps.__init__", line 916, in initialize File "calibre_plugins.ios_reader_apps.__init__", line 1245, in _get_connected_device_info InitialConnectionError: Unable to connect to iDevice failed with traceback: Traceback (most recent call last): File "site-packages\calibre\customize\ui.py", line 553, in initialize_plugin File "calibre_plugins.ios_reader_apps.__init__", line 916, in initialize File "calibre_plugins.ios_reader_apps.__init__", line 1245, in _get_connected_device_info InitialConnectionError: Unable to connect to iDevice Thanks. |
02-07-2015, 07:15 AM | #8 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yes it is supposed to be in 2.19. Unfortunately, I have no iDevices, so it is hard for me to test it. This is on windows 64 or 32bit?
|
02-07-2015, 07:23 AM | #9 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Never mind, I realized the updated dlls are present on linux and os x but not windows, because the windows build system requires an extra manual step, which I forgot. Will be in next release.
|
02-07-2015, 07:52 AM | #10 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Here are builds with the updated dlls included, let me know if they work:
http://download.calibre-ebook.com/betas/ |
02-08-2015, 03:18 AM | #11 |
Wizard
Posts: 1,176
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
I have tried the beta (Win 64 bit) and it is working fine now. Thanks a lot.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building libiMobileDevice and missing dependencies | ShellShock | Development | 2 | 10-26-2014 11:52 AM |
Marvin not regognising my idevices | Josieb1 | Marvin | 13 | 09-02-2014 04:10 PM |
Calibre + Apple iDevices: Start here | GRiker | Devices | 2 | 06-13-2012 03:45 PM |
Calibre not detecting my new WiFi Kobo | Joyful | Devices | 41 | 03-19-2011 03:26 PM |
Calibre 0.7 + Apple iDevices (Archived) | GRiker | Devices | 209 | 01-20-2011 01:07 PM |