Tethering iPhone (ios 14.5.1) on WRT3200ACM on 21.02 rc1

I'm trying to make tethering work on my WRT3200ACM on OpenWrt 21.02-rc1, in combination with my iPhone on ios 14.5.1 (for internet backup)

I have the same setup on my Pi 4B on snapshot, there all is fine. So I think the problem is that I don't know what device to add in the config. (eth1 on my Pi 4B)

How can I find out what device to add? Specially because 21.02 rc1 uses LAN/WAN as devices instead of eth0 / eth1 etc.

Used this example;

dmesg output only shows;

[ 4232.772686] usb 2-1: new high-speed USB device number 11 using xhci-hcd

eth0 and eth1 are in use, so I asume it’s need te be eth2. But no luck

I am having a similar problem, and I suspect this may be an issue with the 21.02.0-rc2 and prior release candidate not loading the ethernet interface correctly for an iPhone.

I'm running Openwrt 21.02.0-rc2 on an EA6350v3. This router uses ethernet device names like eth0, eth1, etc. On Openwrt 19.07.7, the iPhone would appear as eth2. On the 21.02.0-rc2 release candidate, I don't see any new ethernet device created.

I installed these packages and plugged in the iphone:

opkg install kmod-usb-net-ipheth usbmuxd libimobiledevice usbutils

ps shows usbmuxd is running

/usr/sbin/usbmuxd --systemd

Under dmesg, I see the following after I plug in the iPhone:

[  810.942063] usb 1-1: new high-speed USB device number 3 using xhci-hcd

ifconfig eth2 shows:

ifconfig: eth2: error fetching interface information: Device not found
1 Like

It doesn't start just by plugging the phone in. You have to go to the phone screen, open Settings and enable USB tethering.

That should trigger some more log messages as the ipeth driver attaches to the phone and creates a virtual Ethernet port. The name of the port will be in the log.

Install the following packages to make it work. After install the phone asks to trust the computer.

kmod-usb-net
kmod-usb-net-cdc-ether
kmod-usb-net-rndis
kmod-usb-net-ipheth
kmod-usb2
usbutils
usbmuxd
libusbmuxd
libimobiledevice
libimobiledevice-utils

In my case (on my WRT3200ACM the device is eth1)

my logread at connection:

root@OpenWrt:~# logread -f
Tue Jun  1 22:45:43 2021 kern.info kernel: [58478.491569] usb 2-1: new high-speed USB device number 2 using xhci-hcd
Tue Jun  1 22:45:43 2021 daemon.notice netifd: Interface 'TETHERINGWAN' is enabled
Tue Jun  1 22:45:43 2021 daemon.err usbmuxd[5305]: [22:45:43.272][3] Connecting to new device on location 0x20002 as ID                                         1
Tue Jun  1 22:45:43 2021 daemon.err usbmuxd[5305]: [22:45:43.273][3] Connected to v2.0 device 1 on location 0x20002 with                                         serial number 00008030-000A18860213802E
Tue Jun  1 22:45:43 2021 kern.info kernel: [58478.681906] ipheth 2-1:4.2: Apple iPhone USB Ethernet device attached
Tue Jun  1 22:45:44 2021 daemon.notice netifd: Network device 'eth1' link is up
Tue Jun  1 22:45:44 2021 daemon.notice netifd: Interface 'TETHERINGWAN' has link connectivity
Tue Jun  1 22:45:44 2021 daemon.notice netifd: Interface 'TETHERINGWAN' is setting up now
Tue Jun  1 22:45:44 2021 kern.info kernel: [58479.892605] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Tue Jun  1 22:45:44 2021 daemon.notice netifd: TETHERINGWAN (28994): udhcpc: started, v1.33.1
Tue Jun  1 22:45:44 2021 daemon.notice netifd: TETHERINGWAN (28994): udhcpc: sending discover
Tue Jun  1 22:45:44 2021 daemon.notice netifd: TETHERINGWAN (28994): udhcpc: sending select for 172.20.10.12
Tue Jun  1 22:45:44 2021 daemon.notice netifd: TETHERINGWAN (28994): udhcpc: lease of 172.20.10.12 obtained, lease time                                         85536
Tue Jun  1 22:45:44 2021 daemon.notice netifd: Interface 'TETHERINGWAN' is now up

Thanks for the ideas. I had hotspot already enabled on my iPhone, so that wasn't it. I also rebooted the iphone again.

I noticed that when I plug in the device to the usb cable to the router, it does not prompt me on the phone to trust the computer. It used to do so on 19.07.7, but not on 21.02.0-rc2.

As a test, when I run idevicepair pair, I get

No device found

For troubleshooting, I ran usbmuxd -v -f --systemd which resulted in:

[21:00:04.812][3] usbmuxd v1.1.1 starting up
[21:00:04.813][4] Creating socket
[21:00:04.813][4] Initializing USB
[21:00:04.813][3] Using libusb 1.0.24
[21:00:04.816][4] Registering for libusb hotplug events
[21:00:04.816][4] 0 devices detected
[21:00:04.816][3] Initialization complete
[21:00:04.816][3] Enabled exit on SIGUSR1 if no devices are attached. Start a new instance with "--exit" to trigger.

When I then plug in the phone, nothing happened though. I wonder if usbmuxd is not picking up a hotplug event?

I used to have this working on 19.07.7. Has anyone else been successful tethering an iPhone on the new release candidates (21.02.0-rc2 or 21.02.0-rc1)?

