RESET for each connect operation

pull/11888/head
fred.li 2019-07-18 14:30:31 +08:00
parent fc8ae6fb18
commit cef6aba55e
1 changed files with 3 additions and 0 deletions

View File

@ -146,6 +146,9 @@ nsapi_error_t RDAWiFiInterface::connect(const char *ssid, const char *pass,
init();
//reset all scan result to avoid any previous stored SSID/PW/CHANNEL
rda5981_del_scan_all_result();
rda5981_scan(NULL,0,0);
if(rda5981_check_scan_result_name(ssid) != 0) {
for (i = 0; i< 5; i++) {
rda5981_scan(NULL, 0, 0);