Smart home devices are still getting disconnected

Hi,
I have lot of smart home devices and when they are on mikrotik WiFi, they are still getting disconnected every 20mins, but when on TP-Link WiFi, they working normal. On Mikrotik log a getting this meeeages:

XX:XX:XX:XX:XX:XX@wlan1: disconnected, received deauth: sending station leaving (8)
OR
XX:XX:XX:XX:XX:XX@wlan1: disconnected, received disassoc: sending station leaving (8)

after few second it connect back, with this message:
XX:XX:XX:XX:XX:XX@wlan1: connected, signal strength -51

Can help me somebody? Thanks

Can you please post the config of the Mikrotik device
(/export hide-sensitive file=anynameyouwish)

I have minr router and AP connected via Ethernet cable

MAIN ROUTER

dec/03/2021 12:20:24 by RouterOS 6.47.10

software id = XXXXXX

model = RB3011UiAS

serial number = XXXXXXXXXXXX

/interface bridge
add name=bridge1
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool0 ranges=192.168.1.100-192.168.1.200
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=bridge1 name=dhcp1
/interface bridge port
add bridge=bridge1 interface=sfp1
add bridge=bridge1 interface=ether10
add bridge=bridge1 interface=ether9
add bridge=bridge1 interface=ether8
add bridge=bridge1 interface=ether7
add bridge=bridge1 interface=ether6
add bridge=bridge1 interface=ether5
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether2
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/ip address
add address=192.168.13.200/24 interface=ether1 network=192.168.13.0
add address=192.168.1.1/24 interface=bridge1 network=192.168.1.0
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=8.8.8.8 gateway=192.168.1.1
/ip dns
set servers=8.8.8.8
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1 out-interface-list=
all
/ip route
add distance=1 gateway=192.168.13.210
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/Bratislava
/system identity
set name=“MainRouter (RB3011UiAS-RM)”


AP:

dec/03/2021 01:15:19 by RouterOS 6.45.9

software id = XXXXXX

model = RB951Ui-2nD

serial number = XXXXXXXXXXXXX

/interface bridge
add fast-forward=no name=bridge1
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa-psk,wpa2-psk eap-methods=“” mode=dynamic-keys
name=profile1 supplicant-identity=“”
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n country=aruba disabled=no
mode=ap-bridge security-profile=profile1 ssid=xxxxxxx
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
add bridge=bridge1 interface=wlan1
/ip address
add address=192.168.1.230 interface=bridge1 network=192.168.1.0
/system clock
set time-zone-name=Europe/Bratislava
/system identity
set name=“xxxxxxx (hAP)”

A config export in cases like this is pretty useless.
You’d have to capture the actual wireless traffic and see what makes the station send deauth/disassoc.
Or, at least enable wireless debug logging and see if there’s anything relevant in there when it happens.
See: https://wiki.mikrotik.com/wiki/Manual:Wireless_Debug_Logs

okay, i just enabled it, I will check it, but i dont know how i can fix that problem…

sending station leaving (8)

Your config seems OK. Txs for posting it.
Hint: Remove the “b” in “802.11 b/g/n” if there is no explicit “b” need.

