Energomonitor releases Bisquitt, a transparent MQTT-SN gateway

Energomonitor releases Bisquitt, a transparent MQTT-SN gateway
23/03/2022 David Majda
In Technology

Today, Energomonitor releases Bisquitt, a transparent MQTT-SN gateway. It provides a simple, secure, and standards-based way to connect resource-constrained IoT devices to MQTT infrastructure. Bisquitt supports most MQTT-SN 1.2 features, allows secure communication using DTLS 1.2, and implements an authentication extension based on MQTT-SN 2.0 draft. It is developed as an open-source project.

Why did we develop Bisquitt?

Bisquitt logo

Logo of the Bisquitt project

Several years ago, we started developing a new device — a universal smart electricity sub-meter. It had to be able to communicate over the NB-IoT network, which doesn’t allow TCP/IP, only UDP. This meant we couldn’t communicate with the device using MQTT, a protocol we use in our existing products. We started looking for alternatives.

CoAP

The first alternative we tried was CoAP. It is a lightweight HTTP-like protocol suitable for use in resource-constrained devices on connectionless networks. We prototyped its implementation in the device firmware and on the server and started testing it. We immediately discovered that we would have to map our application-level protocols, which were based on MQTT’s pub-sub model, to CoAP’s request-response semantics. This turned out to be quite problematic. The biggest issue was communication from the server to the device, which works smoothly in MQTT, but is hard to implement well in CoAP. Overall, the results weren’t convincing and we looked for other solutions.

MQTT-SN

The next technology we considered was MQTT-SN. Its design goals are similar to CoAP, but crucially, MQTT-SN is based on MQTT and maintains its semantics. It was clear that MQTT-SN would solve our problem and allow us to keep our application-level protocol essentially unchanged.

To integrate MQTT-SN devices into the MQTT world, one needs to set up an MQTT-SN gateway, which translates between both protocols. So we started looking for one. The results of our search were disappointing. We found several projects, but a deeper look revealed that all were incomplete, unmaintained, or just didn’t work. This put us into a difficult situation — either we would have to return to CoAP, which was far from ideal, or we would have to put a significant development effort into creating a working MQTT-SN gateway. After some deliberation, we decided to do the latter and started working on Bisquitt. We also decided to publish Bisquitt as an open-source project, so that others can benefit from our effort. And this is where we are right now.

Development and plans

We wrote Bisquitt in Go because we use that language extensively at Energomonitor and our developers know it well. It also suits the task well — we especially value its performance, concurrency model, overall robustness, and rich ecosystem of tools and libraries. We partially based Bisquitt on gnatt, an existing MQTT-SN implementation in Go.

Our goal is simple, yet ambitious. We intend Bisquitt to be the best and most widely used open-source MQTT-SN gateway. To achieve that, we intend to invest in its development significantly in the coming months and years. We also plan to follow the development of MQTT-SN 2.0, the new version of the MQTT-SN protocol developed by the OASIS consortium, and add its support to Bisquitt over time.

Learn more

To learn more about Bisquitt and its features, have a look at its GitHub repository. Let us know what you think in the discussion there, and feel free to submit issues or pull requests!

Comments (0)

Leave a reply

Your email address will not be published. Required fields are marked *

*