Dear Friends,
I hope I write my issue in right place
I have Mikrotik RB2011 v6.43.7 with LCD display and 2 WAN (Main + Backup) input. I need switch the LCD with the active WAN port (ether1 = main link , ether2= backup link)
I create this script in system scheduler
if ([/ip route get 0 active] = true) do={/lcd interface display ether1-main} else={/lcd interface display ether2-backup}
.
The LCD won’t switch, But when use the code on terminal the LCD changed and switch to ether2-backup without any problem !
Any one have idea what is the problem or how to fix that ?
I try use this code in scheduler but also facing same problem won’t run script
if ([/ip route get 0 active] = true) do={/system script run LCD-Main} else={/system script run LCD-Backup}
>
> on my CRS125 but nothing happens.
> What should the command do?
.
To switch lcd reading to ether1, I need get reading the bandwidth in graphical mode for active port like this screen shot for LCD
[](https://ibb.co/WcG4c05)
But first you should check the Default Screen is stats in LCD settings as below
[](https://imgbb.com/)
You can take screen shot by this command
```text
lcd take-screenshot file-name=bandwidth
you will find a screenshot picture in Files (bandwidth.bmp)
I can’t remember if [/ip route get 0 active] is boolean or not.
Try to :put [/ip route get 0 active] and :put [/ip route get 0 active=no], if the second doesn’t return false use :len [/ip route get 0 active]>0 to trigger :if
Try :if ([ :len [/ip route get 0 active]]>0), can’t remember the right syntax, you also have to set right spaces to make it work.
The first one should work, or at least, I use it with running=no
But failed to switch the LCD screen when I used in Script or Scheduler
I don’t know why, maybe this is software bug on RB2011 routers. I will try on different RB2011 my be that will help