I am trying to power cycle the USB port so android auto-tethers on boot. Problem is I am not sure where usb power is controlled, GPIO? /sys/class/leds/gl-mt1300:white/brightness?
If anyone has more information it would be greatly appreciated.
What I am trying to do:
Run a script like this (that actually works) every one minute via cron:
if nc -zw1 google.com 443; then
echo “we have connectivity”
else
echo “resetting usb”
echo 1 > /sys/class/leds/gl-mt1300:white/usbpower/brightness
echo 0 > /sys/class/leds/gl-mt1300:white/usbpower/brightness
fi
I found this in another thread for another GL product. Trying to get it to work for mine
A follow-up. My phone does not show up if it was plugged in to the usb port BEFORE plugging in power to the router. When I do an lsusb, the device does not show up. When I unplug and plug the phone back in…it shows up and auto-tethers. This doesn’t seem like it should be happening on this router, could be a bug?
Anyway the reason I am trying to turn the power to the usb port off and on is to get the phone to reconnect without needing to physically unplug and plug the phone back into the router whenever I power it on.
I have my router plugged into my car. When car is off, router is off. When car turns on, router turns on.
Phone (Android) is plugged into router and always on, phone has developer options enabled with Usb configured to auto tether. When router is powered up the phone does not auto-tether at boot. When I unplug and plug phone back into router after it is powered up, it does do auto-tether. I am pretty much trying to find a way to mimic phone being physically unplugged and plugged in by turning usb power to port on router on and off after boot without having to physically do this.
So I have both the developers settings > default usb option setup and also have tasker monitoring as a backup (rooted). Problem is, android does not notice that it is connected to the router, it thinks it can only charge. So no matter how many different ways I try to “turn on” usb tethering, the phone has to be unplugged from the router and plugged back in for it to realize it isn’t just plugged into a charger. I have tried a few different phones as well, same situation with all of them.
Gotcha, appreciate all of you for trying to help. I guess I will return this and get the AR750s. I am disappointed because other than this, the MT1300 is awesome.