Skip to content

ESP32-D0WD-V3 wifi.begin() does not connect but fine on ESP32-D0WDQ6 #7562

Closed as not planned
@AussieMakerGeek

Description

@AussieMakerGeek

Board

Generic ESP32 WROOM Module

Device Description

Various - Hardware independent other than specific ESP Chip

Hardware Configuration

No External connections

Version

v2.0.5

IDE Name

Arduino IDE 1.8.16

Operating System

Windows 10

Flash frequency

80Mhz

PSRAM enabled

no

Upload speed

921600

Description

Testing Generic wifiClient Example
Entering known good SSID/Pass code
ESP32-D0WD-V3 it does not connect to wifi
ESP32-D0WDQ6 Immediately connects with identical code

Loading the WiFiScan example lists all of the wireless networks around me with no issue on both ESP32 Versions.

I have discovered though that the WiFiMulti.addAP()/WiFiMulti.run() method DOES allow connecting to the network with the newer chip.

Sketch

/*
 *  This sketch sends data via HTTP GET requests to data.sparkfun.com service.
 *
 *  You need to get streamId and privateKey at data.sparkfun.com and paste them
 *  below. Or just customize this script to talk to other HTTP servers.
 *
 */

#include <WiFi.h>

const char* ssid     = "MySSID";
const char* password = "MyPassword";

const char* host = "data.sparkfun.com";
const char* streamId   = "....................";
const char* privateKey = "....................";

void setup()
{
    Serial.begin(115200);
    delay(10);

    // We start by connecting to a WiFi network

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

    WiFi.begin(ssid, password);

    while (WiFi.status() != WL_CONNECTED) {
        delay(500);
        Serial.print(".");
    }
    // *** Never Gets here with ESP32-D0WD-V3 ***
    Serial.println("");
    Serial.println("WiFi connected");
    Serial.println("IP address: ");
    Serial.println(WiFi.localIP());
}

int value = 0;

void loop()
{
    delay(5000);
    ++value;

    Serial.print("connecting to ");
    Serial.println(host);

    // Use WiFiClient class to create TCP connections
    WiFiClient client;
    const int httpPort = 80;
    if (!client.connect(host, httpPort)) {
        Serial.println("connection failed");
        return;
    }

    // We now create a URI for the request
    String url = "/input/";
    url += streamId;
    url += "?private_key=";
    url += privateKey;
    url += "&value=";
    url += value;

    Serial.print("Requesting URL: ");
    Serial.println(url);

    // This will send the request to the server
    client.print(String("GET ") + url + " HTTP/1.1\r\n" +
                 "Host: " + host + "\r\n" +
                 "Connection: close\r\n\r\n");
    unsigned long timeout = millis();
    while (client.available() == 0) {
        if (millis() - timeout > 5000) {
            Serial.println(">>> Client Timeout !");
            client.stop();
            return;
        }
    }

    // Read all the lines of the reply from server and print them to Serial
    while(client.available()) {
        String line = client.readStringUntil('\r');
        Serial.print(line);
    }

    Serial.println();
    Serial.println("closing connection");
}

Debug Message

No Errors generated

Other Steps to Reproduce

Consistently on the newer ESP32 V3 chip across various different dev boards, it will not connect with WiFi.begin()

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions