AR300M - switch USB-Port on/off

Hi,

I have an AR300M and I search a way to switch the USB-Port in a script on/off

Thanx Asado

find the correct file for controlling the USB:

ls /sys/class/leds/usbpow

Then control the USB power using it

echo 0 > /sys/class/leds/…usbpow…/brightness

echo 1 > /sys/class/leds/…usbpow…/brightness

Wow, thank you very much.

It works great

OFF

echo 0 > /sys/devices/platform/leds-gpio/leds/gl-ar300m:usbpow/brightness

ON

echo 1 > /sys/devices/platform/leds-gpio/leds/gl-ar300m:usbpow/brightness

Hi,
in previous version’s firmare it work great. Now in my AR300M with firmware 4.3.6 release3 there isn’t path /sys/devices/platform/leds-gpio/leds/gl-ar300m:green:usb

Is there a workaround?

BR
Fabio

Yes there is:

cd /sys/class/gpio/usb_power/
echo 0 > value

1 Like