Connecting an Android phone appears as usb0 (Android)
I am coming to the conclusion that USB dongle modems are ‘old tech’ ? and to probably tether a phone possibly even with 5g.
The location is off grid with solar so there are power limitations, so the modem option seemed to make sense. I have to test if an android phone maintains a link when power cycling. With developer options on a rooted pixel 3 xl tethering start automatically following restart. Rebooting a GL-A1300 tether does not start till un-plugged and re-plugged (which I can’t do remotely).
Perhaps there is some script that could be run.
opkg update && opkg install usbutils
root@GL-A1300:~# usbreset
Devices:
............ none
which is probably why it does not work. There is hub-ctrl to look at a big subject and did not seem to work… https://openwrt.org/docs/guide-user/network/wan/smartphone.usb.tethering
So i’m going to try a USB C Ethernet Adapter. But i will need to power the phone aswell through! which will mean a USB C Power Injector.
also https://forum.gl-inet.com/t/turn-off-on-usb-port-based-on-schedule/53095/3
root@GL-A1300:~# echo 0 > /sys/class/gpio/usb_power/value
root@GL-A1300:~# echo 1 > /sys/class/gpio/usb_power/value
This does alter the power on the usb tethered phone and made the tether work!
#power off the usb port then on again
echo 0 > /sys/class/gpio/usb_power/value
sleep 3
echo 1 > /sys/class/gpio/usb_power/value
It will need to be scripted during bootup somehow. After sometime trying crontab -e and a script which I forgot to chmod. I added the commands to the LuCI System >Local Startup (/etc/rc.local)
Now the USB Tether survives a reboot.