ESP32‐C3 super mini tutorial - Adam-Cervenec/ESP32-Wake-on-Lan GitHub Wiki
Introduction
This project allows you to wake up your PC (or server) wirelessly using an ESP32-C3 super mini from AliExpress.
The code is written in a way that can support more than one ESP device. Make sure to pay attention to the top comments in the code (SSID, password, MAC address, etc.), as they are crucial for configuration.
Requirements
- Arduino IDE
- ESP32 board ($2-4 on TEMU, AliExpress)
- 2 wires, a button, and a PCB or breadboard
- USB cable for programming the ESP
- Your target PC's network card must support Wake-on-LAN (WOL) (e.g., PCI-E wake-up)
- WOL must be enabled in the OS
- WiFi network (ESP must be connected to this network via SSID)
Setting up Arduino IDE and Libraries
- Download Arduino IDE.
- Open Arduino IDE, create new project and save it.
- Go to File/Preferences and Additional boards manager URLs paste this "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json".
- Download ESP32 libraries (Tools/Board/Boards Manager).
- Select "MarkerGO ESP32 C3 super mini".
- (Linux only) Allow your USB port for your user: "sudo usermod -aG dialout $USER". Then log out and log back in.
- You are now ready to upload code to your ESP.
WOL CODE SETUP
- Copy-paste the code or download it from this repository.
- Fill in the top part of the code carefully:
- SSID and password of your WiFi network,
- BUTTON_PIN number,
- BROADCAST_IP of your local network
- PC_IP address of the PC you want to wake up (static IP is very recommended tutorial)
- MAC address of the PC you want to wake up
- Adjust LED logic - most of the super minis have LOW as ON and HIGH as OFF - and set to pin 8.
- Upload the code using the Upload button in Arduino IDE.
- LED behavior on startup:
- 2 quick blinks = ESP has started
- 5 blinks = ESP connected to your network
- If it doesn’t connect, check SSID and password in the code and try rebooting the ESP
Using the WOL Device
- Press the button connected to the ESP
- The LED should blink once to indicate that the WOL packet was sent
- If it doesn’t blink, check the button pin number in the code and your hardware connection
- Open Serial Monitor to check if the WOL packet was sent and received
- If the packet was not received, double-check:
- MAC address of the PC
- Broadcast IP
- PC IP address (if you have dynamic IP of your PC, it can cause problems - solution)
- You can also try different ports (0, 7, 8, or 9)
- Connect the ESP to a different power source than the PC you want to wake up
- Press the button, and your device should wake up immediately
- This project is simple but requires careful attention to network and hardware setup
- Works with multiple ESP devices if needed
- LED debug is useful in normal use if Serial Monitor is not available