aqandu / airu-v2-fw

MIT License
1 stars 2 forks source link

Failure fix/reconnecting #23

Closed QuangNguyen1412 closed 4 years ago

QuangNguyen1412 commented 4 years ago

Hi Tom,

        if (wifi_manager_check_connection() == ERR_WIFI_DISCONECTED) {
            wifi_manager_fetch_wifi_sta_config();
            if(strlen((char*)wifi_manager_config_sta->sta.ssid) > 0) {
                wifi_manager_connect_async();
            } else {
                ESP_LOGW("%s:[%d] - Not going to automatically connect to wifi");
                // Not going retry since... esp would stop working until the next reboot
                // Do something else but retry connecting
            }
        }

this is the code that I added to solve 2 things:

Could you take a look, review and merge into master if it would not fail other cases?

QuangNguyen1412 commented 4 years ago

i also added MQTT AirU configuration to Readme in case anyone else may need it later (other research group?). But I think leaving the mqtt_id and password is not a good idea, I'll let you decide