-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does ESP32 support seamless Wi-Fi roaming (IEEE 802.11v , r, k) in the STA mode? (IDFGH-1392) #3671
Comments
Currently ESP32 does not support these features. We will keep these requirements in mind, but it is unlikely that they will be available anytime soon. Among the three, we may prioritise 11r though. |
It's been almost a year, any progress on this front? |
We have started working on 11r. However, it is still at preliminary stage. |
Is the 11r going to be available to resellers/packagers such as u-blox? |
I have noticed that 27101f9 added initial roaming support. Also note, the comment of esp_wifi_set_rssi_threshold() says But in the example code, it actually calls it when got WIFI_EVENT_STA_CONNECTED? |
Hi @AxelLin , 11r support will be added in future. 'This API needs to be called every time after WIFI_EVENT_STA_BSS_RSSI_LOW event is received.' |
any updates? |
Hi @policeman0077, we had to put 11r in the backlog because of other higher priority action items. We will keep you updated when we restart 11r activity. We are targeting 2nd quarter of 2021. |
thank you :) |
After checking the roaming_example.c code, it looks like esp_bss_rssi_low_handler can be a common implementation to me. |
Hi @AxelLin , esp_bss_rssi_low_handler can indeed be a common implementation, however it shouldn't be part of supplicant. People may want to do different kind of roaming/disconnection(normal AP switch, 11r based roam, 11kv based roam) based on this trigger. This will only be added in a common implementation if we decide to have a separate roaming component, in that case it will act as one of the triggers to initiate roaming. Currently, we are delaying these tasks in favor of other high-priority features. |
If I have CONFIG_WPA_11KV_SUPPORT=y but didn't call esp_wifi_set_rssi_threshold() at all, |
Hi @AxelLin , Yes it's safe to enable only CONFIG_WPA_11KV_SUPPORT=y and not calling esp_wifi_set_rssi_threshold(). esp_wifi_set_rssi_threshold() allows users to write an algorithm for station-initiated roaming based on RSSI. Only enabling CONFIG_WPA_11KV_SUPPORT will enable the device to support network-initiated roaming which is sufficient in most cases. |
I don't quite understand this.. |
Triggered from AP side
|
Hi @kapilkedawat How to debug (just want to make sure roaming is triggered, etc) for the case without calling esp_wifi_set_rssi_threshold()? @kapilkedawat Does it work for you with the wifi roaming example code if CONFIG_EXAMPLE_WIFI_RSSI_THRESHOLD=0? BTW, But since it's an optional setting, I suppose it can be disabled. |
Hi @AxelLin, 'In my test, seems nothing happen if I didn't call esp_wifi_set_rssi_threshold().' When 11KV is enabled, client essentially tells the AP that it support 11k and 11v. AP may use those features to steer client to a suitable AP in the network(how AP decides whether it needs to steer the client and on which AP will entirely depend on access point and client has no control over it). We have verified it TP link Deco routers and some other mesh wifi systems and it works fine. Enabling CONFIG_WPA_SCAN_CACHE adds the support of table scan capability. AP may request scan table using 11K and therefore the support was added. Max memory impact due to this is around 10KB heap memory(scan table cache size * assuming max beacon/probe size of 1KB). It normally has no impact on roaming since we have seen generally AP request for active scan during the steering but as I explained earlier its entirely depends on AP. |
I don't quite understand the logic in below code block: My questions:
BTW, some of my device hitting OOM while testing. |
I think there are some problem with CONFIG_WPA_11KV_SUPPORT=y. I test with TP link Deco (mesh with 4 deco). The symptom is the same, the request size=1696, caps=0x1800. |
Hi @AxelLin, Can you please provide sniffer capture and wifi + supplicant logs? We will take a look. |
Hi @kapilkedawat |
In my device's debug log I found when the device run into OOM: Note, if I re-compile the firmware with CONFIG_WPA_11KV_SUPPORT=n, the issue never happen. (Just a hint) |
In my test, the device will receive WIFI_EVENT_STA_BSS_RSSI_LOW event only 1 time after the device connected to AP. In roaming_example.c, it calls esp_wifi_set_rssi_threshold() when got WIFI_EVENT_STA_CONNECTED. However, if I call esp_wifi_set_rssi_threshold() after got WIFI_EVENT_STA_BSS_RSSI_LOW event. |
Example may be too simplistic, but roaming algorithm can be as complex as you want, implement timers and dynamic rssi thresholds etc... |
The roaming_example.c is the only reference code for wifi roaming in esp-idf. What I want to do is just with fixed rssi threshold so actually I want the code |
Station has no control whatsoever on AP trigger, how and when AP decides to roam a station is completely in AP's control. AP can even try to roam a station using legacy methods.
rm_enabled = 0 && btm_enabled = 0 disables station's rm and wnm capabilities and the corresponding caps won't show during association. Also station won't honour those specific packets. |
(I don't see any progress regarding 11r) |
Could you help to explain a bit about below roaming example code? It seems make more sense if the checking is "if (val != &rrm_ctx) {" instead. (By compare the address rather than the dereference value) |
@AxelLin Idea was here to send some magic number and compare them. However, yes you can use pointer validation or use to context to pass some data to handler if needed. How we want to use it completely depend on the user implementation. |
That example code looks wrong to me. BTW, below comment says "send AP btm query, this will cause STA to roam as well" But when I test it, it does not cause STA to roam. I can observe many of below log when rssi is log, but it does not roaming: |
As I said, we need to replace value to a cookie value. Example is just how we can do it.
|
Figure out the reason why my device does not roam when rssi is low: In compare_scan_neighbor_results, the wpa_s->wnm_num_neighbor_report is always 1 Do you have any idea what could be wrong? Note: |
Please share the sniffer capture and app_test code logic to debug this faster. One thing you can check by yourself whether AP is providing any candidate besides itself in the BTM req. If it's not, station will not move. |
well, I got it working now. |
After STA (esp32) joined an AP, is there any API to know if the AP has 802.11kv support? BTW, Having API to tell if AP has 802.11kv support is helpful for debug issues. |
@AxelLin: it would be great if you could share your solution! There are so many people out there (me included) that have the same problem. |
I'm not allowed to post my code since I don't work for espressif. |
Just update 11r support is merged to master, you can get it since 805b5c9 |
A question about testing 802.11r: What's the user visible changes with 802.11r enabled v.s. disabled? I got below messages with 802.11r enabled, is this normal behavior? (The message/behavior seems the same as 802.11r disabled) I (125300) networking: RMM neigbor report bssid=ac:84:c6:32:1a:27 info=0x1897 op_class=0 chan=44 phy_type=9 W (135397) wifi:idx |
Hi,
Thanks |
@chegewara do you see any issues? |
Im not sure, as it was a quick test so far. I dont know how fast this event should be triggered when threshold is detected: |
Hi, Thanks |
There is no specific reason, feel free to use reason code most suitable for your case. |
Hi,
When i enable only 2.4Ghz on that wifi mesh then esp32 can easy roam.
Thanks |
@chegewara ESP32 do not support 5GHz, can't scan 5GHz Wi-Fi. @kapilkedawat is MBO necessary in this case? |
Hi @jack0c
I have no idea what is preventing esp32 to roam, maybe its somehow related to other issues reported when esp32 cant connect wifi when 2.4 and 5GHz SSIDs are the same (i tried this option and got no issues here). Thanks |
@jack0c MBO is not necessary for the roaming. the example only demonstrate network assisted roaming and probably getting confused by the candidate list btm query. @chegewara I somehow missed the comment posted by you. Please try the attached patch and see if that helps when 5ghz APs are also enabled. |
@kapilkedawat I believe ive been trying it by myself already and i think it didnt help. Thanks |
If possible, can you share the sniffer capture so that we can take a look? |
I have many different tools, but ididnt learn to use wireshark with external packets sniffing yet, sorry. |
No description provided.
The text was updated successfully, but these errors were encountered: