I have switched to an unlimited data prepaid on a phone and was looking for a way to get tether working. I was VERY excited to find easytether which works amazingly well, however I had a critical issue that the driver wouldn’t connect reliably when the phone restarts,
This was a problem because I found that my phone’s speed would degrade throughout the day, and rebooting it improved the performance. I set it to restart every day at 5PM so it’s at peak performance before I get home. I also set the easy tether app to be opened at startup, which only works if the lock screen is turned off (I still use a lockscreen app to keep a guest from poking around)
It seemed that when the phone USB device triggers a hotplug event, it’s too early for the easytether app to start listening, so the easytether-usb application closes out. I made the below modification to the hotplug.d 99-easytether-usb script
In your phone developer options, make sure transfer files is the default usb mode
root@npancmgw01:~# cat /etc/hotplug.d/usb/99-easytether-usb
#!/bin/sh
[ "$ACTION" = "add" ] || exit 0
[ "$INTERFACE" = "255/66/1" ] && {
pgrep -f launch-easytether | xargs kill -9
killall -9 easytether-usb
/root/launch-easytether.sh > /dev/null &
}
root@npancmgw01:~# cat /root/launch-easytether.sh
#!/bin/sh
while true;do
if $(pgrep easytether-usb > /dev/null) ; then
echo null
else
/usr/bin/easytether-usb -n -s <device serial number>
fi
sleep 60
done
Finally, i recently discovered this is needed to trigger the hotplug event when the router restarts, the phone usb device needs to reinitialize.
Add this at the end of your system startup script NOTE: 1-1 is the usbcontroller and port number your phone is plugged into.
sh -c 'sleep 60; echo 1 > /sys/bus/usb/devices/1-1/remove'
The first script is the replacement which kills any process with “launch-easytether” in the commandline, and also ensures easytether-usb is not running to prevent a conflict
The second script is what actually launches easytether using the serialnumber of your phone (check easytether-usb --help for info). It will check if easytether-usb process is running, and if it isn’t it will start the driver and wait 60 seconds before trying again.
This will restart the driver if it crashes for any reason, and retries while the phone and app are starting until the driver makes a connection. This takes a “hacky” solution to using unlimited mobile phone with easytether that needs the USB reconnected constantly, and makes it just as reliable as an LTE modem.