optimize scan before station connecting to AP

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.
This commit is contained in:
XiaXiaotian 2017-04-26 11:45:30 +08:00
parent 36ed7f507e
commit 100d2dd938
2 changed files with 2 additions and 1 deletions

View file

@ -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 {

@ -1 +1 @@
Subproject commit 53aac75afe219af9feca42aca7f1126d394844c9
Subproject commit fd7893d22ae4d43488c950583db7125c37b5ba80