Page 1 of 1

Faster Wifi station connect improvement

Posted: Sun Sep 10, 2017 9:03 am
by gatisp
Hello,

How would it be possible to setup wifi station mode so that ESP32 connects to AP immediately after receiving good Probe Response?

My tests are showing that after esp_wifi_connect() is invoked (sta.channel in config is set to channel the AP is in) the ESP32 actually does so called "active scan" by sending Probe Request frame and receives a good "Probe Response".

But the problem is that ESP32 even after receiving good Probe Response is still waiting for the per channel scan timeout (100ms) before attempting to actually connect.

I can understand the logic behind this behaviour of course - there might be other APs with same SSID, with better signal that might respond later.

But it would be greatly appreciated if it would be possible to have a "hinted" connect mode - just like channel "hint" in struct wifi_sta_config_t - connect to first responding AP (or connect to AP with specific MAC address avoiding scanning / Probe Request / Response stuff altogether).

This would save about 100ms of PHY RF active time in most cases when the AP you are connecting to is the same as previous time -
which is a great deal of power saving in our battery powered application.

Does anyone have a solution for this?

Your input is greatly appreciated!

Re: Faster Wifi station connect improvement

Posted: Mon Sep 11, 2017 2:45 am
by ESP_Sprite
That sounds like a good idea! Would you mind filing it on the esp-idf Github issue tracker so we can track this issue? Things like this tend to get lost when posted as forum posts, on Github we have better tracking.

Re: Faster Wifi station connect improvement

Posted: Mon Sep 11, 2017 6:18 am
by gatisp
Thanks ESP_Sprite for prompt reply,

opened an issue here: https://github.com/espressif/esp-idf/issues/986

Re: Faster Wifi station connect improvement

Posted: Tue Sep 12, 2017 6:24 am
by eyaleb
In a similar vein: is there a way to have a station mode connection happen without needing an explicit set-up?
This should make wifi available as soon as the idf can execute it after restart/wakeup (without any app involvement).

I thought I read somewhere that auto connect is possible but never managed it.

If this is possible then I will appreciate an example of this. I expect that there is a need to store some information (in nvs_flash?) initially.

I see this happening with the sdk on the esp8266, and I have a wifi connection in about 200ms (my app then sets a static IP and can start communicating).