Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make utility work in the face of 2 issues found on Ubuntu 16.04 #44

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nitsanw
Copy link

@nitsanw nitsanw commented Sep 28, 2016

I hit 2 issues:

  1. Resource busy: need to set device to auto detach
  2. Interface number hardcoded to 0, but turned out to be 2
    I also added some output to help future failures easier to diagnose (I think). Arguably those should be put behind a 'quiet' flag. While doing this I formatted the errors (for the better I believe).
    This fixed issues [error -6] on Ubuntu 16.04  #42 (for me) and perhaps issue Doesn't work on Ubuntu 15.04 #34

…s 2 instead of 0. I expect this will break it for people who don't suffer from this issue.
@jpptinsley
Copy link

Not working for me, on Ubuntu 16.04. iPad starts to charge, but then is disconnected immediately and reattached. 645518.622571

Dmesg output; attach:

[645544.524004] usb 1-1.2: new high-speed USB device number 19 using ehci-pci
[645544.619859] usb 1-1.2: New USB device found, idVendor=05ac, idProduct=12ab
[645544.619862] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[645544.619864] usb 1-1.2: Product: iPad
[645544.619865] usb 1-1.2: Manufacturer: Apple Inc.
[645544.619866] usb 1-1.2: SerialNumber: 96e298e64b66d314bfcf732c6557e3309880e965
[645545.242317] ipheth 1-1.2:4.2: Apple iPhone USB Ethernet device attached
[645545.250896] ipheth 1-1.2:4.2 enp0s26u1u2c4i2: renamed from eth1

On using ipadcharge:

[645610.493810] ipheth 1-1.2:4.2: Apple iPhone USB Ethernet now disconnected
[645610.496005] ipheth 1-1.2:4.2: Apple iPhone USB Ethernet device attached
[645610.498969] ipheth 1-1.2:4.2 enp0s26u1u2c4i2: renamed from eth1
[645611.386749] ipheth 1-1.2:4.2: ipheth_rcvbulk_callback: urb status: -71
[645611.699106] usb 1-1.2: USB disconnect, device number 19
[645611.713936] ipheth 1-1.2:4.2: Apple iPhone USB Ethernet now disconnected
[645611.913944] usb 1-1.2: new high-speed USB device number 20 using ehci-pci
[645612.011752] usb 1-1.2: New USB device found, idVendor=05ac, idProduct=12ab
[645612.011757] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[645612.011760] usb 1-1.2: Product: iPad
[645612.011762] usb 1-1.2: Manufacturer: Apple Inc.
[645612.011764] usb 1-1.2: SerialNumber: 96e298e64b66d314bfcf732c6557e3309880e965
[645612.602942] ipheth 1-1.2:4.2: Apple iPhone USB Ethernet device attached
[645612.606385] ipheth 1-1.2:4.2 enp0s26u1u2c4i2: renamed from eth1

Error message I think is: ipheth 1-1.2:4.2: ipheth_rcvbulk_callback: urb status: -71

@nitsanw
Copy link
Author

nitsanw commented Oct 10, 2016

It seems like your ipad is setup for tethering and that a related failure is resulting in a disconnect. This fix is not geared at fixing this new issue.
Is this patch an improvement on the current version?

@jpptinsley
Copy link

My iPad doesn't even have a cellular chip, it's a wifi-only one. No tethering options show up in the pad's settings. I can't test the patch, because my Pad refuses to charge with it. It does appear to be getting further than the current version, however, yes.

@nitsanw
Copy link
Author

nitsanw commented Oct 25, 2016

@jpptinsley can you please send the "lsusb -v" output from your setup with the ipad connected, maybe there's a clue there

@Tatsh
Copy link
Contributor

Tatsh commented Jan 18, 2018

I'm wondering if this has to do with usbmuxd or ipheth. My pull request #48 tries to solve this issue but I do not think it does quite yet. It waits for bConfigurationValue to be 1 before trying to charge.

@DivineOmega
Copy link

This fork worked fine for me. 👍

@Tatsh
Copy link
Contributor

Tatsh commented Dec 19, 2018

Please follow my fork here: https://github.com/Tatsh/ipad_charge/

I will be supporting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants