usbmuxd: fix tethering not working after iPhone restart
authorGeorgi Valkov <gvalkov@gmail.com>
Sat, 20 Apr 2024 23:12:49 +0000 (02:12 +0300)
committerRosen Penev <rosenp@gmail.com>
Sun, 21 Apr 2024 20:45:57 +0000 (13:45 -0700)
commita0c4d8a6fb975d00f3325ef22e1822682ee6bd17
treec844c440aa70a89e386a95d0ae3c602fd1318610
parent66c237a78fe1b8ad84c232ce050bedddd622e51b
usbmuxd: fix tethering not working after iPhone restart

If the iPhone restarts while the USB cable is still connected,
tethering does not work. This can be fixed by reconnecting.

Fix: if the hotplug.d script detects that carrier is disabled
(no communication), the USB link is reset, and then the
usbmuxd service is restarted. Tethering starts even before
the iPhone is unlocked. As a side effect, if tethering is not
enabled, the iPhone will ding a second time after 5 seconds.

Add dependency on usbutils for usbreset, remove dependency on librt.

[1] https://github.com/libimobiledevice/usbmuxd/issues/218
[2] https://github.com/openwrt/openwrt/issues/12566#issuecomment-2066305622

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
utils/usbmuxd/Makefile
utils/usbmuxd/files/usbmuxd.hotplug [new file with mode: 0644]