I was struggling to to make this work, but after adding all the packages as I mentioned t it work perfectly.
I can't test it on the stable release for you. Al (only 2 :wink: )my devices are on snapshot at the moment.

Did you try another cable to connect the phone by any change? On another forum I did read some simmilar problem. This was fixed by just using another cable. (can't find the topic though)

In my case it does start by just plugging the phone in.

When you plug in the phone (iphone in my case) you get (the first time only) the trust question, you fill in your passcode and it starts tethering. Offcourse if tethering was not activated before you have to do this.

I think the issue with Openwrt 21.02.0-rc2 may have to do with libusb. When I type lsusb -t to show the tree of the USB connections, I get the following which shows the iPhone connected:

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 3, If 0, Class=, Driver=, 480M

The last line (Port 1, Dev 3, IF 0) is the iPhone. However, the Class= and Driver= are blank, which makes me think this version of libusb isn't recognizing the device to pass to usbmuxd. Previously on 19.07.7 that showed Class=Vendor Specific Class or something similar. On 21.02.0-rc2 it is blank.

Here is the same output running on 19.07.7:

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Imaging, Driver=, 480M
    |__ Port 1: Dev 2, If 1, Class=Vendor Specific Class, Driver=usbfs, 480M
    |__ Port 1: Dev 2, If 2, Class=Vendor Specific Class, Driver=ipheth, 480M

On 19.07.7, it shows the Vendor Specific Class and ipheth Driver.

Back on 21.02.0, when I try to get more details on the iPhone using lsusb -D /dev/bus/usb/001/003, I get:

Cannot open /dev/bus/usb/001/003

That same command returns a bunch of information about the iPhone on Openwrt 19.07.7.

I get a bunch of errors re: dwc3 in my syslog when attempting to tether an iOS device on a 21.02 snapshot build. It works fine on 19.07.7 on my device (ea6350) too. My guess is it has something to do with the removal of kmod-usb-dwc3-of-simple. I think its still in the kernel tree so I'm attempting to build 21.02 with it patched back in. Hopefully I'm on to something...

Interesting idea. Let me know if it works.

It looks like the kmod-usb-dwc3-of-simple for ipq40xx devices was replaced by a newer kmod-usb-dwc3-qcom when the kernel was migrated to 4.19. See here
http://lists.openwrt.org/pipermail/openwrt-devel/2019-June/023365.html

I have the newer kmod-usb-dwc3-qcom installed on 21.02.0-rc2, but unable to se any Vendor Specific Class or ipheth Driver when I plug in the phone using lsusb -t.

For now, I'm going back to 19.07.7.

I have a WRT3200ACM on snapshot and GL-MT1300 on 19.07.7 both are tethering fine with the packages I used:

kmod-usb-net
kmod-usb-net-cdc-ether
kmod-usb-net-rndis
kmod-usb-net-ipheth
kmod-usb2
usbutils
usbmuxd
libusbmuxd
libimobiledevice
libimobiledevice-utils

So there must be something else in the way.

Adding kmod-usb-dwc3-of-simple back in didn't fix anything unfortunately.

From what I can tell it works on some target platforms and not others (ipq80xx and ramips work, while ipq40xx, rockchip, and mvebu do not*) on 21.02 builds, and additionally it may have been fixed in master according to the second thread linked below, although I haven't even tried to find the relevant commit(s).

*I don't know if this can be said/is true for all sub-targets of each respective target

Edit:
I searched for commits in master (I'm guessing that's what @richardhd from the second thread I linked was building from) that referenced any of the things involved in iOS tethering between the dates of 2-20-2021 and 2-23-2021 (or at least I think I did?) and one seems like it might be worth checking out https://github.com/openwrt/openwrt/commit/4b37e3bc2b2a079c996b6d97b8d3dbbd4ba6eb62.

1 Like

You are correct. The issue with ea6350v3 / ipq40xx (and possibly other devices like rockchip and mvebu) relates to the libusb package, which was recently fixed in snapshot after 21.02.0-rc2. The libusb package is now version 1.0.24-4 in snapshot.

While we wait for the next release candidate, I was able to manually install latest libusb package from snapshot onto an installation of 21.02.0-rc2. This will work as long as they don't upgrade the kernel in snapshot. Here's an example:

cd /tmp
wget https://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/base/libusb-1.00_1.0.24-4_arm_cortex-a7_neon-vfpv4.ipk
opkg install libusb-1.00_1.0.24-4_arm_cortex-a7_neon-vfpv4.ipk

iPhone tethering now works for me on 21.02.0-rc2 on an ea6350v3 / ipq40xx. Thanks everyone for the help and ideas.

1 Like

I just upgraded to 21.02.0-rc3 and this issue is with libusb is still there. It looks like that package was fixed in the current snapshot, though.

Here are the packages I installed to get it to work with 21.02.0-rc3. Note the key step is not to use libusb from that release, but instead use the version of that package from snapshot. Two of the packages had dependencies on libusb, so I had to install those separately and ignore dependencies so that it will use the libusb from snapshot:

Here are the steps to install all the packages to get iPhone tethering working on ea6350v3 running 21.01.0-rc3:

opkg install kmod-usb-net-ipheth libimobiledevice 
cd /tmp
wget https://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/base/libusb-1.0-0_1.0.24-4_arm_cortex-a7_neon-vfpv4.ipk
opkg install libusb-1.0-0_1.0.24-4_arm_cortex-a7_neon-vfpv4.ipk
opkg –nodeps install usbmuxd usbutils