GithubHelp home page GithubHelp logo

seco / esp-wifieye Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jedijeremy/esp-wifieye

0.0 1.0 0.0 10.88 MB

ESP8266 Wifi Eye

License: MIT License

Arduino 1.55% HTML 21.92% C 37.90% C++ 5.41% Objective-C 6.32% OpenSCAD 26.89%

esp-wifieye's Introduction

esp-wifieye

ESP8266 Wifi Eye

This is an application framework for the ESP8266 which provides a web-based admin interface that can be used to remotely do the "bootstrap" configuration (hostname, network, passwords, ota setup) of a fresh firmware install.

The web server can serve multiple files concurrently, and also provides a websockets layer for real-time communication from the microcontroller to (multiple) client browsers.

Most ESP8266 projects have the access point information hard-coded into the firmware, which means to change to a new AP you need to recompile... not very friendly. They also tend to be "promiscuous" in their enabling of the OTA (over the air) reprogramming. Which is really nice when you're developing (there's no passwords or anything!) but you need to be able to switch it off when deploying into hostile territory.

This framework reads files from SPIFFS arranged in a familiar unix-like structure:

  • /etc/hostname - single line entry of the machine hostname

  • /etc/ap - JSON file containing the station name and password for the Access Point served by the microcontroller

  • /etc/htaccess - JSON file containing the username and password for http authentication (used by the file manager)

  • /wifi/ap/ - JSON configuration files for named access points, their passwords and other metadata.

  • /wifi/mac/

    - JSON configuration files for identified access points, their passwords and other metadata.

To pre-configure the device to connect to a particular network, just create a file in /wifi/ap with the same name as the network, and JSON contents in the following format:

{ "password":"shamballa", "priority":2, "auto":true, "ota":true, "fx":"pulse" }

On startup, if no hard-coded SSID/password is provided (that's still allowed) a scan is done and the configured access point with the highest priority and signal strength (that is marked "auto":true) is picked.

If the connection fails, other (less high-scored) access points should be tried in sequence. Currently it only performs this "fallback" during initial and manual "search" connections. Once it succeeds in connecting to an access point, it will not automatically change to another. (That needs fixing with some kind of timeout.)

In this way you can pre-configure your devices to connect to a range of networks without needing to be in range to do it.

You can also configure the network from the Web interface.

Connect to the access point (The default SSID/password is "Agomotto"/"shamballa") from a mobile device, and then go to the web page: http://192.168.4.1

This access point is always running, even when the ESP8266 is connected to a "host" AP of it's own. So you can configure the WiFi from WiFi, which is a really neat trick.

built on top of the AsyncTCP Library

esp-wifieye's People

Contributors

jedijeremy avatar

Watchers

 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.