Hi,
is it possible with a command switch off the power of the usb port? Obviusly after I need to power it on.
BR
Fabio
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.
Hi,
router is GL-AR300M-Ext with 3.019 FW. I want to control it from user space.
Thank you.
BR
I believe that it is /sys/devices/platform/leds-gpio/leds/gl-ar300m:green:usb
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.
From target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c
#define GL_AR300M_GPIO_LED_USB 2
corresponds with GL-AR300M (Shadow) - GL.iNet Docs