I have been experimenting with my iPhone 8 running iOS 14.8.
The use of the apple_mfi_fastcharge loaded as a module seems to be working correctly provided that I use a custom udev rule. With that in place, then 'cat /sys/class/power_supply/apple_mfi_fastcharge/charge_type' returns Fast, otherwise Trickle. Connecting seems to work best if the phone is powered on and unlocked before plugging the USB connection. If there are problems, check for a usbmuxd process that was not killed when the phone was unplugged. |
Quote:
this will probably solve the charging problem but mine is with the tethering and I noticed when the apple_mfi_fastcharge module is built-in, tethering is working fine which is not the case when compiled as a module edit: all my tests are done with my own kernel and the slackware huge |
If, by tethering, you mean "the sharing of a mobile device's Internet connection with other connected computers" then no problem.
I am typing from a 32bit netbook running NetworkManager and the generic 5.14.5-smp kernel connected to the iPhone Code:
bash-5.1$ nmcli | head -2 |
When I just plug the usb cable with network sharing "on" on my phone
/var/log/messages Code:
Sep 19 15:56:10 blackstar kernel: usb 1-2: new high-speed USB device number 2 using xhci_hcd Code:
Sep 19 15:56:12 blackstar usbmuxd[2611]: [2] Cannot find device entry while removing USB device 0xcbea10 on location 0x10002 kernel huge 5.14.6 iphone 8 plus ios 15 GM (it's the same with my wife's iphone 11 + ios 14.x) everything is fine with apple_mfi_fastcharge=y hence this thread :-) /var/log/messages, when the phone is pluged in, with apple_mfi_fastcharge built-in with custom kernel 5.14.6 / 5.15.0-rc1 Code:
Sep 19 16:06:16 blackstar kernel: usb 1-2: new high-speed USB device number 3 using xhci_hcd Code:
blackstar :: ~ » nmcli |
Sorry. I cannot replicate on the setup I am posting from, a clean install of Slackware64-current booting the huge 5.14.5 kernel.
Code:
bash-5.1$ nmcli | head -2 |
Quote:
which work perfectly for me but not for others I don't try to understand, I keep what works :-) maybe I miss some settings on the phone, but I don’t really believe it |
I just tested it and got something working on an up to date -current64
However, I did have to do a bit of messing around to get it to work. I plugged in the phone and OKed whatever had popped up, and then turn on tethering but the interface didn't show up. After plugging and unplugging a few times nothing else had changed, so I killed usbmuxd (this gets started and stopped automatically by udev, see /lib/udev/rules.d/39-usbmuxd.rules) and this time plugged in the phone with the screen unlocked and tethering already turned on. After this I ran the Code:
# idevicepair pair Code:
# ip a I don't use network manager, so I just edited the rc.inet1.conf file to have the new interface use DHCP and setup the interface properly. Hopefully this helps. |
Quote:
It would be interesting if you could do a test with the MFI module built-in, if possible |
@kaott thx !
plug the phone unplug kill usbmuxd plug the phone back in - on the phone : popup "trust this device" --> YES network works as expected So, it seems that the problem is more related to usbmuxd. The thing I can't explain is, why I don't have to do this with the module compile built-in ... |
I don't know why I didn't think of it earlier!
I just put the module (apple-mfi-fastcharge) in the initrd ... Now, I can use the stock kernel :-) |
1 Attachment(s)
FYI
For those who are interested or have the problem iPhone tethering (usb) with iOS 17.3 works fine with usbmuxd 1.1.1 + this patch: https://cgit.sukimashita.com/usbmuxd...d-1.1.1.tar.gz https://gitlab.archlinux.org/archlin...ist-2.3.0.diff but not with the latest release, nor the one provided by Slackware With the stock one, the device is call (usb0) and never get an IP address (vs. eth0) Code:
NetworkManager[1052]: <warn> [1706643517.5289] device (usb0): Activation: failed for connection 'Wired connection 1' Code:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 EDIT: + a tip If you want the fast charge to be real, add this to /etc/udev/rules.d/99-fastcharge.rules Code:
# iPhone fast charge rule Code:
# cat /sys/class/power_supply/apple_mfi_fastcharge/charge_type |
The culprit seems to be this commit :
https://github.com/libimobiledevice/...2e3051a469ef50 Before, all works fine (without any patch) Reported: https://github.com/libimobiledevice/usbmuxd/issues/237 |
I just switched to an iPhone, and I've been trying to get USB tethering to work, with no luck so far. Here's what I've tried:
(1) With the stock Slackware 15.0 packages for libimobiledevice, usbmuxd, etc., it almost works: dhcpcd gets an address, but it doesn't seem to pass any network traffic after that. I can't do DNS lookups, or even ping the gateway. (2) I built usbmuxd 1.1.1, leaving all of the other packages alone. It wouldn't build with the arch patch mentioned by marav, but it built fine without it. (Did you rebuild/modify/remove any of the other libimobiledevice packages?) Anyway, that results in the exact same behavior as (1). (3) I built the latest versions of all of the libimobiledevice packages, checked out from git. That was even worse: dhcpcd didn't get an address. (4) With those brand new packages, I followed one of the comments on your usbmuxd bug report, and ran usbmuxd manually, with an environment variable: Code:
USBMUXD_DEFAULT_DEVICE_MODE=1 usbmuxd --user usbmux --udev I'm kind of wondering if there's some other issue here, but I'm not sure what to look for. If it matters, I'm not using NetworkManager, just plain old /etc/rc.d/rc.inet1. For what it's worth, wifi tethering works fine, and USB tethering with my Android phone also worked fine. |
I use this SlackBuild:
https://gitlab.com/maravtdm/slackbui...ref_type=heads Which is exactly the same than the stock one, except for the source archive Just run: ./fetch-usbmuxd_91aa7be.sh to grad the last commit that works (at least for me): usbmuxd-20230918_91aa7be.tar.xz and build/install the package |
Thanks for the reply.
I was getting the same results with that version of usbmuxd, so I finally ran tcpdump + wireshark to see if I could figure out what was going on. To my surprise, I could see my test ping packets going out and responses coming back, even though ping was reporting all dropped packets. After pounding my head against this for a while, I discovered that re-running my custom firewall script (*after* bringing up the tethered connection) fixed the problem. I'm really not sure what's going on there (this never happened with Android tethering, and I've been using pretty much the same firewall script on multiple Slackware machines for years), but I presume some bit of magic needs to be reset after bringing up eth1. For what it's worth, I can confirm that tethering now works for me with both your version of usbmuxd (usbmuxd-20230918_91aa7be) and with the Slackware 15.0 stock package. I haven't tried anything newer, because I'm pretty sure it will fail as you describe. |
All times are GMT -5. The time now is 02:34 AM. |