Wifi sample SimpleWifiServer hangs

User avatar
boylesg
Posts: 3
Joined: Thu Jul 13, 2017 7:58 am

Wifi sample SimpleWifiServer hangs

Postby boylesg » Thu Jul 13, 2017 9:07 am

The example sketch hangs at the indicated line of code.

Code: Select all

void setup()
{
    Serial.begin(115200);
    pinMode(5, OUTPUT);      // set the LED pin mode

    delay(10);

    // We start by connecting to a WiFi network

    Serial.println();
    Serial.println();
    Serial.print("Connecting to ");
    Serial.println(ssid);

    [b]WiFi.begin(ssid, password);[/b]
I tracked it down to the following line of code in WifiGeneric.cpp:

Code: Select all

static bool _esp_wifi_started = false;

static bool espWiFiStart(){
    if(_esp_wifi_started){
        return true;
    }
    if(!wifiLowLevelInit()){
        return false;
    }
    [b]esp_err_t err = esp_wifi_start();[/b]

    if (err != ESP_OK) {
        log_e("esp_wifi_start %d", err);
        wifiLowLevelDeinit();
        return false;
    }
    _esp_wifi_started = true;
    return true;
}
Has anyone else had this problem and found a fix?
Gregary Boyles
Greg's Indigenous Plants & Landscapes
Email: greg@gregsindigenouslandscapes.com.au
Web: www.gregsindigenouslandscapes.com.au

Who is online

Users browsing this forum: No registered users and 51 guests