]> granicus.if.org Git - esp-idf/commitdiff
optimize scan before station connecting to AP
authorXiaXiaotian <xiaxiaotian@espressif.com>
Wed, 26 Apr 2017 03:45:30 +0000 (11:45 +0800)
committerXiaXiaotian <xiaxiaotian@espressif.com>
Thu, 27 Apr 2017 06:28:52 +0000 (14:28 +0800)
    1. Store the information of AP(ssid, password, bssid, channel, etc)
    into nvs when station connects to AP successfully. If station
    connects to the same AP next time, it will scan the stored channel of the AP
    first.

    2. Add a parameter of channel for scanning before connecting to AP.
    If it is set to 1~13, station will scan starting from the channel.
    If the channel of AP is unknown, set it to 0.

components/esp32/include/esp_wifi_types.h
components/esp32/lib

index a473d3b04d154f553dad1332106ec0854acd0a82..1ab6a464fde240095edc9a5784ee03ab072a81f9 100755 (executable)
@@ -164,6 +164,7 @@ typedef struct {
     uint8_t password[64];  /**< password of target AP*/
     bool bssid_set;        /**< whether set MAC address of target AP or not. Generally, station_config.bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP.*/
     uint8_t bssid[6];     /**< MAC address of target AP*/
+    uint8_t channel;       /**< channel of target AP. Set to 1~13 to scan starting from the specified channel before connecting to AP. If the channel of AP is unknown, set it to 0.*/
 } wifi_sta_config_t;
 
 typedef union {
index 53aac75afe219af9feca42aca7f1126d394844c9..fd7893d22ae4d43488c950583db7125c37b5ba80 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 53aac75afe219af9feca42aca7f1126d394844c9
+Subproject commit fd7893d22ae4d43488c950583db7125c37b5ba80