Skip to content

[Bug]: iPhone tethering disconnects after a while --> update dev rules #1986

@Rastafabisch

Description

@Rastafabisch

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Issue reporting checklist

Operating System

Debian 12 (bookworm)

Installation method

Manual setup

Onboard wireless chipset or external adapter?

External adapter

Hardware

Other

RaspAP version

Latest

Other software or services running with RaspAP?

Yes (specify below)

Contact details (optional)

No response

Bug description

I am using a Radxa Rock 5B as a small home router (and soon as a nas). It dials up using USB tethering from an iPhone. Every few hour it lost the IP on the tethered interface and set a link-local one.

Steps to reproduce

Using a iPhone for USB-Tethering and waiting a while.

Screenshots

No response

Additional context

I suspect it is caused by linux' tendencies to sleep USB devices after a while of no use, thus I created the following udev rules (sudo nano /etc/udev/rules.d/50-iphone-tethering.rules):

# iPhone USB Tethering - Disable autosuspend
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12a[0-9a-f]", ATTR{power/control}="on"

# Also set Parent-Device (Hub) to "on"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="12a[0-9a-f]", RUN+="/bin/sh -c 'echo on > /sys$DEVPATH/../power/control'"

Additionally I disallowed setting a link-local IP for the iPhones eth1 interface setting noipv4ll in dhcpcd.conf.

Relevant log output

Not yet captured since the behaviour cannot be triggered at will but occurs after multiple hours and this is the first time I took action.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions