LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-19-2021, 04:19 AM   #16
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,367

Rep: Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748

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.
 
Old 09-19-2021, 05:09 AM   #17
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,334

Original Poster
Rep: Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049
Quote:
Originally Posted by allend View Post
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.
Thank you
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

Last edited by marav; 09-19-2021 at 05:10 AM.
 
Old 09-19-2021, 08:36 AM   #18
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,367

Rep: Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748
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
eth123: connected to Wired connection 2
	"Apple iPhone5/5C/5S/6"
 
Old 09-19-2021, 08:59 AM   #19
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,334

Original Poster
Rep: Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049
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
Sep 19 15:56:10 blackstar kernel: usb 1-2: New USB device found, idVendor=05ac, idProduct=12a8, bcdDevice=10.05
Sep 19 15:56:10 blackstar kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 19 15:56:10 blackstar kernel: usb 1-2: Product: iPhone
Sep 19 15:56:10 blackstar kernel: usb 1-2: Manufacturer: Apple Inc.
Sep 19 15:56:10 blackstar kernel: usb 1-2: SerialNumber: 153a6d81d93e9c3175a23556c638ac7f145c844d
Sep 19 15:56:12 blackstar mtp-probe: checking bus 1, device 2: "/sys/devices/pci0000:00/0000:00:08.1/0000:03:00.3/usb1/1-2" 
Sep 19 15:56:12 blackstar mtp-probe: bus: 1, device: 2 was not an MTP device 
Sep 19 15:56:11 blackstar kernel: usbcore: registered new device driver apple-mfi-fastcharge
Sep 19 15:56:11 blackstar kernel: usbcore: registered new interface driver ipheth
/var/log/syslog
Code:
Sep 19 15:56:12 blackstar usbmuxd[2611]: [2] Cannot find device entry while removing USB device 0xcbea10 on location 0x10002
I didn't remove anything

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
Sep 19 16:06:16 blackstar kernel: usb 1-2: New USB device found, idVendor=05ac, idProduct=12a8, bcdDevice=10.05
Sep 19 16:06:16 blackstar kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 19 16:06:16 blackstar kernel: usb 1-2: Product: iPhone
Sep 19 16:06:16 blackstar kernel: usb 1-2: Manufacturer: Apple Inc.
Sep 19 16:06:16 blackstar kernel: usb 1-2: SerialNumber: 153a6d81d93e9c3175a23556c638ac7f145c844d
Sep 19 16:06:17 blackstar mtp-probe: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:08.1/0000:03:00.3/usb1/1-2" 
Sep 19 16:06:17 blackstar mtp-probe: bus: 1, device: 3 was not an MTP device 
Sep 19 16:06:16 blackstar kernel: ipheth 1-2:4.2: Apple iPhone USB Ethernet device attached
Sep 19 16:06:17 blackstar NetworkManager[1321]: <info>  [1632060377.3571] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/5)
Sep 19 16:06:17 blackstar NetworkManager[1321]: <info>  [1632060377.3736] device (eth0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Sep 19 16:06:17 blackstar NetworkManager[1321]: <info>  [1632060377.3757] settings: (eth0): created default wired connection 'Wired connection 1'
Sep 19 16:06:17 blackstar kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sep 19 16:06:18 blackstar NetworkManager[1321]: <info>  [1632060378.4595] device (eth0): carrier: link connected
Sep 19 16:06:18 blackstar NetworkManager[1321]: <info>  [1632060378.4600] device (eth0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
Sep 19 16:06:18 blackstar NetworkManager[1321]: <info>  [1632060378.4612] policy: auto-activating connection 'Wired connection 1' (9933af47-2dea-3b3b-bb75-2739b4404193)
Sep 19 16:06:18 blackstar NetworkManager[1321]: <info>  [1632060378.4618] device (eth0): Activation: starting connection 'Wired connection 1' (9933af47-2dea-3b3b-bb75-2739b4404193)
Sep 19 16:06:18 blackstar NetworkManager[1321]: <info>  [1632060378.4619] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Sep 19 16:06:18 blackstar NetworkManager[1321]: <info>  [1632060378.4622] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Sep 19 16:06:18 blackstar NetworkManager[1321]: <info>  [1632060378.4629] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Sep 19 16:06:18 blackstar NetworkManager[1321]: <info>  [1632060378.4630] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Sep 19 16:06:18 blackstar NetworkManager[1321]: <info>  [1632060378.4643] dhcp4 (eth0): dhcpcd started with pid 3230
Code:
blackstar :: ~ » nmcli
eth0: connecté à Wired connection 1
        "Apple iPhone5/5C/5S/6"
        ethernet (ipheth), 82:B0:3D:59:07:15, hw, mtu 1500
        ip4 par défaut
        inet4 172.20.10.6/28
        route4 0.0.0.0/0
        route4 172.20.10.0/28
        inet6 fe80::1ab:5947:62ab:1551/64
        route6 fe80::/64
anyway, if nobody else had issue with this module, I could deal with it :-) (as long as I don't ask my wife to recompile the kernel)

Last edited by marav; 09-19-2021 at 09:16 AM.
 
Old 09-19-2021, 01:05 PM   #20
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,367

Rep: Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748
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
eth1: connected to Wired connection 2
	"Apple iPhone5/5C/5S/6"
 
1 members found this post helpful.
Old 09-19-2021, 01:18 PM   #21
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,334

Original Poster
Rep: Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049
Quote:
Originally Posted by allend View Post
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
eth1: connected to Wired connection 2
	"Apple iPhone5/5C/5S/6"
In these cases, it's like NFS or other things we've seen recently,
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

Last edited by marav; 09-19-2021 at 01:22 PM.
 
Old 09-19-2021, 04:24 PM   #22
kaott
Member
 
Registered: Mar 2020
Posts: 63

Rep: Reputation: Disabled
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
as root just to be sure. After this the interface showed up under
Code:
 # ip a
Now it seems to consistently show the new network interface whenever the device is plugged in.

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.
 
Old 09-19-2021, 04:41 PM   #23
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,334

Original Poster
Rep: Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049
Quote:
Originally Posted by kaott View Post
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
as root just to be sure. After this the interface showed up under
Code:
 # ip a
Now it seems to consistently show the new network interface whenever the device is plugged in.

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.
Thx for your sharing
It would be interesting if you could do a test with the MFI module built-in, if possible
 
Old 09-19-2021, 05:20 PM   #24
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,334

Original Poster
Rep: Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049
@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 ...
 
Old 01-06-2022, 07:47 AM   #25
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,334

Original Poster
Rep: Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049
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 :-)
 
Old 01-30-2024, 02:25 PM   #26
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,334

Original Poster
Rep: Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049
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'
vs.
Code:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.20.10.3  netmask 255.255.255.240  broadcast 172.20.10.15
        inet6 2a0d:e487:115f:eabb:7e93:4e55:93d6:7eb5  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::85b9:1ec:d802:580  prefixlen 64  scopeid 0x20<link>
The phone is also browsable with Dolphin (thanks to kio-extras)

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
SUBSYSTEM=="power_supply", ACTION=="change", ENV{POWER_SUPPLY_NAME}="apple_mfi_fastcharge", RUN+="/usr/bin/env sh -c 'echo Fast > /sys/class/power_supply/apple_mfi_fastcharge/charge_type'"
Code:
# cat /sys/class/power_supply/apple_mfi_fastcharge/charge_type
Fast
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20240130_212601.png
Views:	11
Size:	22.7 KB
ID:	42501  

Last edited by marav; 01-31-2024 at 05:39 PM.
 
3 members found this post helpful.
Old 01-31-2024, 05:04 PM   #27
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,334

Original Poster
Rep: Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049
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

Last edited by marav; 01-31-2024 at 05:38 PM.
 
1 members found this post helpful.
Old 04-17-2024, 01:35 AM   #28
derekn13
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 52

Rep: Reputation: 29
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
That gets me back to the earlier behavior: dhcpcd works, but no network traffic after that.

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.
 
Old 04-17-2024, 02:39 PM   #29
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,334

Original Poster
Rep: Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049Reputation: 4049
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

Last edited by marav; 04-17-2024 at 02:40 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iPhone Tethering in Slackware 14.X scarrz Slackware 1 01-02-2015 11:43 AM
Tethering iPhone 3GS to Ubuntu 10.04 issue androandra Linux - Networking 0 02-25-2012 02:57 PM
[SOLVED] iPhone 3G - Bluetooth Internet Tethering with Ubuntu 8.04 Maxximiliann Linux - Wireless Networking 7 02-16-2010 06:48 PM
LXer: iPhone Tethering on Ubuntu 9.10 (Karmic) LXer Syndicated Linux News 0 01-11-2010 01:11 PM
Has anyone figured out how to use tethering with an AT&T iphone on Debian? worm5252 Linux - Software 3 01-06-2010 03:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration