Sat Apr 15, 2023 11:30 am
Sorry for the late reply. Yes, I updated and at least so far, the reconnect seems to be a lot faster (being on 7.9rc3 meanwhile).
I'd like to raise a further aspect here instead of opening up another thread for this as it goes in conjunction with the reconnection topic. Since O2 disconnects every 23 hours, 59 minutes and 11-12 seconds or so, the point in time of course will roll through "business hours" sooner or later.
Now one could simply run a script and manually have the lte1 interface disconnect and reconnect every night. However, to keep the amounts of "downtime" and reconnects as little and low as possible, I thought about a different approach:
I'd like to run a script every night which checks the log output via /log/print. If there was a disconnection during "inconvenient hours", let's say between 6 AM and 1 AM next day, it shall trigger a reconnection to shift the ISP's disconnection pattern to that timeframe again, e.g. 4 AM. If not, let's keep it running until it either "rolls out" of that window due to the a bit shorter than 24h timespan or in case of maintenances, which also occur from time to time, leading to a disconnect at random times anyway.
Now the log file is already nice in the way that any entries longer ago carry a month's name so since the script shall only check possible disconnects which happened during that very day, it should be sufficiant to only check the lines which start with a time. This is an example across a few days:
[admin@MikroTik] > /log/print where message~"lte1 link down"
apr/05 03:53:48 interface,info lte1 link down
apr/06 03:53:01 interface,info lte1 link down
apr/07 03:52:15 interface,info lte1 link down
apr/08 03:51:28 interface,info lte1 link down
apr/09 03:50:42 interface,info lte1 link down
apr/10 03:49:56 interface,info lte1 link down
apr/11 03:49:09 interface,info lte1 link down
apr/12 03:48:22 interface,info lte1 link down
apr/13 03:47:35 interface,info lte1 link down
03:46:49 interface,info lte1 link down
17:59:10 interface,info lte1 link down
21:42:59 interface,info lte1 link down
As one can see, mostly the disconnects happen due to the ISP's "almost-24h-policy-disconnect"-policy, but once in a while, it goes down for a different reason.
My idea is to have a script run at 23:59 PM then every day to check whether there has been any entry with "lte1 link down" between 06:00:00 and 00:59:59 and if so, enable another script at e.g. 4 AM to reconnect the lte1 interface, effectively shifting the ISP-trigger disconnects to that timeframe again.
While it feels like a yet rather trivial task, both ChatGPT and myself are unfortunately already overstrained due to the lack of detailed scripting knowledge. ChatGPT's suggestions constantly lead to syntax errors, so I've rather given up; even the first step to only output those lines not starting with a letter are asked for too much it seems.