Skip to content

Example ESP WiFi Control

Nick Tracy edited this page Jul 18, 2026 · 3 revisions

Example: ESP Wi‑Fi control

Goal: Run a dual dashboard on ESP32 or ESP8266 — the same menus on USB serial and on a TCP terminal (port 23).

Important safety notes (lab / demo)

  • Soft-AP password defaults to a simple value in the sketch (AP_PASS) — change it before real use.
  • Wi‑Fi passwords you type in the UI are stored in EEPROM in plaintext. Fine for experiments; not for production secrets.

Setup

  1. Install ESP32 or ESP8266 board support in the Arduino IDE.
  2. Open ESPWiFiControlExample.
  3. Upload.
  4. USB serial is 115200 baud (not 9600).
  5. Optionally connect with telnet <ip> 23 after the board has an IP (STA or soft-AP).

The sketch waits only a couple of seconds for USB serial, then continues even if no monitor is open (handy for headless ESP boards).

What you can do

  • Switch Wi‑Fi mode (STA / AP / AP+STA)
  • Scan networks and pick an SSID
  • Edit the STA passkey
  • Connect / disconnect STA
  • Toggle the soft access point
  • Watch IP addresses and signal bars

Controls

Input Action
Arrow keys, W/S, or J/K Move selection
Enter or Space Activate
Mouse click on a menu row Activate (when the terminal supports mouse reports)

Tips

  • Widen the terminal (~80 columns) for the full dashboard.
  • If the USB view and telnet view both connect, both stay in sync.
  • After changing network mode, reconnect telnet if the session drops.

More background: Network and ESP Boards.

Clone this wiki locally