Community discussions

MikroTik App
 
obscurus
just joined
Topic Author
Posts: 20
Joined: Thu May 04, 2017 9:25 am

Capsman scheduler

Wed May 30, 2018 8:46 am

Please, explane me how i can enable/disable wlan wifi interface on capsman via scripts.
I have tried disable provisioning rule but without results - my phone can connect to wifi
 
User avatar
karlisi
Member
Member
Posts: 301
Joined: Mon May 31, 2004 8:09 am
Location: Latvia

Re: Capsman scheduler

Wed May 30, 2018 11:05 am

You already have provisioning rules configured. Create these scripts and schedule to run them.

to enable
/caps-man provisioning enable 0    
:delay 1
/caps-man radio provision numbers=[find]
to disable
/caps-man provisioning disable 0 
:delay 1
/caps-man radio provision numbers=[find]
---
Karlis
 
obscurus
just joined
Topic Author
Posts: 20
Joined: Thu May 04, 2017 9:25 am

Re: Capsman scheduler

Sun Jun 03, 2018 7:00 pm

I have 4 provisioning rules and if i add its in script (0,1,2,3) - only first rule has been disabling. How i can disable all?
 
User avatar
karlisi
Member
Member
Posts: 301
Joined: Mon May 31, 2004 8:09 am
Location: Latvia

Re: Capsman scheduler

Mon Jun 04, 2018 10:34 am

Try on first line
/caps-man provisioning disable numbers=[find]
And on second script too. This should disable and enable all configurations.
---
Karlis
 
obscurus
just joined
Topic Author
Posts: 20
Joined: Thu May 04, 2017 9:25 am

Re: Capsman scheduler

Mon Jun 04, 2018 11:17 am

My script is:

/caps-man provisioning disable 0;
:delay 1;
/caps-man radio provision numbers=[find];
/caps-man provisioning disable 1; 
:delay 1;
/caps-man radio provision numbers=[find];
/caps-man provisioning disable 2;
:delay 1;
/caps-man radio provision numbers=[find];
/caps-man provisioning disable 3; 
:delay 1;
/caps-man radio provision numbers=[find];
But disable only number 0
 
User avatar
karlisi
Member
Member
Posts: 301
Joined: Mon May 31, 2004 8:09 am
Location: Latvia

Re: Capsman scheduler

Mon Jun 04, 2018 2:19 pm

Only the first enabled provisioning rule will be in effect, if no additional filtering parameters (hw-supported-modes, identity-regexp, etc.) are set.
If you want to disable all 4 provisioning rules at once, try my scripts:
/caps-man provisioning enable numbers=[find]    
:delay 1
/caps-man radio provision numbers=[find]
Similarly to disable.
---
Karlis
 
obscurus
just joined
Topic Author
Posts: 20
Joined: Thu May 04, 2017 9:25 am

Re: Capsman scheduler

Mon Jun 04, 2018 8:09 pm

Only the first enabled provisioning rule will be in effect, if no additional filtering parameters (hw-supported-modes, identity-regexp, etc.) are set.
If you want to disable all 4 provisioning rules at once, try my scripts:
/caps-man provisioning enable numbers=[find]    
:delay 1
/caps-man radio provision numbers=[find]
Similarly to disable.
Many thanks. The script works fine for disabing provisioning rule but wlan interfaces are still active.
 
User avatar
karlisi
Member
Member
Posts: 301
Joined: Mon May 31, 2004 8:09 am
Location: Latvia

Re: Capsman scheduler

Tue Jun 05, 2018 9:34 am

So, something wrong with configurations included in these provisionings.
---
Karlis
 
obscurus
just joined
Topic Author
Posts: 20
Joined: Thu May 04, 2017 9:25 am

Re: Capsman scheduler

Thu Jun 07, 2018 11:49 pm

No, i have correct configuration, because wifi roaming are correct in my network. Maybe it is because i have local forwarding enable?
Last edited by obscurus on Fri Jun 08, 2018 8:42 am, edited 1 time in total.
 
User avatar
karlisi
Member
Member
Posts: 301
Joined: Mon May 31, 2004 8:09 am
Location: Latvia

Re: Capsman scheduler

Fri Jun 08, 2018 8:33 am

Post export from /capsman provisioning and /capsman configuration please.
---
Karlis
 
obscurus
just joined
Topic Author
Posts: 20
Joined: Thu May 04, 2017 9:25 am

Re: Capsman scheduler

Fri Jun 08, 2018 8:52 am

/caps-man channel
add band=5ghz-a/n/ac extension-channel=Ce name=channel5 tx-power=27
add band=2ghz-b/g/n extension-channel=disabled name=channel2 tx-power=25
add band=2ghz-b/g/n extension-channel=disabled name=channel2_netmetal tx-power=27
add band=5ghz-a/n/ac extension-channel=eC name=channel5_netmetal tx-power=30
/caps-man datapath
add bridge=bridge1 client-to-client-forwarding=yes local-forwarding=yes name=datapath1
/caps-man security
add authentication-types=wpa2-psk encryption=aes-ccm group-encryption=aes-ccm name=security1 passphrase=PASSWORD
/caps-man configuration
add channel=channel2 country=russia datapath=datapath1 distance=dynamic guard-interval=any hw-protection-mode=rts-cts hw-retries=5 mode=ap multicast-helper=full name=cfg2 rx-chains=0,1,2 security=security1 ssid=ssid tx-chains=0,1,2
add channel=channel5 country=russia datapath=datapath1 distance=dynamic guard-interval=any hw-protection-mode=rts-cts hw-retries=5 multicast-helper=full name=cfg5 rx-chains=0,1,2 security=security1 ssid=ssid tx-chains=0,1,2
add channel=channel2_netmetal country=russia datapath=datapath1 distance=dynamic guard-interval=any hw-protection-mode=rts-cts hw-retries=5 mode=ap multicast-helper=full name=cfg2_netmetal rx-chains=0,1,2 security=security1 ssid=ssid \
    tx-chains=0,1,2
add channel=channel5_netmetal country=russia datapath=datapath1 distance=dynamic guard-interval=any hw-protection-mode=rts-cts hw-retries=5 multicast-helper=full name=cfg5_netmetal rx-chains=0,1,2 security=security1 ssid=ssid tx-chains=\
    0,1,2
/caps-man access-list
add action=reject allow-signal-out-of-range=10s disabled=no signal-range=-120..-88 ssid-regexp=""
/caps-man manager
set enabled=yes
/caps-man provisioning
add action=create-dynamic-enabled hw-supported-modes=gn,b identity-regexp=First_Mik master-configuration=cfg2 name-format=prefix-identity name-prefix=2G radio-mac=6C:3B:6B:44:83:CF
add action=create-dynamic-enabled hw-supported-modes=ac,an identity-regexp=First_Mik master-configuration=cfg5 name-format=prefix-identity name-prefix=5G radio-mac=6C:3B:6B:44:83:CE
add action=create-dynamic-enabled hw-supported-modes=ac,an identity-regexp=Second_Mik_netmetal master-configuration=cfg5_netmetal name-format=prefix-identity name-prefix=5G radio-mac=E4:8D:8C:16:4E:D2
add action=create-dynamic-enabled hw-supported-modes=gn,b identity-regexp=Second_Mik_netmetal master-configuration=cfg2_netmetal name-format=prefix-identity name-prefix=2G radio-mac=4C:5E:0C:11:7F:D9
 
obscurus
just joined
Topic Author
Posts: 20
Joined: Thu May 04, 2017 9:25 am

Re: Capsman scheduler

Sun Jun 10, 2018 9:52 pm

i also can connect to the wifi even if i disable local forwarding and disable provisioning rules via script
 
User avatar
karlisi
Member
Member
Posts: 301
Joined: Mon May 31, 2004 8:09 am
Location: Latvia

Re: Capsman scheduler

Mon Jun 11, 2018 8:39 am

Are you sure your APs are managed by CAPsMAN? Are they on /capsman interface ?
---
Karlis
 
obscurus
just joined
Topic Author
Posts: 20
Joined: Thu May 04, 2017 9:25 am

Re: Capsman scheduler

Mon Jun 11, 2018 4:57 pm

