this post was submitted on 20 Nov 2023
2 points (100.0% liked)
Home Networking
198 readers
1 users here now
A community to help people learn, install, set up or troubleshoot their home network equipment and solutions.
Rules
- Please stay on topic.
- Please use the search function to look for keywords related to what you want to ask before posting since most common issues have been answered.
- No Ads. This community is for support and discussion. Ads and self promotion are not welcome here.
- No product reviews or announcements. If you have a question about a product, be specific about what you want to know.
- Be civil. Don't be a jerk. Not being a jerk is surprisingly easy.
- No URL shorteners. URL shorteners tend to hide the real use of a link. For this reason, please use normal links, even if they're long.
- No affiliate links.
- No gatekeeping. With profession shall come professionalism. Extend help without judging others for their ignorance. The same goes for downvoting of comments or posts for "stupid questions" or not being as knowledgeable as others.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Oh yeah I forgot to ask, do you use iphone or android?
If you use iphone you need to run a little script in the background to stop the phone asking for you to trust the connection and stopping the link every so often. I've added it for others that might search this solution later....
#!/bin/sh
# Make iPhone tethering stay alive on OpenWrt
# After you successfully trusting the iPhone for tethering, copy files with name like
# /var/lib/lockdown/12345678-9ABCDEF012345678.plist to /etc/lockdown/locks.
# That way, you won't have to set up trust again after router reboots.
if [ -e /etc/lockdown ]
then
mkdir -p /var/lib/lockdown
cp -f /etc/lockdown/* /var/lib/lockdown/
fi
# lockdown records restored, now we can launch usbmuxd. Don't launch it sooner! (this is run from inet.d)
usbmuxd
# We are up and running now. But unfortunately if your carrier signal is weak, iPhone will
# drop connection from time to time and you'd have to unplug and replug USB cable to start tethering
# again. Script below automates that activity.
# First wait a bit - we just brought the interface up by usbmuxd
sleep 60
# If we see iPhone ethernet interface, try to ping iPhone router's address (172.20.10.1).
# When the ping is unsuccessful, rebind iPhone ethernet USB driver and wait for things to settle down
while :
do
for i in /sys/bus/usb/drivers/ipheth/*:*
do
test -e "${i}" || continue
ping -w 3 172.20.10.1 &> /dev/null
if [ "${?}" -ne 0 ]; then
echo "${i##*/}" > "${i%/*}"/unbind
echo "${i##*/}" > "${i%/*}"/bind
sleep 15
fi
done
sleep 1
done
EOF