Community discussions

MikroTik App
 
artis
just joined
Topic Author
Posts: 13
Joined: Mon Sep 06, 2021 12:48 am

cAP ac takes a long time to enable wifi

Mon Sep 06, 2021 1:18 am

Hi guys,

I have two cAP ac's on both levels around my house.
Decided to turn off wifi during the night with simple script/schedule which works brilliantly.

Problem is that sometimes it takes 20+ minutes for wlan2 to go from S to RS state when script enables interface. Clients can connect only when it's in RS state.

What could be the issue ?

One unit is 3+years old one of first one's with 256g of ram (RouterBOARD cAP Gi-5acD2nD)
Other one is just recently bought with 128g of ram (RBcAPGi-5acD2nD r2)

Every day it's different. Sometime it takes 3min for one, sometimes 23min.

Running 6.48.4

level 1 AP:
set [ find default-name=wlan2 ] adaptive-noise-immunity=none allow-sharedkey=no ampdu-priorities=0 amsdu-limit=8192 amsdu-threshold=8192 antenna-gain=0 area="" arp=enabled arp-timeout=auto band=5ghz-onlyac basic-rates-a/g=12Mbps bridge-mode=enabled channel-width=20/40mhz-Ce \
    compression=no country="new zealand" default-ap-tx-limit=0 default-authentication=yes default-client-tx-limit=0 default-forwarding=yes disable-running-check=no disabled=no disconnect-timeout=3s distance=indoors frame-lifetime=0 frequency=5180 frequency-mode=regulatory-domain \
    frequency-offset=0 guard-interval=any hide-ssid=no ht-basic-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7 ht-supported-mcs=\
    mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7,mcs-8,mcs-9,mcs-10,mcs-11,mcs-12,mcs-13,mcs-14,mcs-15,mcs-16,mcs-17,mcs-18,mcs-19,mcs-20,mcs-21,mcs-22,mcs-23 hw-fragmentation-threshold=disabled hw-protection-mode=none hw-protection-threshold=0 hw-retries=7 installation=indoor \
    interworking-profile=disabled keepalive-frames=enabled l2mtu=1600 mac-address=2C:C8:1B:15:5A:E7 max-station-count=2007 mode=ap-bridge mtu=1500 multicast-buffering=enabled multicast-helper=default name=wlan2 nv2-cell-radius=30 nv2-downlink-ratio=50 nv2-mode=dynamic-downlink \
    nv2-preshared-key="" nv2-qos=default nv2-queue-count=2 nv2-security=disabled nv2-sync-secret="" on-fail-retry-time=100ms preamble-mode=both radio-name=2CC81B155AE7 rate-selection=advanced rate-set=configured rx-chains=0,1 scan-list=default secondary-channel="" \
    security-profile=default skip-dfs-channels=all ssid=w station-bridge-clone-mac=00:00:00:00:00:00 station-roaming=disabled supported-rates-a/g=12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps tdma-period-size=2 tx-chains=0,1 tx-power-mode=default update-stats-interval=disabled \
    vht-basic-mcs=mcs0-7 vht-supported-mcs=mcs0-9,mcs0-9,mcs0-9 vlan-id=1 vlan-mode=no-tag wds-cost-range=50-150 wds-default-bridge=none wds-default-cost=100 wds-ignore-ssid=no wds-mode=disabled wireless-protocol=802.11 wmm-support=disabled wps-mode=disabled

leve 2 AP:
set [ find default-name=wlan2 ] adaptive-noise-immunity=none allow-sharedkey=no ampdu-priorities=0 amsdu-limit=8192 amsdu-threshold=8192 antenna-gain=0 area="" arp=enabled arp-timeout=auto band=5ghz-onlyac basic-rates-a/g=12Mbps bridge-mode=enabled channel-width=20/40mhz-eC \
    compression=no country="new zealand" default-ap-tx-limit=0 default-authentication=yes default-client-tx-limit=0 default-forwarding=yes disable-running-check=no disabled=no disconnect-timeout=3s distance=indoors frame-lifetime=0 frequency=5240 frequency-mode=regulatory-domain \
    frequency-offset=0 guard-interval=any hide-ssid=no ht-basic-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7 ht-supported-mcs=\
    mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7,mcs-8,mcs-9,mcs-10,mcs-11,mcs-12,mcs-13,mcs-14,mcs-15,mcs-16,mcs-17,mcs-18,mcs-19,mcs-20,mcs-21,mcs-22,mcs-23 hw-fragmentation-threshold=disabled hw-protection-mode=none hw-protection-threshold=0 hw-retries=7 installation=indoor \
    interworking-profile=disabled keepalive-frames=enabled l2mtu=1600 mac-address=64:D1:54:FF:D7:98 max-station-count=2007 mode=ap-bridge mtu=1500 multicast-buffering=enabled multicast-helper=default name=wlan2 nv2-cell-radius=30 nv2-downlink-ratio=50 nv2-mode=dynamic-downlink \
    nv2-preshared-key="" nv2-qos=default nv2-queue-count=2 nv2-security=disabled nv2-sync-secret="" on-fail-retry-time=100ms preamble-mode=both radio-name=64D154FFD798 rate-selection=advanced rate-set=configured rx-chains=0,1 scan-list=default secondary-channel="" \
    security-profile=default skip-dfs-channels=all ssid=w station-bridge-clone-mac=00:00:00:00:00:00 station-roaming=enabled supported-rates-a/g=12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps tdma-period-size=2 tx-chains=0,1 tx-power-mode=default update-stats-interval=disabled \
    vht-basic-mcs=mcs0-7 vht-supported-mcs=mcs0-9,mcs0-9,mcs0-9 vlan-id=1 vlan-mode=no-tag wds-cost-range=50-150 wds-default-bridge=none wds-default-cost=100 wds-ignore-ssid=no wds-mode=disabled wireless-protocol=802.11 wmm-support=disabled wps-mode=disabled

Thanks,
Artis
 
Rugx
Member Candidate
Member Candidate
Posts: 123
Joined: Thu Jan 02, 2020 1:44 pm

Re: cAP ac takes a long time to enable wifi

Wed Sep 08, 2021 12:41 pm

Sounds like it is running DFS radar-check as the script enables the interface. Check the latest log entries when you can access it via wlan2, or connect through wlan1 and check the wireless status of the wlan2 while it is not visible to the client devices.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: cAP ac takes a long time to enable wifi

Wed Sep 08, 2021 1:28 pm

Next time you export, do not set verbose, or other, simply "/interface wireless export" and reduce to default the terminal windows size...
 
erlinden
Forum Guru
Forum Guru
Posts: 1900
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: cAP ac takes a long time to enable wifi

Wed Sep 08, 2021 1:49 pm

Though I fully agree with @Rugx, it makes no sense as you selected non-DFS channels.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: cAP ac takes a long time to enable wifi

Wed Sep 08, 2021 2:19 pm

new zealand ranges on 6.46.8,
must checked the 6.48.4 what have inside.
5170-5250/a,an20,an40,ac20,ac40,ac80,ac160,ac80+80(23dBm)/indoor
5250-5330/a,an20,an40,ac20,ac40,ac80,ac160,ac80+80(27dBm)/dfs,passive
first C5180 + e5200:
channel-width=20/40mhz-Ce country="new zealand" frequency=5180

second e5220 + C5240:
channel-width=20/40mhz-eC country="new zealand" frequency=5240
 
artis
just joined
Topic Author
Posts: 13
Joined: Mon Sep 06, 2021 12:48 am

Re: cAP ac takes a long time to enable wifi

Thu Sep 09, 2021 11:12 pm

This is from last few days, today was record - 32min.
 time=sep/08 07:30:00 topics=script,info message="Switching wlan2 on" 
 time=sep/08 07:30:00 topics=system,info message="device changed by admin" 
 time=sep/08 07:34:29 topics=wireless,info message="58:E6:BA:BB:42:CC@wlan2: connected, signal strength -53" 

 time=07:30:00 topics=script,info message="Switching wlan2 on" 
 time=07:30:00 topics=system,info message="device changed by admin" 
 time=07:35:26 topics=wireless,info message="28:3A:4D:C3:2B:A3@wlan2: connected, signal strength -56" 

 time=sep/10 07:30:00 topics=script,info message="Switching wlan2 on" 
 time=sep/10 07:30:00 topics=system,info message="device changed by admin" 
 time=sep/10 07:57:59 topics=system,info,account message="user admin logged in from 192.168.1.144 via web" 
 time=sep/10 08:02:34 topics=wireless,info message="28:C2:1F:12:50:D6@wlan2: connected, signal strength -73" 
I logged in this morning around 8am and wlan2 was only in S state, so 32min today.
I did enable wireless,debug but did not see any radar messages and it did not show me when interface went into running state.

 time=sep/08 07:30:00 topics=script,info message="Switching wlan2 on" 
 time=sep/08 07:30:00 topics=system,info message="device changed by admin" 
 time=sep/08 07:30:29 topics=wireless,info message="FE:32:20:FA:2D:16@wlan2: connected, signal strength -66" 

 time=07:30:00 topics=script,info message="Switching wlan2 on" 
 time=07:30:00 topics=system,info message="device changed by admin" 
 time=07:31:27 topics=wireless,info message="FE:32:20:FA:2D:16@wlan2: connected, signal strength -72" 

 time=sep/10 07:30:00 topics=script,info message="Switching wlan2 on" 
 time=sep/10 07:30:00 topics=system,info message="device changed by admin" 
 time=sep/10 07:30:09 topics=wireless,info message="90:B1:44:71:43:61@wlan2: connected, signal strength -66" 

At this point it looks like only old device is affected.

Could be that she is old and need replacement ? ;)