The error message says with (8) that the client is voluntary leaving the connection. There are many possible reasons for this. But it is a client device decision!
https://aboutcher.co.uk/2012/07/linux-wifi-deauthenticated-reason-codes/
Reason (3) would have been a total different story.

  • Mostly it is because the client is roaming to another AP or different SSID on the same AP. (same or different SSID).
  • Clients tend to scan the area for better connection every x minutes. The timing depends on the quality of the current connection.
  • Criteria for scanning differ per wifi implementation on the client.
  • Unless you have a tool to collect all connections (like DUDE) , it might be hard to follow the client.
  • If the better promessing SSID is not usable, the client will come back very soon.
  • Not usable means things like: failed authentication, no DHCP IP address, no Internet connection, excessive errors, kicked off by AP, …
  • Known reasons for (8) are failing: group-key renewal, DHCP lease renewal, wrong bridge setting (http://forum.mikrotik.com/t/received-disassoc-sending-station-leaving-8/77161/1)

To see some more information in general:

  • add Topics “Wireless” to System->Logging
  • check all details in the wireless Registration table while connected

But in this case it is a client device decision. It will be hard to tell from the AP data why the client decided to go. Timed logging over multiple incidents may learn something from the exact timing.

But i have one AP which is TP-Link or UBNT and same device works normal, whithout leaving

Yes, not even surprised. The 802.11 wifi standard is complex and has many options and extensions.
Not even talking about the wifi4 (n), 5(ac) or 6 (ax)

Other additions are like 802.11k r and v, about fast roaming. Some Apple devices need them just to have a stable connection.
There is also WMM, almost always activated by default
There is QBSS with additional channel load information , appearance sometimes linked to enabling WMM
There is the lowest broadcast rate (basic rate), and supported rates.
There is group-key renewal, and DHCP renewal
etc etc etc … a lot of options broadcasted in the beacon.

And the client decides on all this.

If you know that QBSS is missing with Mikrotik, and MT does not support 802.11k r/v, and even WMM is not always enabled.
And that users reading this forum experiment with basic rates settings
It happens quite often that the client prefers other brands before Mikrotik.
So if your device is associated to a MT AP, chances are that it will roam to any other brand, as soon as one comes into reach.
There is much less probability a device will roam from another brand to MT.

Unfortunately … http://forum.mikrotik.com/t/802-11ac-severe-speed-degradation-with-ros-above-6-45-9-lts/148854/1 … and it is version dependend.
But before you dump MT, also the opposite happens e.g. where 802.11k creates regular disconnects.
(https://community.ui.com/questions/Intermittent-Connectivity-with-Apple-Devices-and-Fast-Roaming/f3755d0c-101c-4e16-bd04-71e28b49a22d)

Other brands have less parameters to set. The system have been tested to operate in the largest possible set of situations.
MT has many parameters to set. Some default values are far from ideal for some environments, and quite some “enhancements” are just missing.
So tuning with MT is a must. The tuning is very static (no auto adjust) so it is mostly valid for one type of client in a specific range.

If the many “disconnects” happen with other brands … you are lost. If it happens with MT you must analyze and tune more.

Under system logging enable both Debug and Wireless in the Topics section and see what additional info you get …

Some smart devices are ornery and no matter what you do its a pita…
I have both and concur less problems overall with TP link than Capac.

Makes me wonder: do you actually see any problems with those devices when connected to Mikrotik AP? Some reasons for disconnects, listed in post by @bpwl, will happen on other vendor’s APs as well … but those APs might not issue any log entry for such behaviour as it might be considered normal.

I have problem only with Mikrotik AP, I know it bcs smart devices on mikrotik every 5-10mins are not responding, but on TP-link always responding, I see it trough app and when i use voice commands…

but i tested around 5-8 smart devices on mikrotik AP and all of them getting disconnected, but with TP-link works well :confused:

only this repeating:
wlan1: XX:XX:XX:XX:XX:XX attempts to associate
wlan1: XX:XX:XX:XX:XX:XX not in local ACL, by default accept
XX:XX:XX:XX:XX:XX@wlan1: connected, signal strength -60
XX:XX:XX:XX:XX:XX@wlan1: disconnected, received disassoc: sending station leaving (8)

XX:XX:XX:XX:XX:XX@wlan1: connected, signal strength -60
XX:XX:XX:XX:XX:XX@wlan1: disconnected, received disassoc: sending station leaving (8)

Timing between the 2 please, is this 2 sec or 20 min ?
Other check is “Uptime” and “Last activity”.
Uptime: to know how long the connection is valid
Last activity: is to be live monitored. e.g. smartphones in rest make this count up to something like 20 sec , and then restart counting (they go to sleep for 20 sec). Some do drop the signal strength with 20 dB, some others stay on level.
Klembord-2.jpg
.
Klembord-3.jpg
.

So if your device is associated to a MT AP, chances are that it will roam to any other brand, as soon as one comes into reach.

.
Please turn off the TP-link while testing, or remove that SSID from the known networks in the devices.

.
time between disconnect and connect is about 2min, and connect between disconnect 5min.
Uptime is around 20hours, last activity is about 10-20s to restart


Please turn off the TP-link while testing, or remove that SSID from the known networks in the devices.


Also I tired turn off all nearby AP other brands, but no changes, still disconnecting

what kind of Smart devices do you have problems with ?

time between disconnect and connect is about 2min, and connect between disconnect 5min.
Uptime is around 20hours, last activity is about 10-20s to restart

Interesting info …
They come back after 2 min. Quite a long time if they wanted to continue.
Connect for 5 min. Any related setting, like DHCP lease time ? (Enable Logging DHCP) Default DHCP lease time is 10 min, lease renewal is after 5 min. If this fails you have disconnect.
Uptime connection 20 hours ??? (Or uptime RouterOS?) How can this be that value for the wifi connection?
Sleepy devices! IOT with transmits every 10-20 sec ??? There is no access-list rule that checks signal strength with “allowed out of range” time ??? Heh not seen in the config.

DHCP renewal has been mentioned several times already! MT has a low 10 min default value for lease time-out. (other brands probably 24h)

I post it all the time.

RouterOS. Great for routing… But pick a different flavor for client serving wifi.

As I have been saying, the home wifi bozos at MT should have hired BPWL to ensure a viable WIFI setup and performance from the firmware and better documentation.