I am pretty new in the mikrotik world.
I have a problem and cannot solve it. I have a Chateau 5G and want to config it via a config file.
I run the reset configuration with run after reset. But the lte1 interface does not go up before the script times out.
So either I get the error interface not ready or script timed out. (Dont have the exact errors in my head now).
I have tried everything. fixed delay at the beginning of the file. Try to check if interface is up via script. putting the lte line in the back of the file. But i cant find a setting where lte1 is up and config does not time out.
Everything works great when I remove the line where I set the lte1 apn and band from the script and put it in the console after startup. But that does not help me since I need that automated.
I recently answered a similar post but can’t find it back right now.
Use fixed delay, can be up to 5 minutes !
Or check defconf script how they do it there.
Waiting in a loop until lte itf is detected, then proceed or abort.
But this should be the last part of your script since you need to take into account it can sometimes abort…
Thanks. I did something like this script but in the Mikrotik Wiki it says:
run-after-reset
Run specified .rsc file after reset. That way you can load your custom configuration.
If a specific .rsc file execution takes more than 2 minutes, a script will fail, and LOG will contain “runtime limit exceeded” or in rare cases “std failure: timeout” error.
And “runtime limit exceeded” exactly the line I get. So do you not use your script as startup script or do I see something wrong?
My gameplan is, that I have preconfigured devices all the same and with a website+auth+scripts(runs already for other brands) I want to upload a customer file to the device and then reset the config and let it boot with that file to bring the customer with the right settings for him online. Is there a better way to configure a mikrotik device without the need of a technician at site?
Try with the wait loop as referenced in the link by jaclaz.
Just checked again, it should wait for max 115 seconds which is just below that hard limit of 2 minutes.
But do put that part as last part of your script (or as far back as possible).