btw, not sure why /log print detail does not show date for yesterday entries
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: cAP ac takes a long time to enable wifi

Thu Sep 09, 2021 11:18 pm

what you put on scheduler???

script,info message="Switching wlan2 on"
 
artis
just joined
Topic Author
Posts: 13
Joined: Mon Sep 06, 2021 12:48 am

Re: cAP ac takes a long time to enable wifi

Thu Sep 09, 2021 11:45 pm

/system scheduler
add interval=1w name=w-on-1 on-event=wlan-on policy=read,write start-date=aug/02/2021 start-time=07:30:00
add interval=1w name=w-on-2 on-event=wlan-on policy=read,write start-date=aug/03/2021 start-time=07:30:00
add interval=1w name=w-on-3 on-event=wlan-on policy=read,write start-date=aug/04/2021 start-time=07:30:00
add interval=1w name=w-on-4 on-event=wlan-on policy=read,write start-date=aug/05/2021 start-time=07:30:00
add interval=1w name=w-on-5 on-event=wlan-on policy=read,write start-date=aug/06/2021 start-time=07:30:00
add interval=1w name=w-on-6 on-event=wlan-on policy=read,write start-date=aug/07/2021 start-time=07:30:00
add interval=1w name=w-on-7 on-event=wlan-on policy=read,write start-date=aug/08/2021 start-time=07:30:00

And this is wlan-on script:
:global WlanOn do={
  if ([/interface get $1 comment]="disabled") do={
    :log info "$1 admin disabled";
  } else={
    if ([/interface get $1 disabled]=true) do={
      :log info "Switching $1 on";
      /interface enable $1;
    } else={
      :log info "$1 already on";
    }
  }
}

$WlanOn wlan2;
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: cAP ac takes a long time to enable wifi

Fri Sep 10, 2021 12:05 am

Ignoring the scheduler and script I don't like how they were written (one single scheduler repeat everyday, instead of a 7 identical schedulers repeated every week),

have you checked that the devices have synchronized time and date?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: cAP ac takes a long time to enable wifi

Fri Sep 10, 2021 12:12 am

fixing the script:
:global WlanOn do={
/interface wireless
:if ([get $1 comment]="disabled") do={
    :log info "Not enabled $1 admin disabled"
} else={
    :if ([get $1 disabled]) do={
      :log info "Enabled $1"
      enable $1
    } else={
      :log info "Already enabled $1"
    }
  }
}

$WlanOn wlan2

Or ignoring superfluos logging:
# simply do that without specify interface, enable all wireless (disabled and not "admin disabled")
/int wireless enable [find where disabled=yes and comment!="disabled"]

# or a function to specifyng wireless interface:
:global enablewlan do={/int wireless enable [find where name=$1 disabled=yes and comment!="disabled"]}
$enablewlan wlan2
 
artis
just joined
Topic Author
Posts: 13
Joined: Mon Sep 06, 2021 12:48 am

Re: cAP ac takes a long time to enable wifi

Fri Sep 10, 2021 12:18 am

scheduler will be different for working days/weekends, that's why I did not do it as one liner
and script could be done with less lines but I also use mode button on unit so I can toggle wifi on/off without logging into unit.

I don't use ntp and clocks looks ok:
[admin@MikroTik L2] > /system ntp export         
# sep/10/2021 09:15:25 by RouterOS 6.48.4
# software id = 6EZV-63I1
#
# model = RouterBOARD cAP Gi-5acD2nD
# serial number = 819907B30BF4
.
[admin@MikroTik L2] > /system clock export   
# sep/10/2021 09:15:34 by RouterOS 6.48.4
# software id = 6EZV-63I1
#
# model = RouterBOARD cAP Gi-5acD2nD
# serial number = 819907B30BF4
/system clock
set time-zone-name=Pacific/Auckland

can clock influence it somehow ?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: cAP ac takes a long time to enable wifi

Fri Sep 10, 2021 12:21 am

Yes, if have different times... :lol: :lol: :lol:


>>>scheduler will be different for working days/weekends, that's why I did not do it as one liner
understand, but I write that because are identical

>>>and script could be done with less lines
yes, and also writed with correct syntax...

>>>but I also use mode button on unit so I can toggle wifi on/off without logging into unit.
have you already one script?

thanks, I forget to add it to my Snippets on signature.... :)
viewtopic.php?f=7&t=115078&p=857648#p857648
 
artis
just joined
Topic Author
Posts: 13
Joined: Mon Sep 06, 2021 12:48 am

Re: cAP ac takes a long time to enable wifi

Mon Sep 27, 2021 10:57 pm

Anyone with more ideas or how to debug what's holding AP to start ?

This morning newest AP failed to start.

wifi2 was enabled around 7:30am and now it's 8:49am but interface is still only in S state.

Rebooted AP at 8:51am.

wlan2 is still down at 8:56am.

Who is online

Users browsing this forum: robmaltsystems and 31 guests