Community discussions

MikroTik App
 
seanet
newbie
Topic Author
Posts: 35
Joined: Fri Mar 01, 2013 11:26 pm

LTE Network mode check

Thu Jan 30, 2020 1:48 pm

Hi
i want to create script to do some actions after checking lte interface network mode
For example if "gsm,3g,lte" is checked do /beep

but it does't work correctly.but i don't know why ?
:global a
/interface lte print once do={
  :set a $network-mode
  }
:if ($a = "gsm,3g,lte") do={
  :beep frequency=50 length=2
  }
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1397
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: LTE Network mode check

Fri Jan 31, 2020 1:15 am

first try your command in CLI, just in terminal to discover that print and once are not existing together. Use TAB key in CLI.
Next with working one command build more complex structure. Use simple commands as possible.

put [interface lte get lte1 network-mode ]
lte
if (1=1) do={put OK} else={put NOK}
OK
if ([interface lte get lte1 network-mode ] = "lte") do={put OK} else={put NOK}
OK
if ([interface lte get lte1 network-mode ] = "lte") do={/system script run music}

And bonus:
Beeps are for play a music "Star Wars -- The Imperial March" or "A_Bit_of_Sounds"
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL | Buy me a caffe
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
 
seanet
newbie
Topic Author
Posts: 35
Joined: Fri Mar 01, 2013 11:26 pm

Re: LTE Network mode check

Sat Feb 01, 2020 8:33 am

:)
thanks Sir
i will try :D
 
scarletmichelle
just joined
Posts: 1
Joined: Wed Dec 30, 2020 9:10 am
Location: New York
Contact:

Re: LTE Network mode check

Wed Dec 30, 2020 9:15 am

first try your command in CLI, just in terminal to discover that print and once are not existing together. Use TAB key in CLI.
Next with working one command build more complex structure. Use simple commands as possible.

put [interface lte get lte1 network-mode ]
lte
if (1=1) do={put OK} else={put NOK}
OK
if ([interface lte get lte1 network-mode ] = "lte") do={put OK} else={put NOK}
OK
if ([interface lte get lte1 network-mode ] = "lte") do={/system script run music}

And bonus:
Beeps are for play a music "Star Wars -- The Imperial March" or "A_Bit_of_Sounds"
Your music is great, I like it and can I download it ???
World ringtones for your mobile phone.
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1397
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: LTE Network mode check

Tue Feb 23, 2021 1:54 am

scarletmichelle
Your music is great, I like it and can I download it ???
If your RouterBoard have got a speaker (beep commands play a music) then you go into this commands lines and can use them as Script and play anytime you want.
But you not download them as .mp3 etc.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL | Buy me a caffe
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1942
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: LTE Network mode check

Tue Feb 23, 2021 11:06 am

 
Why do not use Splunk to monitor your MikroTik Router(s)? Look at this page in how to set it up.

MikroTik->Splunk
 

Who is online

Users browsing this forum: No registered users and 39 guests