Wireless distance setting on hAP ac lite

This one has had me pulling my hair out as I thought I was going mad. I often convert Mikrotik devices into what I call APS - access point with switch. Basically reset configuration with no default setting (so no firewall, DHCP & NAT), add a bridge, add all ports to bridge and configure Wi-Fi. I’ve got a short procedure to do this and it’s work fine for years.

Came to configure a hAP ac lite in this way but I could just not get my Xiaomi Redmi Note 12 pro 5g to connect reliably. 2G was a bit more reliable but not perfect. However, if I reset the same device as a router, it worked perfectly - even when changing the Wi-Fi settings & security to be identical.

Annoyingly, almost every other device I’ve got connected fine - Android tablet, Lenovo laptop, USB Wi-Fi adapter for my PC, Kindle. Just my mobile wouldn’t connect 99% of the time.

So I started looking at the export in detail, esp. the /interface/wireless/export section. Comparing them side by side, I spotted just one configuration settings that was present when in router mode but NOT in reset with no default configuration:

set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-XXXX country=“united kingdom” disabled=no distance=indoors installation=indoor mode=ap-bridge security-profile=private ssid=MikroTik-5G wireless-protocol=802.11
Look at the advanced tab and distance is set to dynamic. Something must have changed in the latest version of ROS v7 here with legacy wireless driver. I don’t recall seeing this setting before.

Anyone got any idea what this setting is and why dynamic might stop my mobile connecting? Change it to indoors and mobile connects fine.

My main router at home is a hAP ax2 with uses the new wireless drivers (wifi-qcom). That doesn’t have distance=indoors in the configuration but equally the distance field doesn’t have an option for dynamic. I looked back through this forum and distance=indoors has been around a long time. I wonder why I’ve not spotted this before with my mobile. All a bit confusing!

Distance has been for a long time when advanced mode is enable.
In AP mode, the default setting for distance is dynamic, which adjusts the ACK timeout based on the connected devices. Some devices might struggle with this dynamic adjustment. When you set the distance to indoors, it uses a fixed timeout optimized for indoor environments, which is probably your phone connects fine.
ACK timeout is the time a wireless device waits for confirmation that a data packet was received before considering it lost and retransmitting. If the ACK timeout is too short, the device might assume packets are lost and retransmit too often, causing delays or interruptions in communication, which can lead to the wireless client disconnecting.

The setting shouold be only on the “wireless” package (not on wifi/qcom-ac).
https://help.mikrotik.com/docs/display/ROS/Wireless+Interface

distance (integer | dynamic | indoors; Default: dynamic) How long to wait for confirmation of unicast frames (ACKs) before considering transmission unsuccessful, or in short ACK-Timeout. Distance value has these behaviors:

Dynamic - causes AP to detect and use the smallest timeout that works with all connected clients.
Indoor - uses the default ACK timeout value that the hardware chip manufacturer has set.
Number - uses the input value in formula: ACK-timeout = ((distance * 1000) + 299) / 300 us;

Acknowledgments are not used in Nstreme/NV2 protocols.

but it is not “new”, as the same text is present also on the wiki.

This:

Dynamic - causes AP to detect and use the smallest timeout that works with all connected clients.

should probably be read as:

Dynamic - causes AP > to attempt > to detect and use the smallest timeout that works with all connected clients.
When it works, it works, when it doesn’t your connection with this (or that) device will be not stable.