Community discussions

MikroTik App
 
dfdf
newbie
Topic Author
Posts: 39
Joined: Wed Dec 08, 2021 3:51 pm

/system routerboard usb power-reset duration=9999d

Thu Nov 24, 2022 4:53 am

Hello, I'm having issue with ROS 7.6 regarding to
/system routerboard usb power-reset duration=9999d
In ROS 6 I was able to issue
/system routerboard usb power-reset duration=9999d
/system routerboard usb power-reset duration=0
and didn't get any error, but in ROS 7 if I do the same, I'm getting "ERROR: reset in progress"
Moreover, entire script using this code is halted with the same error and even do { } on-error={} construction dosn't help to catch the error.
And after duration=9999d (this is more than 27 years) the only way to reset USB in ROS 7 is to reboot router

This was a VERY USEFUL feature in ROS 6 and it's broken in ROS 7.
Consider the following scenario:
primary link to internet is wired connection
backup link to internet is an LTE usb modem connection with pay-for-connection-per-day subscription (if you have your modem on during the day, you pay, next day - off -- no payment)

Monitoring script can do
/system routerboard usb power-reset duration=9999d
to turn USB modem off until primary link goes down, after that the script issues /system routerboard usb power-reset duration=0 and LTE modem is up and running until primary link is back so monitoring script issues /system routerboard usb power-reset duration=9999d to turn modem off again, and so on...

But in ROS 7 this is no more possible.

Tested at least on two different devices running ROS 7.6

Any comments regarding this issue are appreciated.
You do not have the required permissions to view the files attached to this post.
 
jzyken
just joined
Posts: 1
Joined: Sun Mar 26, 2023 1:08 pm

Re: /system routerboard usb power-reset duration=9999d

Sun Mar 26, 2023 1:18 pm

I totally agree! There was a convenient function to disable and enable the USB port using the script, now it is broken =(
Please add the ability to cancel the reset process.
Last edited by jzyken on Sun Mar 26, 2023 1:19 pm, edited 1 time in total.
 
Vorderwaeldler
just joined
Posts: 7
Joined: Wed Aug 09, 2023 2:49 pm

Re: /system routerboard usb power-reset duration=9999d

Sun Mar 10, 2024 6:21 pm

Stupid fix for the problem:
# Deactivate USB for a "normal" time
/system/routerboard/usb/ power-reset duration=604800s

# Reactivate USB
/system/routerboard/usb/ power-reset bus=1
 
dreamlinker77
just joined
Posts: 23
Joined: Sun Jul 21, 2024 7:43 pm
Location: Pisa, Italy

Re: /system routerboard usb power-reset duration=9999d

Sun Jul 28, 2024 1:30 pm

Hello everyone,

I noticed an issue with these commands on ROS 7.15.3

I will try to describe the problem with some examples:

If usb is already ON and I issue the command /system/routerboard/usb/ power-reset bus=1
the power of usb port will be cut for 6 seconds and it's OK

If usb is already ON and I issue the command /system/routerboard/usb/ power-reset duration=60s
the power will be cut for 60s
issuing the command /system/routerboard/usb/ power-reset bus=1 before 60s are elapsed
usb will turn ON but if I issue again /system/routerboard/usb/ power-reset duration=60s before 60s are elapsed
I get ERROR: reset in progress

So I have to wait 60s to issue again /system/routerboard/usb/ power-reset duration=60s
So the 60s timer is still running after issuing /system/routerboard/usb/ power-reset bus=1

If I want to keep off an LTE modem for e.g. 10 days and I want to check if usb connection is working every 12 hours turning on usb and then turning it off again for 10 days
I cannot Issue a reset duration of 10 days if 10 days are not still elapsed!
 
jaclaz
Forum Guru
Forum Guru
Posts: 1576
Joined: Tue Oct 03, 2023 4:21 pm

Re: /system routerboard usb power-reset duration=9999d

Sun Jul 28, 2024 5:07 pm

If I want to keep off an LTE modem for e.g. 10 days and I want to check if usb connection is working every 12 hours turning on usb and then turning it off again for 10 days
Maybe you have a "wrong" example.
What if you make the USB power-reset have a duration of 11:59:50, then you have a script that runs every 12:00 that "renews" the 11:59:50 duration?
 
dreamlinker77
just joined
Posts: 23
Joined: Sun Jul 21, 2024 7:43 pm
Location: Pisa, Italy

Re: /system routerboard usb power-reset duration=9999d

Sun Jul 28, 2024 5:18 pm

If I want to keep off an LTE modem for e.g. 10 days and I want to check if usb connection is working every 12 hours turning on usb and then turning it off again for 10 days
Maybe you have a "wrong" example.
What if you make the USB power-reset have a duration of 11:59:50, then you have a script that runs every 12:00 that "renews" the 11:59:50 duration?
In that way it should work but the problem is that I would like to keep the Lte modem
always off except when I need it to backup the failing primary link (Via script) and when I want to test if the backup
connection works. For the first case I cannot predict the failure and so I will not be able to set it again off for e.g. One year
after the primary connection has came up again.

Who is online

Users browsing this forum: No registered users and 5 guests