Wifi provisioning not connecting to the best rssi AP.

CKiamy
Posts: 19
Joined: Wed Nov 23, 2022 3:01 pm

Wifi provisioning not connecting to the best rssi AP.

Postby CKiamy » Mon May 22, 2023 9:02 am

ESP-IDF version: 5.1
Device: ESP32-WROOM_32UE

Problem description: I am using the wifi-provisioning API and example provided by Espressif. I am situated in a place with multiple access points within the same SSID/router. I want for my device to connect to the nearest AP upon providing credentials to the device. The device successfully detects the nearest AP upon scan (sorts through signal, and suggests the lowest rssi options first), however, once the device receives the credentials, it will sometimes connect to an AP that is further away. This is proven by logging the BSSID and RSSI of the scanned AP, and the actual connection to the other AP.

Expected behaviour: Device scans for the nearest AP, gets credentials, connects to it.

Actual behaviour: Device scans for the nearest AP, gets credentials, sometimes connects to a further away AP.

For other applications I have used the structure wifi_sta_config_t and "steer" or provide the device with the BSSID I want for it to connect to. I want to mimic this same behaviour by providing the device the BSSID with the best signal. However, navigating through the wifi_provisioning source files (manager.c, handlers.c, wifi_config.c... it is pretty confusing to know where the device is actually configuring the wifi_sta_config_t structure. I have tried modifying the set_config_handler and get_status_handler handler function, but to no avail. It seems the BSSID is not actually given as a parameter.

How can I force the device to connect to the strongest AP after provisioning its credentials?

CKiamy
Posts: 19
Joined: Wed Nov 23, 2022 3:01 pm

Re: Wifi provisioning not connecting to the best rssi AP.

Postby CKiamy » Wed May 24, 2023 7:46 am

bump

CKiamy
Posts: 19
Joined: Wed Nov 23, 2022 3:01 pm

Re: Wifi provisioning not connecting to the best rssi AP.

Postby CKiamy » Thu May 25, 2023 2:40 pm

Does anyone have a clue? I am sorry I am bumping this so frequently, I am in a pretty tight position at the moment, and I am still stuck with this problem.

I am currently using a workaround, where I disconnect and then connect to the desired AP, but this is not ideal in any way.

ghost07
Posts: 36
Joined: Mon Oct 03, 2022 11:47 am

Re: Wifi provisioning not connecting to the best rssi AP.

Postby ghost07 » Thu May 25, 2023 4:27 pm

Could you show the code?
How do you setup wifi_sta_config_t? Are you setting "bssid_set" parameter to 1?

Who is online

Users browsing this forum: Google [Bot] and 366 guests