Code Monkey home page Code Monkey logo

esp8266-wakeonlan's Introduction

Wake-on-LAN on the ESP 8266

A small Wake-on-LAN server powered by the ESP8266.

Description

Wake-on-LAN is an Ethernet standard that is used to turn on a computer with a network message. It useful for allowing servers to sleep when idle to conserve power, yet still always be remotely accessible.

Use

When programmed to an ESP module such as the esp01 the ESP will boot, associate with a wifi network, and create an HTTP server. You can then go to the ESP's IP address with a web browser to instruct it to send a Wake-on-LAN packet.

Building

Before building, set credentials for the target wifi network in settings.h.

The best way to build this project is with platformio, which is a build system for network-enabled microcontrollers, or with Arduino IDE.

To use it with Arduino IDE simply install it and add ESP8266 additional board manager URL, then install it with the board manager, load the project and flash the board. Basically follow the instructions in this post until the COM port selection.

platformio is built in Python an can be installed using pip as follows:

pip install -U platformio

Once installed, clone this repository and in the clone issue the following:

platformio run

platformio will read the platformio.ini file, which tells it which board to build for. Currently this is the esp01. It will download the necessary toolchain and build the code.

Programming

If you have NodeMCU devkit board you can simply use esptool to flash it and then write software as on any Arduino device. After you've used esptool, just follow the instructions in this post until the COM port selection and then compile and load your code.

That's the easiest way currently (2017).

In general you can use a programming rig. There are many examples of this available, like the one described in this post after the COM port selection.

Essentially you make the following connections:

  • TX and RX of a USB-Serial converter to the ESP.
  • GND to ground of the USB-Serial converter.
  • PWR to a 3.3v, 300mA supply. (Note an Arduino's 3v3 pin does not provide enough current. Try a 3.3v linear regulator like the LD1117)
  • GPIO0 through a momentary-action push-to-make button to ground.
  • reset through a momentary-action push-to-make button to ground.

Start the ESP in programming mode by holding reset and GPIO0 to ground, releasing reset, and then releasing GPIO0. Then issue the following command:

platformio run -t upload

platformio will build the project if necessary, and then upload the binary to the flash of the ESP. The ESP will reset after programming and should be operational.

esp8266-wakeonlan's People

Contributors

iangray001 avatar kidel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.