is it possible with a command switch off the power of the usb port? Obviusly after I need to power it on.
Something like this may be?
Which device, which firmware (including version)?
Do you want it permanently off, or to be able to control it from user space?
Some GL.iNet devices use a GPIO to control the power to the USB bus. Depending on the firmware, it may be possible to change the value at run time from user space.
router is GL-AR300M-Ext with 3.019 FW. I want to control it from user space.
I believe that it is
root@GL-AR300M:/sys/devices/platform/leds-gpio/leds/gl-ar300m:green:usb# ls -l -rw-r--r-- 1 root root 4096 May 30 10:07 brightness lrwxrwxrwx 1 root root 0 May 30 10:07 device -> ../../../leds-gpio -r--r--r-- 1 root root 4096 May 30 10:07 max_brightness lrwxrwxrwx 1 root root 0 May 30 10:07 subsystem -> ../../../../../class/leds -rw-r--r-- 1 root root 4096 May 30 10:07 trigger -rw-r--r-- 1 root root 4096 May 30 10:07 uevent
The following is unchecked, as I am not somewhere that I can confirm that it works, but I believe that
echo 0 > brightness
should turn it off and that
cat max_brightness > brightness
should turn it back on.
#define GL_AR300M_GPIO_LED_USB 2
corresponds with https://docs.gl-inet.com/en/3/hardware/ar300m/#pcb-pinout
This post was flagged by the community and is temporarily hidden.