Skip to main content
Station Mode connects the ESP32-C6 to an existing Wi-Fi router as a regular client device. Both the ESP32 and the target PC share the same local network, which means the Python listener on the PC can poll the ESP32’s HTTP server by IP address and act the moment it receives the SIL (delete) signal. Use this mode when a lab router is already in place and you want to trigger the sequence from a phone or tablet on the same network.

Network Topology

┌─────────────────────────────────────────┐
│           Lab Wi-Fi Router              │
│         (192.168.1.1)                   │
└──────────┬──────────────────┬───────────┘
           │                  │
    ESP32 (253)         PC (DHCP)
    [Green LED]         [Listener Running]
           │                  │
           └──────Wifi────────┘
           Control Signals

ESP32 Setup

1

Open the Station Mode sketch

Open ESP32Station/ESP32Station.ino in Arduino IDE with the ESP32C6 Dev Module board selected.
2

Update Wi-Fi credentials

Replace the placeholder values with your lab network’s SSID and password:
const char* ssid     = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";
3

Set a static IP address

Adjust the static IP block to match your router’s subnet. The defaults target a common 192.168.1.x network:
IPAddress local_IP(192, 168, 1, 253);
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);
4

Upload the sketch

Connect the ESP32-C6 via USB-C and click Upload. The onboard LED turns blue while the board connects, then green once it joins the network.
5

Confirm the IP address

Open Serial Monitor at 115200 baud. The board prints the assigned IP address — confirm it matches 192.168.1.253 (or whatever static IP you set) before continuing.

PC Listener Setup

1

Open the listener script

Open ESP32Station/dinleyici_station.py in your editor.
2

Update the ESP32 IP

Set ESP32_IP to the IP address printed in Serial Monitor:
ESP32_IP  = "192.168.1.253"
ESP32_URL = f"http://{ESP32_IP}/durum"
3

Open an elevated terminal

Open PowerShell or CMD as Administrator. The script calls bcdedit, reg delete, and taskkill, all of which require elevated privileges — you will receive WinError 5 if you skip this step.
4

Run the listener

python dinleyici_station.py
5

Confirm the script is waiting

The script checks for Administrator privileges, then prints its startup banner and begins polling /durum once per second. You will see the rolling status line:
[HAZIR] ESP32'den 'SIL' komutu bekleniyor...
[...] Sinyal bekleniyor: 'BEKLE'
6

Open the control panel on your phone or tablet

Connect your phone or tablet to the same Wi-Fi network as the ESP32. Open a browser and navigate to the ESP32’s IP address (e.g., http://192.168.1.253). The control panel loads.
7

Trigger the sequence

Press the SIL KOMUTUNU CALISTIR button. The ESP32 LED turns red, the /durum endpoint switches from BEKLE to SIL, and the listener script executes the deletion sequence immediately.

API Reference

Poll the current status at any time with:
curl http://192.168.1.253/durum
Returns BEKLE while idle, SIL after the trigger button is pressed.
EndpointMethodReturnsDescription
/GETHTMLControl panel web interface
/durumGETBEKLE / SILPoll the current destruction status
/tetikleGETHTMLArm the delete command
/sifirlaGETHTMLReset status back to BEKLE

LED Status

ColorMeaning
BlueStartup — connecting to Wi-Fi
GreenConnected — waiting for trigger
RedSIL received — destruction running
Keep the lab network fully isolated from the internet during testing. Connect the router’s WAN port to nothing, or disable the WAN interface entirely. An internet-connected router exposes the ESP32’s unauthenticated HTTP endpoints to any device that can reach the local subnet, including other machines on a bridged or poorly firewalled network.

Build docs developers (and LLMs) love