Community discussions

MikroTik App
 
maxqlex
just joined
Topic Author
Posts: 10
Joined: Mon Jun 05, 2023 9:19 pm

USB reboot

Mon Jun 05, 2023 9:49 pm

Hello everyone I`m new and want to ask a simple question about RB3011 (I`m using rb3011 with LTE module SIM7600E-H) it is working perfectly on OS 7.9.1, however like all GSM operators after downloading a certain amount of GB speed decrease a lot. Is there a way to stop the power to the USB port (reboot) after reaching let's say 50 GB of traffic, this is the most efficient way that I discovered the module itself needs to be powered off.
Thank everyone.
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 385
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

Re: USB reboot

Tue Jun 06, 2023 9:14 am

system/routerboard/usb/power-reset duration=5
will reset USB power for 5 seconds.
you can use this in scripts to do power reset at 50GB mark.
 
maxqlex
just joined
Topic Author
Posts: 10
Joined: Mon Jun 05, 2023 9:19 pm

Re: USB reboot

Thu Jun 08, 2023 3:43 am

Sound very interested, where I can find information about this type of script?
add action=passthrough chain=forward comment="Download Global Counter" in-interface=WAN
this is my counter can I have some help furder
Last edited by maxqlex on Fri Jun 09, 2023 1:54 am, edited 1 time in total.
 
maxqlex
just joined
Topic Author
Posts: 10
Joined: Mon Jun 05, 2023 9:19 pm

Re: USB reboot

Fri Jun 09, 2023 3:34 am

Final code:

:local intf "WAN";
:local rx [/interface get $intf rx-byte]
:if ([/interface get "WAN" rx-byte] > 10995116278) do={/system routerboard usb power-reset duration=10s}
Last edited by maxqlex on Fri Jun 09, 2023 3:46 am, edited 2 times in total.

Who is online

Users browsing this forum: Semrush [Bot] and 17 guests