USB Tethering from Android just stopped working [Fedora 42]
from maliciousonion@lemmy.ml to linux@lemmy.ml on 17 Apr 06:32
https://lemmy.ml/post/28729959

Upon upgrading from Fedora 41 to 42, I noticed that the USB tethering just doesn’t work

networkctl recognizes the device as “wwan” now, instead of “ether”. If I load up a previous kernel, USB tethering works normally.

This seems to be a change in the kernel, and probably won’t be reverted in the future. What do I do?

More detail in this comment

You know what? Fuck this. I just backed my shit up and installed Debian. Still, please try to look into this, this could be a problem for many others

#linux

threaded - newest

Xiisadaddy@lemmygrad.ml on 17 Apr 06:53 next collapse

I’ve been working on a phone tethering router so might have some insight here for you. Android can use CDC or RNDIS to tether. It depends on your phone which ones gonna be used. Try to figure out which one its using (can do this by watching logs when plugging in usb usually itll say there which type of device is connecting). When i was doing the router i had to make sure cdc_ether and rndis_host kernel modules were both loaded to ensure compatibility. It might be as simple as manually loading a module in the new kernel version. Although I’m not exactly sure how it’ll work on fedora i was doing this all on OPNsense.

What i was doing was tethering the phone to a router (old thinkpad running router OS) then passing that connection on to its network and connecting to the Access Point on the network with my laptop. I still havent fully worked out the kinks yet but its going pretty well. Sorry i can’t be more specific for your case, but hopefully it gives you some terms you can use to google more effectively at the least.

maliciousonion@lemmy.ml on 17 Apr 07:47 collapse

Seems to be rndis for me.

Xiisadaddy@lemmygrad.ml on 17 Apr 08:03 collapse

try to look up how to enable rndis in fedora manually and try it. Might work. Or you might need to download something too.

maliciousonion@lemmy.ml on 17 Apr 08:29 collapse

Below are the kernel logs for when I connect the USB on F42 (new kernel)

