Community discussions

MikroTik App
 
multissid
newbie
Topic Author
Posts: 27
Joined: Sat Jan 29, 2022 12:21 am

How to script "Home" ssid updated to "Office" ssid as time-event or GPS event ?

Sat Jan 29, 2022 1:02 am

How to script "Home" ssid updated to "Office" ssid as time-event or GPS event ?

Let me know if ssid name can be scripted to update from Home to Office as time event, controlled by
office hours or by GPS geolocation for a mobile AP by Mikrotik ?
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 2870
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: How to script "Home" ssid updated to "Office" ssid as time-event or GPS event ?

Sat Jan 29, 2022 12:13 pm

SSID can easily be change by a scrip scheduled at fixed time.
Not sure how to do it by GPS location,.
 
Use Splunk> to log/monitor your MikroTik Router(s). See link below. :mrgreen:

MikroTik->Splunk
 
 
multissid
newbie
Topic Author
Posts: 27
Joined: Sat Jan 29, 2022 12:21 am

Re: How to script "Home" ssid updated to "Office" ssid as time-event or GPS event ?

Sun Jan 30, 2022 12:04 am

thank you my dear friend for your kind reply.

My friend offers me used AP/router by Mikrotik to be collected next week

So I am working hard to learn if features sought are supported.
I previewed a number of scripts published at forum
and there is none for "ssid: set/ enable/ disable

The only script for wireless interface is the following
I assume "Guest" stays for a specified "ssid"

So I need to learn how to set a new ssid via script
and more to have "Home" ssid switched to "Office" ssid at a specified time

resembling cron jobs

==
Cron Job: a Comprehensive Guide for Beginners 2022
https://www.hostinger.com/tutorials/cron-job
Image
Cron is a utility program that lets users input commands for scheduling tasks repeatedly at a specific time. Tasks scheduled in cron are called cron jobs. Users can determine what kind of task they want to automate and when it should be executed. Cron is a daemon …
===


{
:if ([/interface wireless get Guest disabled]=true) \
do={[/interface wireless enable Guest; /beep frequency=380 length=300ms;
:delay 300ms;
:beep frequency=380 length=300ms;
:delay 300ms;
:beep frequency=770 length=600ms;]} \
else={[/interface wireless disable Guest; beep frequency=770 length=300ms;
:delay 300ms;
:beep frequency=770 length=300ms;
:delay 300ms;
:beep frequency=380 length=600ms;]}
}
==
{
:if ([/interface wireless get Guest disabled]=true) \
do={[/interface wireless enable Guest;
/beep frequency=380 length=300ms;
:delay 300ms;
:beep frequency=380 length=300ms;
:delay 300ms;
:beep frequency=770 length=600ms;
/system leds set [find where leds=user-led] type=on;]} \
else={[/interface wireless disable Guest;
/beep frequency=770 length=300ms;
:delay 300ms;
:beep frequency=770 length=300ms;
:delay 300ms;
:beep frequency=380 length=600ms;
/system leds set [find where leds=user-led] type=off;]}
}
==
Is there other repository for scripts of interest toi me ?
 
multissid
newbie
Topic Author
Posts: 27
Joined: Sat Jan 29, 2022 12:21 am

Re: How to script "Home" ssid updated to "Office" ssid as time-event or GPS event ?

Sun Jan 30, 2022 12:20 am

follow up

from
Script for down & up interfaces
viewtopic.php?t=182621

Here you go:

Disable sfp-sfpplus1, enable ether10
Code: Select all

{
/interface/ethernet/disable [find where name=sfp-sfpplus1]
/interface/ethernet/enable [find where name=ether10]
}

Disable ether10, enable sfp-sfpplus1

{
/interface/ethernet/disable [find where name=ether10]
/interface/ethernet/enable [find where name=sfp-sfpplus1]
}

ok, I need to enable/ disable wireless interfaces

but how to script ?
new wireless interface called "HOME" "OFFICE (as ssid ) ?
 
DuMbh3aD
just joined
Posts: 3
Joined: Thu Jan 19, 2017 11:16 pm

Re: How to script "Home" ssid updated to "Office" ssid as time-event or GPS event ?

Fri Feb 11, 2022 4:00 pm

/system scheduler
add interval=1d name=HomeSSID on-event=\
    "/interface wireless set [ find default-name=wlan1 ] ssid=HOME" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=feb/11/2022 start-time=18:00:00
add interval=1d name=schedule1 on-event=\
    "/interface wireless set [ find default-name=wlan1 ] ssid=OFFICE" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=feb/11/2022 start-time=08:00:00

Who is online

Users browsing this forum: No registered users and 5 guests