Faster Wifi station connect improvement

gatisp
Posts: 19
Joined: Thu May 26, 2016 11:49 am

Faster Wifi station connect improvement

Postby gatisp » Sun Sep 10, 2017 9:03 am

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!

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: Faster Wifi station connect improvement

Postby ESP_Sprite » Mon Sep 11, 2017 2:45 am

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.

gatisp
Posts: 19
Joined: Thu May 26, 2016 11:49 am

Re: Faster Wifi station connect improvement

Postby gatisp » Mon Sep 11, 2017 6:18 am

Thanks ESP_Sprite for prompt reply,

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

eyaleb
Posts: 31
Joined: Sun May 14, 2017 6:54 am

Re: Faster Wifi station connect improvement

Postby eyaleb » Tue Sep 12, 2017 6:24 am

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).

Who is online

Users browsing this forum: Baidu [Spider] and 253 guests