Yes,all interfaces in capsman
 /caps-man interface print  
Flags: M - master, D - dynamic, B - bound, X - disabled, I - inactive, R - running 
 #      NAME                                                                RADIO-MAC         MASTER-INTERFACE                                                              
 0 MDBR 2G-Mik-1                                                    6C:3B:6B:44:83:CF none                                                                          
 1 MDB  2G-Mik_netmetal-1                                           4C:5E:0C:11:7F:D9 none                                                                          
 2 MDB  5G-Mik-1                                                    6C:3B:6B:44:83:CE none                                                                          
 3 MDB  5G-Mik_netmetal-1                                           E4:8D:8C:16:4E:D2 none                                                                          
 
User avatar
karlisi
Member
Member
Posts: 301
Joined: Mon May 31, 2004 8:09 am
Location: Latvia

Re: Capsman scheduler

Mon Jun 11, 2018 5:15 pm

And if you disable all provisioning rules by hand and execute provision on all radios, the interfaces are still there?
---
Karlis
 
obscurus
just joined
Topic Author
Posts: 20
Joined: Thu May 04, 2017 9:25 am

Re: Capsman scheduler

Mon Jun 11, 2018 6:06 pm

When i disable manually all provisionig rules and then execute provision on all radios - appear unnamed provisioning rules (cap1,cap2...) and i see hide ssid (not my ssid) on wifi sniffer.
Then i enable provisioning rules and execute provision on all radios - no result... i see the same hide ssid and unnamed rules. If i delete unnamed rules and execute provision on all radios -appear correct provisioning rules and correct ssid.
 
Grickos
newbie
Posts: 32
Joined: Thu Aug 06, 2015 2:57 am

Re: Capsman scheduler

Mon Jun 11, 2018 8:20 pm

You have to disable CAP interface, not Provisioning.
Or post a comment to Interface, so over the name of the comment.

/caps-man interface set [ find name="cap-wifi-homexxxx" ] disabled=yes
/caps-man interface set [ find name="cap-wifi-homexxxx" ] disabled=no
Or
/caps-man interface disable [ find name="cap-wifi-homexxxx" ]
/caps-man interface enable [ find name="cap-wifi-homexxxx" ]

Sorry for bad English
 
obscurus
just joined
Topic Author
Posts: 20
Joined: Thu May 04, 2017 9:25 am

Re: Capsman scheduler

Mon Jun 11, 2018 9:43 pm

Grickos and karlisi, many thanks for good ideas!

I could not disable capsman interfaces because in provisioning rules was set action "create dinamic enabled".
First i changed action to "create enaled" in provisioning rules and then run the follow script
/caps-man interface set [ find name="5G-cap_name" ] disabled=yes;
delay 1;
/caps-man interface set [ find name="2G-cap_name" ] disabled=yes;
delay 1;
/caps-man interface set [ find name="5G-cap_name_2" ] disabled=yes;
delay 1;
/caps-man interface set [ find name="2G-cap_name_2" ] disabled=yes;
and for enable change disabled to no (disabled=no)

And its work perfect
 
kattivius
just joined
Posts: 6
Joined: Sat Feb 08, 2020 2:27 pm

Re: Capsman scheduler

Mon May 11, 2020 12:01 pm

Grickos and karlisi, many thanks for good ideas!

I could not disable capsman interfaces because in provisioning rules was set action "create dinamic enabled".
First i changed action to "create enaled" in provisioning rules and then run the follow script
/caps-man interface set [ find name="5G-cap_name" ] disabled=yes;
delay 1;
/caps-man interface set [ find name="2G-cap_name" ] disabled=yes;
delay 1;
/caps-man interface set [ find name="5G-cap_name_2" ] disabled=yes;
delay 1;
/caps-man interface set [ find name="2G-cap_name_2" ] disabled=yes;
and for enable change disabled to no (disabled=no)

And its work perfect
Fantastic,
I tested the commands on a terminal and run the script, works beautifully.
now I created a schedule with the scheduler. if that works also, you really helped me.
I was waiting for an answer from MT support... Lets see what is their solution. So far, yours seems to be working very well.

Who is online

Users browsing this forum: quattro72 and 18 guests