new(the one that doesn't work)

Apr 17 hh:mm:15 fedora kernel: usb 5-8: USB disconnect, device number 6 Apr 17 hh:mm:15 fedora kernel: rndis_host 5-8:1.0 wwp0s29f7u8: unregister ‘rndis_host’ usb-0000:00:1d.7-8, Mobile Broadband RNDIS device Apr 17 hh:mm:15 fedora systemd-networkd[2818]: wwp0s29f7u8: Link DOWN Apr 17 hh:mm:15 fedora avahi-daemon[1092]: Interface wwp0s29f7u8.IPv6 no longer relevant for mDNS. Apr 17 hh:mm:15 fedora systemd-networkd[2818]: wwp0s29f7u8: Lost carrier Apr 17 hh:mm:15 fedora avahi-daemon[1092]: Leaving mDNS multicast group on interface wwp0s29f7u8.IPv6 with address fe80::acfa:54ff:fee2:5884. Apr 17 hh:mm:15 fedora avahi-daemon[1092]: Withdrawing address record for fe80::acfa:54ff:fee2:5884 on wwp0s29f7u8. Apr 17 hh:mm:20 fedora kernel: usb 5-8: new high-speed USB device number 7 using ehci-pci Apr 17 hh:mm:20 fedora kernel: usb 5-8: New USB device found, idVendor=2717, idProduct=ff88, bcdDevice= 4.19 Apr 17 hh:mm:20 fedora kernel: usb 5-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Apr 17 hh:mm:20 fedora kernel: usb 5-8: Product: Redmi Note 11 Apr 17 hh:mm:20 fedora kernel: usb 5-8: Manufacturer: Xiaomi Apr 17 hh:mm:20 fedora kernel: usb 5-8: SerialNumber: 2ce0eff1 Apr 17 hh:mm:20 fedora kernel: rndis_host 5-8:1.0 wwan0: register ‘rndis_host’ at usb-0000:00:1d.7-8, Mobile Broadband RNDIS device, 7a:03:3c:1e:05:d2 Apr 17 hh:mm:20 fedora mtp-probe[3287]: checking bus 5, device 7: “/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-8” Apr 17 hh:mm:20 fedora mtp-probe[3287]: bus: 5, device: 7 was not an MTP device Apr 17 hh:mm:20 fedora kernel: rndis_host 5-8:1.0 wwp0s29f7u8: renamed from wwan0 Apr 17 hh:mm:20 fedora systemd-networkd[2818]: wwan0: Interface name change detected, renamed to wwp0s29f7u8. Apr 17 hh:mm:20 fedora mtp-probe[3291]: checking bus 5, device 7: “/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-8” Apr 17 hh:mm:20 fedora mtp-probe[3291]: bus: 5, device: 7 was not an MTP device Apr 17 hh:mm:24 fedora ModemManager[1186]: <msg> [base-manager] couldn’t check support for device ‘/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-8’: not supported by any plugin

And these are the logs on the old kernel that still works:

old(the one that works)

Apr 17 hh:mm:15 fedora kernel: usb 5-8: new high-speed USB device number 5 using ehci-pci Apr 17 hh:mm:15 fedora kernel: usb 5-8: New USB device found, idVendor=2717, idProduct=ff88, bcdDevice= 4.19 Apr 17 hh:mm:15 fedora kernel: usb 5-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Apr 17 hh:mm:15 fedora kernel: usb 5-8: Product: Redmi Note 11 Apr 17 hh:mm:15 fedora kernel: usb 5-8: Manufacturer: Xiaomi Apr 17 hh:mm:15 fedora kernel: usb 5-8: SerialNumber: 2ce0eff1 Apr 17 hh:mm:15 fedora kernel: rndis_host 5-8:1.0 usb0: register ‘rndis_host’ at usb-0000:00:1d.7-8, RNDIS device, 82:1c:ae:65:4a:34 Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info> [1744877835.2127] manager: (usb0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/7) Apr 17 hh:mm:15 fedora mtp-probe[4001]: checking bus 5, device 5: “/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-8” Apr 17 hh:mm:15 fedora mtp-probe[4001]: bus: 5, device: 5 was not an MTP device Apr 17 hh:mm:15 fedora kernel: rndis_host 5-8:1.0 enp0s29f7u8: renamed from usb0 Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info> [1744877835.2356] device (usb0): interface index 7 renamed iface from ‘usb0’ to ‘enp0s29f7u8’ Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info> [1744877835.2456] device (enp0s29f7u8): state change: unmanaged -> unavailable (reason ‘managed’, managed-type: ‘external’) Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info> [1744877835.2479] device (enp0s29f7u8): carrier: link connected Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info> [1744877835.2484] device (enp0s29f7u8): state change: unavailable -> disconnected (reason ‘carrier-changed’, managed-type: ‘full’) Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info> [1744877835.2497] policy: auto-activating connection ‘Wired connection 2’ (1cd60103-249a-3a35-b7e8-c2ac149f67ab) Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info> [1744877835.2501] device (enp0s29f7u8): Activation: starting connection ‘Wired connection 2’ (1cd60103-249a-3a35-b7e8-c2ac149f67ab) Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info> [1744877835.2502] device (enp0s29f7u8): state change: disconnected -> prepare (reason ‘none’, managed-type: ‘full’) Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info> [1744877835.2505] device (enp0s29f7u8): state change: prepare -> config (reason ‘none’, managed-type: ‘full’) Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info> [1744877835.2566] device (enp0s29f7u8): state c

Xiisadaddy@lemmygrad.ml on 17 Apr 10:19 next collapse

So its treating your phone like a WWAN device like if you had mobile broadband built into the computer instead of treating it like a ethernet over usb connection. If there is a network connection showing up for it try to go in and force it to allow the phone to handle DHCP. Tethered phones act as the DHCP server in most cases, but if it thinks its an internet WWAN device the computer might be trying to be the DHCP server causing a conflict. Or force it to somehow recognize it as an ethernet connection.

Xiisadaddy@lemmygrad.ml on 17 Apr 10:24 collapse

I asked ChatGPT about it since I’m not sure how to go about it, and got this. Might be worth a try.

Prompt: In a recent update to the fedora operating system they changed it so mobile broadband modems are now flagged as WWAN devices rather then ethernet devices. This is causing it to treat a usb tethered phone as a WWAN device instead of a ethernet over usb device, and the tether is not working as a result. How could a user fix this on their system?

Answer: You can teach ModemManager to completely ignore your phone’s RNDIS interface so that NetworkManager will handle it as a normal Ethernet link again. Here’s how:

  1. Find your phone’s USB IDs
    Plug in your phone with USB‑tethering enabled and run:

    lsusb
    

    You’ll see a line like:

    Bus 002 Device 008: ID 18d1:4ee7 Google Inc. Nexus/Pixel (tethering)
    

    Note the idVendor (here 18d1) and idProduct (here 4ee7).

  2. Create a udev rule to ignore it
    As root, create /etc/udev/rules.d/99-usb-tether-ignore.rules with these contents:

    # Tell ModemManager to ignore my phone’s USB‑tether interface
    ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee7", ENV{ID_MM_DEVICE_IGNORE}="1"
    

    (Replace 18d1/4ee7 with your phone’s IDs.) citeturn5search4

  3. Reload udev and restart services

    sudo udevadm control --reload-rules
    sudo udevadm trigger
    sudo systemctl restart ModemManager NetworkManager
    

After that, your tethered phone will no longer be treated as a WWAN modem but as an ordinary USB‑Ethernet device—DHCP will kick in and Internet will flow as before.


Tip:
If you never use a cellular modem on this machine, you can also just uninstall ModemManager entirely:

sudo dnf remove ModemManager
``` citeturn5search4
konki@lemmy.one on 17 Apr 07:26 next collapse

I have a similar problem on OpenSUSE. The solution for me is running modprobe rndis_host.

maliciousonion@lemmy.ml on 17 Apr 07:51 collapse

This did nothing. I don’t notice any change at all

terminhell@lemmy.dbzer0.com on 17 Apr 17:19 next collapse

This is why I try to wait at least a week to for release upgrades.

cy_narrator@discuss.tchncs.de on 19 Apr 01:59 collapse

Is week enough?

terminhell@lemmy.dbzer0.com on 19 Apr 18:47 collapse

It’s my minimum. It’s usually been fine in the past. I’ve gone from a beta to full release and been fine. But the last few years ya, I try to wait at least a week, up to about a month. I do have other PCs or VMs I’ll test a bit more with before pulling the trigger on my main machine.

Kazumara@discuss.tchncs.de on 19 Apr 19:10 collapse

You’re not alone in this:

discussion.fedoraproject.org/t/…/148809

discussion.fedoraproject.org/t/…/148927

bugzilla.kernel.org/show_bug.cgi?id=220002

lore.kernel.org/…/e0df2d85-1296-4317-b717-bd757e3…

When Debian upgrades to this kernel version you might run into the issue again. Unless there is a fix deployed before then.

maliciousonion@lemmy.ml on 20 Apr 09:10 collapse

By that time, I don’t think I’ll have to rely on USB tethering anymore. Plus the problem might reach the right ears and get fixed by then, as you said.