As is the case with many things in the IOTA ecosystem, we run the risk of endless confusion when we represent projects/features with acronyms while failing to provide any background. So that we don’t fall into this trap, let’s start slowly to get HelloIOTA readership caught up from the very beginning. We’ll form a solid foundation before jumping into the interview.
Many who have followed IOTA will have seen bits of news about something called “XDK2MAM”. Teasing this name apart: “XDK” refers to the Bosch sensor board/chip called Bosch XDK110. The development kit that includes this sensor board costs about 180 euros, and the board has the following sensors: Accelerometer, Gyroscope, Humidity, Magnetometer, Pressure, Temperature.
“MAM”, or “masked authenticated messaging”, is IOTA’s old version of data streaming over the tangle. The new version is being called “Streams”, which is something else you’ve probably heard of by now.
The original XDK2MAM project began in August of 2018 with the stated purpose of writing open source code for the Bosch XDK 110 sensor board to interact with the Tangle by using IOTA’s MAM data streaming capability. @xdk2mam has remained very active on twitter and is a recommended IOTA follow.
On September 22, they tweeted a hint that they would be releasing new code that might be compatible with IOTA’s new streams. Likely a difficult move from old MAM, which makes it very exciting.
Readers will remember meeting Carpincho in a HelloIOTA feature interview last month. Carpincho not only heads the IEN, but has also been driving this xdk2mam project forward.
Today we’ll learn more about the IOT2TANGLE story, meet the team, and delve into their special new release. Let’s go.
HelloIOTA Question #1
Our readers have been caught up on Bosch XDK 110, IOTA MAM, and the XDK2MAM project. This project originated way back in summer of 2018 - we’d be delighted to hear the origination story. When did the idea first arise? Was there a specific use case in mind, or was it a blue ocean idea? Why choose to work with the Bosch XDK 110 rather than a raspberry pi or other sensor boards? How has the XDK2MAM project progressed over this time? What were some challenges and triumphs? Are you pleased with how things have turned out so far?
The interest for the XDK110 came from a MAM presentation that Paul Douglas made at the Chicago Connectory back in 2018. At that event, Paul presented the Masked Authenticated Messaging solution and referred to the Bosch XDK110 sensor nodes as a candidate that would fit perfectly with this second layer data solution (MAM).
That same day, I did some research about the XDK110 and I was really excited about its potential. This device is a Swiss army knife: 8 built in sensors with BLE, Wifi and LoRa extension ... ready to measure out of the box. Because the XDK110 covers all these features, many people tend to think that the device is the perfect fit for their projects. The truth is that most of the time it may be useful at a lab stage, but in production you might need to go with another more specific setup such as an ESP32/STM32. That let's you use only the sensors you need. The XDK110 is an amazing tool to prototype things as it allows quick validation of concepts without having to deal with connecting many sensors and painstakingly configuring a device.
We started coding open source solutions with a two layer model: We needed C code so that the device could send its data through various methods (HTTP, BLE, LoRA, USB, UDP, MQTT) but, on the other hand, the data was fetched by a Nodejs node in charge of publishing it to the Tangle via MAM.
Although we could have used a PI3, XDK2MAM was about building bridges between Bosch and IOTA. To be honest, our expectations regarding this project were high, but the level of acceptance it got from the IOTA community and Bosch Connectivity was just amazing. Until today we have a very close relationship with the team headed by Reiner Scmohl (XDK110 Project Manager), and we even had the chance to work with them side by side last year at the Bosch Connectivity HQ in Reutlingen.
HelloIOTA Question #2
It seems like IOT2TANGLE is a spin-off of the original XDK2MAM project. Introduce IOT2TANGLE to our readers, and then talk a bit about the differences between IOT2TANGLE and XDK2MAM. Is it a project “rebrand”? A new project altogether? A continuation of the original project but a simple porting over to new IOTA streams? Any new hardware devices involved?
We wouldn’t call IOT2TANGLE a XDK2MAM spin-off. It is more an extension of that idea in which we do exactly what we did for the XDK110, but for other devices too. The XDK110 will become just one of many devices for which we will develop open source code. The list may change, but right now it includes Raspberry, BeagleBone, ESP32 and 8266, STM32, MSP430 and others. If they're out there being used, we will write code to have those devices running on the Tangle.
IOT2TANGLE aims to continue supporting the XDK110 while creating open source code for other more common (and economical) chips broadly used by IoT designers/hobbyists. The concept is simple: we have a common sensor stack measuring Temperature, Humidity, Pressure, Acceleration, Noise and Light. We provide open source code that gets these sensors working on each board, and then sends the datasets to the Tangle via Streams. Our step by step guides will assist the end user so they can start sending sensor data to the Tangle quickly and easily. You don’t even need to be an engineer - just follow the steps and you're done.
In our opinion, this is an elegant way of extending the work we've previously validated with XDK2MAM to other devices, while still supporting the XDK110. We are merging the last XDK2MAM milestone (XDK110 using Streams) with the first IOT2TANGLE step (have a Raspberry sending sensor’s data over Streams). IOT2TANGLE delivered a proposal in the field of tooling to the IOTA Ecosystem Development Fund, and we are proud to say it got approved at the end of 2019. Since the tech (Streams) was not yet there, we studied the devices while waiting for the IOTA Foundation to develop Streams. As we all know, alpha Streams is already out there, and now we consider it mature enough to begin our work that's been on hold for 9+ months. This means that we'll have to absorb Chrysalis Phase 2 changes as we go, a challenge that we've considered and accepted.
HelloIOTA Question #3:
Has there been any consideration to move toward a broader range of integrated sensors and devices? How do hardware decisions get made, and maybe you could give an example of one of these decisions you’ve made in the past. Has the IOTA Foundation had any input into the project, or maybe some guidance from afar as to what devices might be smart to look at? Help our readers get into your thought process on this.
While the XDK110 is an amazing tool to prototype for IoT applications, the truth is that most IoT developers have other devices at their labs/home. Boards such as the ESP32 or the STM32 can be used to prototype, but double as being very useful in production as well. When we started working with the XDK110, we learned this very quickly. That got us thinking, "what if anyone with one of these very cheap boards could easily integrate IOTA to his project?”
As you can imagine, the first step of IOT2TANGLE was researching the field of IoT devices and constructing as list of boards we wanted to cover. At this point, we've consulted with many community members working with IoT as well as some embedded engineers from the IOTA Foundation. We've gotten lots of feedback which has helped not only choose the devices, but also anticipate the coming changes to the code of IOTA's data second layer.
We think it's smart to keep the list of devices as a living, breathing thing, always open to revision. We'll probably add more devices in the future. Also, this is an open source project - we aim to have a massive hub of code that'll integrate IoT devices with IOTA. IOT2TANGLE is just the start of an initiative that could become a very useful repository of clean and easy to use code that bridges boards with the Tangle.
HelloIOTA Question #4:
Your project has always put open-source code at the top of the priority list. Explain why open-source code is so instrumental to building the world we want to live in, and talk about the tradeoffs between open-source and closed/private code. What’s one experience you’ve had that’s reaffirmed your belief that open-source is the way to go?
You guys know this is a constantly moving realm. IOTA is continuously changing and evolving. Even IoT software is growing at a tremendous rate. The only way we can maintain an up-to-date code hub of this type is to have great collaboration from the community.
For us, open source code is a philosophy. No private company will ever be able to hire developers that can match what the open source community can do. The security of software should not rely on “hiding its weaknesses”. To be honest, we think this is the case of most of the proprietary software out there - "security through obscurity". The IoT world is a hackers nest. People like to tweak things and constantly improve their devices and code. Therefore, it's important that we remain constantly in a state of investigation so that we can find the next new technology that'll be used in our daily lives. We want promising people on board, so having our code public can only help to make it stronger.
XDK2MAM benefited tremendously from the issues filed and input logged by our users. They literally pointed us in the right direction many times, and we would be stupid if we didn't continue to take advantage of that great asset. Also, we envision I2T as “the IoT/IOTA hub” and, therefore, we need people adding their solutions to integrate devices that we don't yet cover.
HelloIOTA Question #5
Let’s meet the IOT2TANGLE team!
We have a great team! Daniel De Michele (Full Stack Developer, Argentina) is leading the project. Alessandro Busser (Rust Developer, Switzerland) is leading the IOTA Streams integration. Gustavo Belbruno (Embedded Engineer, Argentina) is in charge of ensuring a very smooth experience on the hardware side, and Daniel Trauth (CE Representative, Germany) is advising us on some practices. On top of that, we are getting tons of help from Sam Chen (Embedded Engineer at IF), Yu-Wei Wu (Software Engineer at IF), Bernardo Araujo (Embedded Engineer at IF) and many others!
Together we managed to have a great synergy while IOTA is changing many of its features with an eye towards a new protocol with decentralized consensus.
Alessandro is developing solutions that'll have the XDK110 and sensors on a Raspberry Pi3 sending data via Streams that will be available really soon. At the same time, Gustavo is researching Embedded Rust for XTensa and ARM chips with help from Sam Chen and Yu-Wei Wu. While we wait for the IOTA Foundation to provide us with a Clang version for Streams, we are running some tests to evaluate whether the task can be done directly with Rust or not. Rust might have a bright future for embedded devices.
HelloIOTA Question #6
And finally, since your team has such intimate expertise with IOTA MAM and IOTA Streams, let’s learn how we should be thinking about the differences between MAM and Streams.
Our Streams guru is Alessandro, so let’s have him answer this one.
The big difference is that Streams is a framework for encrypted messaging applications, whereas MAM is one application. So, in some sense MAM is one of the many applications that could be created using the Streams framework.
The IOTA-Foundation released the “Channels Applications” which is the successor version of MAM built with the Streams framework. So the main differences between Channels and MAM are that: channels provides a more granular control over who can read and write messages through the mechanism of branching; channels also now uses binary cryptography and will be able to benefit from all of the upcoming improvements to the IOTA network; and also, channels is more customizable and can be further optimized and adapted for specific use cases; but lastly, as channels is still in Alpha it is still lacking some of the features from MAM such as statefullness and deterministic message derivation.
HelloIOTA Question #7
Thanks for taking the time to connect with HelloIOTA readership and to tell us your story. Any concluding remarks?
Something really interesting is that, from the work done with XDK2MAM, many giant IoT companies approached us asking for integration of their boards with IOTA. We aim to have IOT2TANGLE generate bridges between these companies and IOTA, and we're sure that we'll see that happen as a result of our hard work.
After a long period studying the field and talking with many corporates, we are now in the position to begin working. We are fully aware of the changes coming on the IOTA protocol and, finally, we can begin delivering software that will adapt to those changes with ease. Buckle up, it’s gonna be a wild ride!