Wi-Fi the antenna can carry
A board that will not join a network it is sitting next to is usually transmitting too hard, not too softly. The antenna is a ceramic chip a few millimetres long, and the fix is one line in setup.
More power is not more range here
The ESP32-C3 will transmit at up to 20 dBm, and that is the default. On a board with a proper antenna and the matching network to feed it, that is fine. On this one it is more than the front end can carry: the antenna is a ceramic chip a few millimetres long at the top edge, and past a certain point the extra power goes into distortion rather than into the air.
The symptom is specific and it is what makes this worth an article. It fails during the join, not later. The board finds the network, starts the handshake, and never finishes — or it works when it is touching the router and not when it is across the desk. Every instinct says "weak signal, turn it up", and turning it up is what caused it.
The ladder, as measured
That is one bench, one router, one board, walked from the top down. Two things are worth taking from it and one thing is not.
Worth taking: there is a window, with a wall at each end. Too much power and the join never completes. Too little and there is not enough signal at the other end, which fails identically from the board's side. Also worth taking: the window on that bench was roughly 11 to 15 dBm, and 13 to 15 was where the link stayed steady.
Not worth taking: a single number to copy. Advice circulates for this board that says "set 8.5 dBm", and on the bench those measurements came from, 8.5 dBm was one of the settings that behaved badly — slow to connect, low throughput. Your router and your distance are not that bench.
Walking it yourself
One line, one upload, two numbers:
WiFi.setTxPower(WIFI_POWER_15dBm);Start at 15. If the join is reliable and RSSI is better than about -70 dBm, stop — you are done. If it will not join, try 13, then 11. If none of them join, the problem is not transmit power and the troubleshooting below is the better place to look.
Give each setting more than one attempt, and leave the board running for ten minutes before believing it. The failure this is fixing is intermittent, and a single successful join proves less than it feels like it does.
Where this book ends
That is the first hour: the board, its pins, the base, the toolchain, the screen, the battery and the radio. Everything after it is about the chip rather than this board, and the ESP32 book is where that lives — the same Wi-Fi, written once for the whole family, plus BLE, the buses, deep sleep and OTA.
The code
Joins a network at a reduced transmit power and prints how long it took and how strong the link is. Change TX_POWER, upload, and watch the two numbers rather than guessing.
/* Lonely Binary ESP32-C3 OLED — join at a sane power
Tools > Board: ESP32C3 Dev Module
Tools > USB CDC On Boot: Enabled */
#include <WiFi.h>
const char* SSID = "your-network";
const char* PASS = "your-password";
// Try 15, then 13, then 11. See the article.
const wifi_power_t TX_POWER = WIFI_POWER_15dBm;
void setup() {
Serial.begin(115200);
delay(1500);
WiFi.mode(WIFI_STA);
WiFi.setTxPower(TX_POWER); // before begin: the join is what fails
WiFi.begin(SSID, PASS);
uint32_t t0 = millis();
while (WiFi.status() != WL_CONNECTED && millis() - t0 < 20000) {
delay(250);
Serial.print(".");
}
Serial.println();
if (WiFi.status() == WL_CONNECTED) {
Serial.printf("joined in %lu ms\n", millis() - t0);
Serial.printf("ip %s, rssi %d dBm\n",
WiFi.localIP().toString().c_str(), WiFi.RSSI());
} else {
Serial.println("gave up — try a different TX_POWER");
}
}
void loop() {
delay(5000);
Serial.printf("still %s, rssi %d dBm\n",
WiFi.status() == WL_CONNECTED ? "up" : "down", WiFi.RSSI());
}setTxPower has to be called after WiFi.mode and it is worth calling before begin, so the join itself happens at the reduced power — the join is the part that fails. RSSI closer to zero is stronger; anything better than about -70 dBm is a working link.
When it does not work
Turning the power down trades range for stability, so there is a distance at which a setting that was steady stops reaching. Walk the ladder in the other direction — 13, then 15 — and watch RSSI rather than guessing. If nothing on the ladder holds at that distance, the answer is a closer access point, not a setting.
Check whether anything in loop blocks for long. This chip has one core, and the radio is serviced from the same core your code runs on — a delay of a second or two is a second or two during which nothing answers the access point, and enough of those in a row look like a device that has left.
It cannot. The C3 has a 2.4 GHz radio only. On a router that presents both bands under one name, the board will find the 2.4 GHz one on its own; on a router where the bands have separate names, you have to give it the 2.4 GHz one.
Check the credentials on a phone first, then the channel. Some routers are configured for channels 12 and 13, which not every region's regulatory setting will use. And a network with WPA3 only — no WPA2 fallback — will refuse this board on older core versions.
Past this board's first hour. Wi-Fi, BLE, the buses, deep sleep and OTA — written once for the whole family, in Arduino C++ and MicroPython.
The ESP32 book →Edit this page — content/boards/c3-oled/wi-fi-the-antenna-can-carry.mdx
Questions about this product
See what other owners have asked, and read their solutions.
ESP32-C3 OLED Development Board with Expansion Base
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.