Community discussions

 
Kazek
just joined
Topic Author
Posts: 24
Joined: Mon Feb 12, 2018 12:53 pm

Capsman wrongly provisions CAPs

Wed Nov 21, 2018 5:50 pm

Hi,

I have an issue with capsman.
Version 6.43.4.
I have around 180 CAPs with identities 1,2,3 etc.
In capsman i have a provision rule like this:
add action=create-dynamic-enabled identity-regexp=”1” master-configuration=cfg1 slave-configurations=cfg2 name-format=identity
add action=create-dynamic-enabled identity-regexp=”2” master-configuration=cfg1 slave-configurations=cfg3 name-format=identity
add action=create-dynamic-enabled identity-regexp=”3” master-configuration=cfg1 slave-configurations=cfg4 name-format=identity
etc
but for example when I connect CAP no 169 it shows under cap interfaces at 169 but gets provisioned as 69.
I tried 113 and was working properly and then 179 was working incorrectly again (provisioned as 79).

What am I missing here?
 
whatever
Member Candidate
Member Candidate
Posts: 100
Joined: Thu Jun 21, 2018 9:29 pm

Re: Capsman wrongly provisions CAPs

Wed Nov 21, 2018 6:08 pm

Well, regex "79" does indeed match "179", etc., so the result you are experiencing is expected.
Try using "^" and "$" in your regexes to match beginning and end of your identity strings.
 
Kazek
just joined
Topic Author
Posts: 24
Joined: Mon Feb 12, 2018 12:53 pm

Re: Capsman wrongly provisions CAPs

Thu Nov 22, 2018 12:14 pm

Thanks! The little change with ^ seems to fix the issue!
add action=create-dynamic-enabled identity-regexp=”^1” master-configuration=cfg1 slave-configurations=cfg2 name-format=identity
add action=create-dynamic-enabled identity-regexp=”^2” master-configuration=cfg1 slave-configurations=cfg3 name-format=identity
add action=create-dynamic-enabled identity-regexp=”^3” master-configuration=cfg1 slave-configurations=cfg4 name-format=identity
One more question.
Is there a way to provision CAPs by serial number (since it's the only barcode on hAP box or device itself)?
Or any way to set an serial number as identity with a script / command?
 
whatever
Member Candidate
Member Candidate
Posts: 100
Joined: Thu Jun 21, 2018 9:29 pm

Re: Capsman wrongly provisions CAPs

Thu Nov 22, 2018 3:37 pm

Changing identity to serial number via script should be possible.
 
Kazek
just joined
Topic Author
Posts: 24
Joined: Mon Feb 12, 2018 12:53 pm

Re: Capsman wrongly provisions CAPs

Sun Nov 25, 2018 12:58 pm

Someone can help? Or at least some info where can I learn the script code for mikrotik?
 
anav
Forum Guru
Forum Guru
Posts: 2967
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: Capsman wrongly provisions CAPs

Mon Nov 26, 2018 6:10 pm

First become familiar with this link1.
https://wiki.mikrotik.com/wiki/Manual:Scripting

Your exam will be in three days, if you fail, you have to send me chocolate (or whatever is the quality output of your region/area ( hopes he/she is not in farm country famous for its natural fertilizer ;-) )

Otherwise with your new found knowledge you can start to peruse all the threads and learn through the examples of others.
viewforum.php?f=9
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)

Who is online

Users browsing this forum: No registered users and 22 guests