Git Product home page Git Product logo

espnow's Introduction

#ESPNOW library for mOS

Introduction

ESPNOW is a point to point communication protocol supported by the ESP32. It can send and receive 251 byte long messages from device to device.

Features

  • Loading peers from json file
  • Subscribing to received messages from specific peers
  • Subscribing to "broadcast" messages. Messages are considered broadcast when sent from peers not in memory. Broadcast needs to be enabled in config schema.
  • Subscribing to messages sent from any registered peer
  • Subscribing to sent message callbacks.
  • Adding and removing peers from memory and json file
  • Encryption is not supported.

Config Schema

  • enable: Enable the library
  • peers_filename: Filename to load the ESPNOW peers.
  • enable_broadcast: Enable registering an internal peer to receive broadcast messages
  • debug_level: DBG level to print to console

Peers JSON format

The peers json file will be parsed and loaded into memory. It will not report if the maximum peers limit has been reached.

[
    {
        "name": "ESP1",  //Peer name. Required. Used to locate peer inside the library.
        "mac": "24:0a:c4:09:06:4d" //MAC Address. Required. Format as outlined before, with colons.
        "channel": 6 //Wireless channel peer is listening to. Optional. If missing the channel will be set the same in wifi.ap.channel
        "softap": true //Whether the peer is using the AP interface to receive messages. Optional. Will default to true
    }
]

Stuff To do

  • mJS bindings
  • Encryption support
  • esp8266 support

Stuff to test

ESPNOW is not a very documented protocol, even broadcast is not really spoken about on the official docs. There might be edge cases not addressed by this library. Contributions are always welcome!

espnow's People

Contributors

drbomb 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.