How it works

LIBERIOT is a cloud-based platform used to receive, decrypt and parse wireless GWAP packets coming from anywhere in the world and convert them into readable information. Either the unprocessed wireless packets and the readable information are transmitted via MQTT by means of dedicated MQTT channels.

How it works

LIBERIOT can be seen as a virtual tube capable to process wireless packets from millions of nodes and interpret all this wireless packets into readable endpoint data, in form of plain text or JSON. Thus, inexpensive RF-IP gateways can be used for this purpose, making the whole solution fast, simple, low-cost, flexible and powerful

The gateway

LIBERIOT is a cloud-based platform used to receive, decrypt and parse wireless GWAP packets coming from anywhere in the world and convert them into readable information. Either the unprocessed wireless packets and the readable information are transmitted via MQTT by means of dedicated MQTT channels.We are currently working on a final version of this gateway based on the ESP8266 WiFi SoC and a panStamp wireless module. The following is a picture of one of our current prototypes

The gateway

Not having to run complex processes, gateways can indeed rely on simple popular hardware platforms such as the ESP8266 modules and Arduinos. Raspberry Pi and Beaglebone can also be used as gateways, even if their hardware is a bit overkilled for this purpose.

We provide code for the ESP8266, in case that you want to make your own gateway connected to LIBERIOT. There is also an application called "station" written in Python, that can run on Raspberry, Beaglebone or any other low-cost Linux platforms.

On the RF side of the gateway we usually rely on panStamp NRG modules, running gwapmodem and connected to the host processor via serial (3.3V UART). These wireless modems are perfect to communicate under GWAP, whilst releasing the main processor from any RF task.

GWAP

Global Wireless Abstract Protocol was created for LIBERIOT as a means to transport M2M data in a global way, from worldwide identifiable wireless nodes. GWAP devices are uniquely identifiable by their 12-byte addresses so a node can travel around the globe and communicate as far as there is a gateway in relative proximity. GWAP is being implemented on panStamp radios but it can be ported to almost any Sub-GHz radio platform. GWAP currently works at 433, 868 and 902 MHz but other frequencies can be supported as well. Radio modulation is GFSK, with FHSS at 4800 bps. GWAP is licensed under GNU GPL and, unlike other closed source protocols like Sigfox or Lora, GWAP nodes transmit at much higher speeds (4800 bps vs 100 bps for Sigfox and Lora), reducing the risk of collisions and the cost on the gateway side. On the other hand, distances are not as large as with Lora and Sigfox but the overall cost per m2 of coverage ratio is still very favourable to GWAP+LIBERIOT

End-nodes

End-nodes

GWAP-compatible nodes can be based on low-cost radios and microcontrollers. This is the real magic behind a so open platform like LIBERIOT. Users can build their own end-nodes, reprogram existing boards or buy and run devices with default applications. There is already a long list of firmware examples available from the GWAP repository. These examples, along with the GWAP stack, can be easily programmed on panStamp NRG modules from the Arduino IDE. Other implementations will follow these ones in the future.

Powering your application from LIBERIOT

This is probably the most important part of an IoT project. The moment of connecting IoT data to custom applications or existing platforms is sometimes frustrating. LIBERIOT reduces this complexity to the minimum by offering simple integration IP channels. Applications can subscribe (sensors) and publish (controls) by means of a dedicated MQTT channel and a user topic. The following is an example of a JSON packet produced by LIBERIOT just a fraction of a second after receiving the wireless data from the sensor node. We can subscribe to a given sensor for example:

mosquitto_sub -h mqtt.liberiot.org -p 3001 -t "opendatared/json/574400C948FBA4350CC0746D/16002000C66F334700010012/Current channel 1/mA"

Getting the following response from LIBERIOT in JSON format:

    
    { "timestamp": "2016-07-09T11:29:30.388Z",
    "unit": "K",
    "endpoint": "Temperature",
    "value": 300.45,
    "register": "7",
    "uid": "170027001270334700010001" }
  

We can also subscribe to the "simple" subtopic instead of "json", which returns the endpoint value in plain text format:

mosquitto_sub -h mqtt.liberiot.org -p 3001 -t "opendatared/simple/574400C948FBA4350CC0746D/16002000C66F334700010012/Current channel 1/mA"

Example of MQTT packet received: 140.00

The simple method is sometimes preferred when interfacing with MQTT compatible applications such as Node-RED since the value received does not need any kind of parsing or processing.

We can also subscribe to more generic topics. For example, let's imagine that we want to receive data from any device registered by us (user key 574400C948FBA4350CC0746D).

mosquitto_sub -h mqtt.liberiot.org -p 3001 -t "opendatared/simple/574400C948FBA4350CC0746D/#" -v

MQTT packets received in simple format (with verbose option enabled):

    
      opendatared/simple/574400C948FBA4350CC0746D/16002000C66F334700010012/Voltage/V 4.16
      opendatared/simple/574400C948FBA4350CC0746D/16002000C66F334700010012/Temperature/C 30.00
      opendatared/simple/574400C948FBA4350CC0746D/16002000C66F334700010012/Temperature/F 86.00
      opendatared/simple/574400C948FBA4350CC0746D/16002000C66F334700010012/Temperature/K 303.15
      opendatared/simple/574400C948FBA4350CC0746D/16002000C66F334700010012/Current channel 1/mA 171.00
      opendatared/simple/574400C948FBA4350CC0746D/16002000C66F334700010012/Current channel 2/mA 630.00
      opendatared/simple/574400C948FBA4350CC0746D/16002000C66F334700010012/Current channel 3/mA 598.00
    
  

Finally, we can also subscribe only to one of our gateways with

mosquitto_sub -h mqtt.liberiot.org -p 3001 -t "opendatared/simple/574400C948FBA4350CC0746D/16002000C66F334700010012/# -v"

There is also a HTTP API that can be used instead of MQTT. We recommend in any case taking a look at the LIBERIOT backend after registering yourself.