Giter Club home page Giter Club logo

rf24sn's Introduction

RF24SN

Connects sensors/actuators to MQTT broker. Simpler than MQTT-SN. Runs on nRF24L01 hardware.

Overview

Overview

RF24SN consists of client and server implementations. Client implementations run on Arduino compatible microcontrollers. They can easily publish measured sensor values to MQTT broker or request values from MQTT broker to be used in actuators. The server implementations run on TCP/IP connected devices and perform translation from RF24SN protocol to MQTT protocol - they act as gateways between the relatively dumb clients and MQTT broker.

RF24SN Client

RF24SN Client is a library for Arduino compatible microcontrollers.

Publish Usage:

#define SENSOR_ID 1  //publishes to RF24SN/in/<nodeId>/1
       
float measuredValue = 3.14; //replace this line with actual sensor reading code
bool publishSuccess = rf24sn.publish(SENSOR_ID, measuredValue);

Request Usage:

#define SENSOR_ID 2  //request last payload fo RF24SN/out/<nodeId>/2
       
float requestValue;
bool requestSuccess = rf24sn.request(SENSOR_ID, &requestValue);
if(requestSuccess)
{
   Serial.println(requestValue); //replace this line with some action code (moving servo, LED on, etc.)
}

For more details see its own repository.

RF24SN Server

RF24SN Server software can be generally used as-is with only minimal configuration. It's sole purpose is to act as a gateway between RF24SN network and MQTT broker. It should be able to connect to any MQTT compatible broker - currently only mosquitto has been tested.

RF24SN on nodejs using node-nrf driver

Full featured implementation with little dependencies. Should run on all platforms where there is nodejs and the node-nrf driver / pi-spi driver - currently it has been tested on Raspberry Pi.

Usage:

sudo rf24sn -b mqtt://localhost:1883 -spi /dev/spidev0.0 -ce 25 -irq 24 -vv

For more details see its own repository.

RF24SN in C++ using RF24 driver

Full featured C++ implementation on top of RF24-rpi - a Raspberry Pi port of arduino RF24 driver. Currently only runs on Raspberry Pi.

Usage:

sudo RF24SN

For more details see its own repository.

RF24SN Spark Core Server

Full featured implementation of RF24SN for the Spark Core. It uses the SparkCore port of Arduino MQTT library and SparkCore port of Arduino RF24 library.

Usage:

flash to SparkCore, power up.

For more details see its own repository.

Compared to alternatives

RF24SN use cases are very similar to the following solutions, but with the following diferencies:

MQTT-S(N)

Both MQTT-S and RF24SN are meant to be MQTT simplifications for sensor networks with sleepy nodes communicating over unreliable radios. The differences are:

  • MQTT-S is a standard.
  • MQTT-S is closer to MQTT.
  • MQTT-S supports publish and subscribe to any MQTT topic; RF24SN supports publish and request only on predefined topic prefixes
  • MQTT-S implements subscription in MQTT sense, the gateway pushes MQTT messages to nodes when they wake up; RF24SN implements topic polling, nodes query for last known messages on a topics rather than waiting for the push.
  • RF24SN is more bit eficient.
  • RF24SN is much easier to implement
  • MQTT-S is agnostic of underlying radio tecnology, however most implementations only support ZigBee; RF24SN currently only suports nRF24l01 radio chips.

RFXduino

Both RFXduino and RF24SN implement client and server/gateway software for nRF24L01 radio networks. The differencies are:

  • RFXduino is open source and free for non-commercial use; RF24SN is open source and truly free as in speach (MIT license).
  • RFXduino suports all kinds of added logic such as email sending, SMS, shell command execution; RF24SN only supports publishing of and requests for individual values.
  • RF24SN is much easier to implement

RF24Network

Both RF24Network and RF24SN implement logic on top of RF24 driver, however with the following differencies:

  • RF24Network follows tree topology with each node capable of communication with 6 children nodes and 1 parent node; RF24SN follows star topology with the base capable of communication with 254 children nodes.
  • RF24Network supports transmission of any payload up to 32 bytes; RF24SN only supports publishing of and requests for individual float values.

rf24sn's People

Contributors

vaclavsynacek avatar

Watchers

 avatar James Cloos 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.