Capsman scheduler

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

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]

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?

Try on first line

/caps-man provisioning disable numbers=[find]

And on second script too. This should disable and enable all configurations.

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

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.

So, something wrong with configurations included in these provisionings.

No, i have correct configuration, because wifi roaming are correct in my network. Maybe it is because i have local forwarding enable?

Post export from /capsman provisioning and /capsman configuration please.

/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

i also can connect to the wifi even if i disable local forwarding and disable provisioning rules via script

Are you sure your APs are managed by CAPsMAN? Are they on /capsman interface ?

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

And if you disable all provisioning rules by hand and execute provision on all radios, the interfaces are still there?

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.

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

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.

Does anyone have working solution to disable wifi during night when sleeping. I have two HAP ac2.


\