Open botcs opened 8 years ago
I get the same error on mine with an iPad Air 2. Have you found a workaround?
not yet :\
Had the same issue, after some digging around came up with following solution:
// hacked into set_charging_mode, replace the claim_interface block with this
// Resource Busy issue is caused because kernel is attached to device, so enable auto detach
if ((ret = libusb_set_auto_detach_kernel_driver(dev_handle, 1)) < 0) {
fprintf(stderr, "ipad_charge: set auto detach failed: error %d\n", ret);
fprintf(stderr, "ipad_charge: %s\n", libusb_strerror(ret));
return ret;
}
// Original code assumes the bInterfaceNumber is always 0, for me it turned out to be 2.
// You can use lsusb to find out which interface numbers are available
if ((ret = libusb_claim_interface(dev_handle, 2)) < 0) {
fprintf(stderr, "ipad_charge: unable to claim interface: error %d\n", ret);
fprintf(stderr, "ipad_charge: %s\n", libusb_strerror(ret));
goto out_close;
}
I am running Ubuntu 16.04 on an MBP 11,1 and charging and iPad4. Seems to work now.
To find the bInterfaceNumber I used lsusb -v which give you much gory detail. Hope this helps
Hi nitsanw! I'm new to Linux and am having the same problem. Where exactly do I insert and/or create a new file with the content you posted above? I'm a little reluctant to type anything into the Terminal, without verifying beforehand that that's where the code should go :) Thanks in advance!
The fix is now on a fork: https://github.com/nitsanw/ipad_charge I need to further test it and I will submit as PR.
Thanks!
@botcs @JanUmbhau WFM :), try the PR and report back
make succesful, but still not WFM.
when iPad mini connected, returns the following: ./ipad_charge ipad_charge: no such device or an error occured
However my iPad charges... a bit nasty, I don't know where could be actually the problem
Thanks, @nitsanw! Your patch worked for me. Here is a compiled version of ipad_charge as patched: http://02.lv/f/2017/01/21/ipad_charge
@0ki , thanks a lot. This file help me.
Thanks @nitsanw! Patch works great!
it worked for me too, thanks a lot!
Worked well on 14.04 but after upgrading: ipad_charge: unable to claim interface: error -6 ipad_charge: Resource busy ipad_charge: error setting charge mode ipad_charge: no such device or an error occured
I have iPad mini 1