user86020: I have an Arduino Nano 33 IoT configured to connect to my WiFi network with a pretty straightforward code:
#include <WiFiNINA.h>

int status = WL_IDLE_STATUS;
status = WiFi.status();
while (status != WL_CONNECTED) {
    status = WiFi.begin(ssid, pass);
    if (status == WL_CONNECTED) break;
    delay(5000);
}

My problem is that in an environment with multiple access points sharing the same SSID (roaming environment) my Arduino is constantly connecting to the weakest one of the access points.
I verified with WiFi Explorer on my laptop that multiple access points are in reach at the same location where the Arduino is placed and for some reason my Arduino decides to connect to the base station with BSSD ending :CA:81, which is paradoxly the weakest one:

Is there a way to address this issue?

user37622: On Nano 33 IoT the WiFi network adapter is NINA esp32 module with Arduino's nina-fw. nina-fw is written with the use of ESP-IDF framework by the esp32 manufacturer Espressif.
To connect to an AP the ESP-IDF has a configuration function, which takes a structure with settings. One of the settings is wifi_scan_method and nina-fw uses WIFI_FAST_SCAN. The alternative is WIFI_ALL_CHANNEL_SCAN.

WIFI_FAST_SCAN Do fast scan, scan will end after find SSID match AP

There is no simple solution for this. I don't know why they changed the setting. If it should be configurable then the firmware and the WiFiNINA library have to change to support it.
Or you can get the sources of the firmware, change the setting, build the firmware (it is not trivial) and flash it to NINA on your Nano.

86020: <p>I have an Arduino Nano 33 IoT configured to connect to my WiFi network with a pretty straightforward code:</p>
<pre class="lang-cpp prettyprint-override"><code>#include &lt;WiFiNINA.h&gt;

int status = WL_IDLE_STATUS;
status = WiFi.status();
while (status != WL_CONNECTED) {
    status = WiFi.begin(ssid, pass);
    if (status == WL_CONNECTED) break;
    delay(5000);
}
</code></pre>
<p>My problem is that in an environment with multiple access points sharing the same SSID (roaming environment) my Arduino is constantly connecting to the weakest one of the access points.</p>
<p>I verified with WiFi Explorer on my laptop that multiple access points are in reach at the same location where the Arduino is placed and for some reason my Arduino decides to connect to the base station with BSSD ending <strong>:CA:81</strong>, which is paradoxly the weakest one:</p>
<p><a href="https://i.stack.imgur.com/uF4Cg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uF4Cg.png" alt="WiFi explorer" /></a></p>
<p>Is there a way to address this issue?</p>
 37622: <p>On Nano 33 IoT the WiFi network adapter is NINA esp32 module with Arduino's nina-fw. nina-fw is written with the use of ESP-IDF framework by the esp32 manufacturer Espressif.</p>
<p>To connect to an AP the ESP-IDF has <a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_wifi.html#_CPPv419esp_wifi_set_config16wifi_interface_tP13wifi_config_t" rel="nofollow noreferrer">a configuration function</a>, which takes a structure with settings. One of the settings is wifi_scan_method and <a href="https://github.com/arduino/nina-fw/blob/c84aa3406717af771653733fb9c3480bdf5e1a64/arduino/libraries/WiFi/src/WiFi.cpp#L188" rel="nofollow noreferrer">nina-fw uses</a> WIFI_FAST_SCAN. The alternative is WIFI_ALL_CHANNEL_SCAN.</p>
<blockquote>
<p>WIFI_FAST_SCAN Do fast scan, scan will end after find SSID match AP</p>
</blockquote>
<p>There is no simple solution for this. I don't know why they changed the setting. If it should be configurable then the firmware and the WiFiNINA library have to change to support it.</p>
<p>Or you can get the sources of the firmware, change the setting, build the firmware (it is not trivial) and flash it to NINA on your Nano.</p>
