Giter Club home page Giter Club logo

scwificonnector's Introduction

SCWifiConnector

A library to configure the ESP8266 wifi network using an Android application in the same way Google do with Chromecast.

This works with the ESP8266 Arduino platform

https://github.com/esp8266/Arduino

What this library do ?

  • the library attempt to connect to the given target network.
  • if it timeout, the library start a network (called connector network) and wait until it receive new credential via udp packet.
  • the library support 3 type of message in upd packet : "ssid:(ssid of target network)", "pass:(passphrase of target network)" and "request:(custom value)".
  • this library doesn't save the credential; it's up to you to save it in the connection callback. See exemple.
  • this library doesn't restart connector network when the target network is lost. (future improvement)

Install

For ESP8266

You can install through the Arduino Library Manager or copie/paste files under arduino/src/ folders.

For Android

You can compile and install the demo application or download it on Google play:

Get it on Google Play

Parameter

For ESP8266

setConnectorSSID(ssid, passPhrase)

This is the network create by library to wait credential of target network. The default value is : SSID = "esp8226_wificonnector_network" PassPhrase = "wificonnector_1234"

setHidden(isHidden)

Whatever the conenctor network is hidden. Default value True.

setConnectorIpAndPort(ipBroadCast, port)

The ip and port the library will waiting for UDP packet. Default is 192.168.1.1 port 4120.

setTargetSSID(SSID, passPhrase)

The credential to connect to the target network. See NetworkConfig struct in the example projet.

setTimeOut(timeout)

The time that the library attenmpt to connect to the target network. After this delay, the ConnectionFailureCallback will be call.

setConnectionCallback()

Called when a connection to the target network is make. You should save the credential. See example projet.

setConnectionFailureCallback()

Called when no connection is make with the target network.

setDeviceIdenfiticationRequestCallback()

Call when the Android application send identification request. The ESP8266 should be blink a led to physically identify itself.

Glossary

Connector network

The wifi network create by the library in order to configure target network (receive target network credential)

Target network

The network on which the user want his ESP8266 connect.

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.