ESP32-C3 Super Mini WiFi Test not working! [Solved]

From a tutorial I have used the following sketch:-

/*********
  Rui Santos & Sara Santos - Random Nerd Tutorials
  Complete project details at https://RandomNerdTutorials.com/getting-started-esp32-c3-super-mini/
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*********/

#include <WiFi.h>
#include <WebServer.h>

// Replace with your network credentials
const char* ssid = "***********";
const char* password = "*******************";

// Assign output variable to GPIO pin
const int output = 8;
String outputState = "OFF";

// Create a web server object
WebServer server(80);

// Function to handle turning GPIO on
void handleGPIOOn() {
  outputState = "ON";
  digitalWrite(output, LOW);
  handleRoot();
}

// Function to handle turning GPIO off
void handleGPIOOff() {
  outputState = "OFF";
  digitalWrite(output, HIGH);
  handleRoot();
}

// Function to handle the root URL and show the current state
void handleRoot() {
  String html = "<!DOCTYPE html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">";
  html += "<link rel=\"icon\" href=\"data:,\">";
  html += "<style>";
  html += "html { font-family: Helvetica; text-align: center; background: #f5f7fa; margin: 0; padding: 20px; }";
  html += "body { max-width: 600px; margin: 0 auto; background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }";
  html += "h1 { color: #333; font-size: 28px; margin-bottom: 20px; }";
  html += "p { color: #555; font-size: 18px; margin: 10px 0; }";
  html += ".button { background: #4CAF50; border: none; color: white; padding: 12px 24px; text-decoration: none; font-size: 20px; border-radius: 8px; cursor: pointer; transition: background 0.2s ease; display: inline-block; width: 120px; box-sizing: border-box; }";
  html += ".button:hover { background: #45a049; }";
  html += ".button2 { background: #555555; }";
  html += ".button2:hover { background: #666666; }";
  html += "</style></head>";
  html += "<body><h1>ESP32 Web Server</h1>";

  // Display GPIO controls
  html += "<p>GPIO - State " + outputState + "</p>";
  if (outputState == "ON") {
    html += "<p><a href=\"/off\"><button class=\"button button2\">OFF</button></a></p>";
  } else {
    html += "<p><a href=\"/on\"><button class=\"button\">ON</button></a></p>";
  }

  html += "</body></html>";
  server.send(200, "text/html", html);
}

void setup() {
  Serial.begin(115200);
  delay (1000);
  Serial.println ("Awake");

  // Initialize the output variable as output
  pinMode(output, OUTPUT);
  // Set the onboard LED to LOW (inverted logic)
  digitalWrite(output, HIGH);

  // Connect to Wi-Fi network
  Serial.print("Connecting to ");
  Serial.println(ssid);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected.");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());

  // Set up the web server to handle different routes
  server.on("/", handleRoot);
  server.on("/on", handleGPIOOn);
  server.on("/off", handleGPIOOff);

  // Start the web server
  server.begin();
  Serial.println("HTTP server started");
}

void loop() {
  // Handle incoming client requests
  server.handleClient();
}

The sketch compiles and loads fine but nothing appears on the serial monitor. I added the Serial.println ("Awake"); in the void setup, which I thought would at least show that the serial monitor is working, but I get absolutely nothing.

Any pointers would be much appreciated, Thanks

"Awake" does not appear?

Can you get the LED to blink? (to show uploading works)

// Blink built-in LED (GPIO8 is default on ESP32-C3 Super Mini)
#define LED_BUILTIN 8

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

Yes the Blink sketch does work and have tried it on both ESP32-C3s

I checked and noted that the USB CDC On Boot was disabled for some reason. I re-enabled it and I am now getting to the stage where it tries to connect to my WiFi but nothing happens. This is the case with both units.

There are a number of badly designed ESP32 supermini boards on Aliexpress etc. which have very poor RF performance. The crystal oscillator is too near the antenna. See Reddit - Please wait for verification

The main identifying characteristic is evidence of "mouse-bites" on the PCB edges.

Thanks for the info, looks like my ones are the dud ones unfortunately! Ah Well!!

works OK on my ESP32-C3 supermini

serial monitor output

Awake
Connecting to horace2017
...........
WiFi connected.
IP address: 
192.168.1.182
HTTP server started

web client displays

you should get the "Connecting to ..." message then "......" as it attempts to connect

how far away is your WiFi router?

You may pay a bit more, but the Seeed Studio XIAO ESP32C3 is of excellent quality and well documented. It comes with an external antenna

https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/

Did you follow the instructions to enable USB CDC on Boot?

Yes I enabled USB CDC on boot

Usual story, poor man pays twice! I will have a look at those ones, many thanks!

Yes I get that now then just ……………………………………………………………….! It just doesn’t connect, looks like I have been sold duds!

can you run File>Examples>WiFi>WiFiScan

should show something along the lines of

-------------------------------------
Default wifi band mode scan:
-------------------------------------
Scan start
Scan done
3 networks found
Nr | SSID                             | RSSI | CH | Encryption
 1 | xxxxxxxxx                     |  -62 |  1 | WPA2
 2 | xxxxxxxxx_EXT                   |  -91 |  1 | WPA+WPA2
 3 | zzzzzzz                          |  -93 |  1 | WPA2
-------------------------------------

Loaded and run the WiFi Scan sketch, this is what I get! I have starred out my network.

-------------------------------------
Default wifi band mode scan:
-------------------------------------
Scan start
Scan done
3 networks found
Nr | SSID                             | RSSI | CH | Encryption
 1 | *********                        |  -65 | 11 | WPA2
 2 | *********                        |  -84 |  1 | WPA2
 3 | EE WiFi                          |  -84 |  1 | open
-------------------------------------
-------------------------------------
Default wifi band mode scan:
-------------------------------------

Issue resolved, in the code:-

const char* ssid = "***********";

I had const char* ssid = ""; as I had in an older sketch that worked, I removed the <> and all is working.

Thank you to all that contributed.