Hello,
I'm new here.
My question is:
Is there any possible way to script on/off USB port at specific time ?
I found command to reset for some time but i didn't found way to off/on port.
Thanks for help
It isn't so simple. I tested it on mAP. It seems to work for one day on two, but in a long period USB power will return enabled randomly before the duration requested from the script. I don't know why, at this moment. Tested with routeros 6.43.8You can't simply disable port, but you can disable USB power at specific time, or specific conditions, for example:
{
:local time [system clock get time];
:if ($time>12:30:00 && $time<17:40:00) do={
/system routerboard usb power-reset duration=1d}}
This command will disable power for 1 day, when time is between 12:30:00 - 17:40:00
If conditons changes or you want to enable usb faster, do command again, and set duration=1s
/system routerboard usb power-reset duration=1s,
Now usb will be back ok even before 24h period.