MQTT-SN Gateway
MQTT For Sensor Networks (MQTT-SN) is a technology that enables sensors to join MQTT networks without the need for a TCP stack on the sensor. mqttsngw is a modularly designed software, that acts as a transparent gateway connecting the MQTT-SN world with the MQTT world.
Currently, the following components are available:
- mqttsngw-dtls: Listens for incoming DTLS connections from sensors and parses MQTT-SN packets. Parsed MQTT-SN packets are put on the event bus.
- mqttsngw-core: Handles parsed MQTT-SN packets from the event bus and maintains a state machine for each connected sensor. If necessary it requests a connection to the broker on the event bus.
- mqttsngw-mqttbroker: Maintains MQTT connections to a remote broker upon request from the event bus.
Example
const fs = ;const MQTTSNGW = ;const Core = ;const DTLS = ;const Broker = ; // Logging methods to be injected in every moduleconst log = debug: consolelog info: consolelog warn: consolelog error: consoleerror; start; // Starts every module