iPhone network tethering through USB

Hi,

I’m using Fedora 38 (the Workstation variant, with GNOME). My system is fully up-to-date.

I recently moved to an apartment where I don’t have cable network yet. I need to rely on my phone’s mobile network. This is an iPhone running iOS 16.6. (Yes yes, I do know that iOS is non-free software. There were some constraints on that choice.)

Currently, I’m connecting my laptop to my phone through Bluetooth. Although this works well, the speed leaves somewhat to be desired. For example, when I upgraded my computer today (precisely to make sure I had all recent upgrades before asking here), it took multiple hours to download all the packages. In the past, I’ve noticed that connecting the laptop to the phone through USB yielded much better throughput. However, I’m having trouble getting that to work.

Not more than a few months ago (definitely on the same Fedora version, but there have been Fedora and iOS upgrades in the meantime), when I connected the two by USB, it more or less “just worked”. I don’t remember how exactly it was (since I did not have a reason to pay much attention), but I remember that after plugging, the Files app (i.e., Nautilus) gained a media much like a USB stick, where I could access some files on the iPhone, and the GNOME Settings app allowed me to do the connection somewhere in the network settings.

Trying this recently, none of this worked. After reading a bit on how it’s supposed to function internally, I’m quite confused by a couple points:

  • While absolutely nothing is connected to the laptop, neither through USB nor through Bluetooth, I have
$ idevicepair list
00008110-000A250A02FB801E

What is this device? Running the unpair subcommand gives

$ idevicepair unpair
No device found.
  • I read that the usbmuxd daemon should be automatically activated by udev whenever a device is plugged in. Indeed, I see this file:
$ cat /usr/lib/udev/rules.d/39-usbmuxd.rules
# usbmuxd (Apple Mobile Device Muxer listening on /var/run/usbmuxd)

# systemd should receive all events relating to device
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*|5ac/8600/*", TAG+="systemd"

# Initialize iOS devices into "deactivated" USB configuration state and activate usbmuxd
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*|5ac/8600/*", ACTION=="add", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}="0", OWNER="usbmuxd", ENV{SYSTEMD_WANTS}="usbmuxd.service"

# Make sure properties don't get lost when bind action is called
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*|5ac/8600/*", ACTION=="bind", ENV{USBMUX_SUPPORTED}="1", OWNER="usbmuxd", ENV{SYSTEMD_WANTS}="usbmuxd.service"

# Exit usbmuxd when the last device is removed
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*|5ac/8600/*", ACTION=="remove", RUN+="/usr/sbin/usbmuxd -x"

Yet, after plugging:

$ systemctl is-active usbmuxd
inactive

Even when I force it through systemctl start usbmuxd, nothing happens, although the log looks ok:

$ systemctl status usbmuxd
● usbmuxd.service - Socket daemon for the usbmux protocol used by Apple devices
     Loaded: loaded (/usr/lib/systemd/system/usbmuxd.service; static)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Sun 2023-09-17 21:37:15 CEST; 19s ago
       Docs: man:usbmuxd(8)
   Main PID: 5436 (usbmuxd)
      Tasks: 2 (limit: 9125)
     Memory: 1.0M
        CPU: 25ms
     CGroup: /system.slice/usbmuxd.service
             └─5436 /usr/sbin/usbmuxd --user usbmuxd --systemd

sept. 17 21:37:15 laptop-jean systemd[1]: Started usbmuxd.service - Socket daemon for the usbmux protocol used by Apple devices.
sept. 17 21:37:16 laptop-jean usbmuxd[5436]: [21:37:16.012][3] usbmuxd v1.1.1 starting up
sept. 17 21:37:16 laptop-jean usbmuxd[5436]: [21:37:16.018][3] Successfully dropped privileges to 'usbmuxd'
sept. 17 21:37:16 laptop-jean usbmuxd[5436]: [21:37:16.018][3] Using libusb 1.0.26
sept. 17 21:37:16 laptop-jean usbmuxd[5436]: [21:37:16.025][3] Initialization complete
sept. 17 21:37:16 laptop-jean usbmuxd[5436]: [21:37:16.025][3] Enabled exit on SIGUSR1 if no devices are attached. Start a new instance with "--exit" to trigger.

How can I troubleshoot this? Many thanks if you can shed light on this issue.

I’m not sure about iPhone, but USB tethering works on Android with Fedora 38 like this:
USB tethering not working in F37 - #4 by vgaetera

Well, nothing appears in the lsusb output when I connect the phone.

$ lsusb -v -v -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /sys/bus/usb/devices/usb2  /dev/bus/usb/002/001
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    /sys/bus/usb/devices/usb1  /dev/bus/usb/001/001
    |__ Port 5: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 12M
        ID 27c6:538c Shenzhen Goodix Technology Co.,Ltd. Fingerprint Reader
        /sys/bus/usb/devices/1-5  /dev/bus/usb/001/002
    |__ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
        ID 0bda:5538 Realtek Semiconductor Corp. 
        /sys/bus/usb/devices/1-6  /dev/bus/usb/001/003
    |__ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
        ID 0bda:5538 Realtek Semiconductor Corp. 
        /sys/bus/usb/devices/1-6  /dev/bus/usb/001/003
    |__ Port 10: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
        ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
        /sys/bus/usb/devices/1-10  /dev/bus/usb/001/004
    |__ Port 10: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
        ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
        /sys/bus/usb/devices/1-10  /dev/bus/usb/001/004

This is the same before and after plugging.