Embed<IOTA> update I
The full article was originally published by Tim Rappe on Medium. Read the full article here.
First there was tinkering around with different MCU’s like STM32 Blue Pill, ESP8266 and at least ESP32. There are multiple ways to start with software, but at the time of writing 3 options are most promising to achieve the first essential step:
- Generating Addresses and Signing Transaction Bundles
- IOTA C-Library from the EmbIOTA project is a quite optimized C library which has it’s origin in the Ledger Nano S project.
- RIOT + C-Library where Citrullin has implemented an multi threaded bundle signature process in “Examples”.
- Entangled Project which is a mono repository with all available tools and libs in C, maintained by IOTA Foundation.
Sure there may be other ways to go for, but this is what we tried out so far. The procedure was always the same, first try to reproduce the bundle signature process on different MCU’s with these different software approaches to get some experience.
The basic tests where done under Win10 and Ubuntu both with Arduino IDE. First we tried Win10 Linux Subsystem as well and it was quite possible to work in this way and get the Espressive tool-chain compiled and flashed to MCU’s like ESP8266 and ESP32.
The first run was on ESP32 and RIOT-IOTA example where I was able to perform the bundle calculation process. It was never quite stable and did a hard reset after the calculation was finished, but at least it showed the possibility to sign bundles on MCU’s.
2. Attaching the Bundles to Tangle
Later we reproduced it with IOTA C-Library only for better control during debugging. The first try with ESP8266 + IOTA C-Library was running so far but showed the same hard resets after the bundles where created — so they were lost…
To overcome the lost of the result and be able to attach it to Tangle, an workaround with strong focus on quick results was realized .
- ST-Link => we’re using it for uploading our programs to STM32.
- STM32 => we’re using it for sending command from PC to ESP8266.
- ESP8266 => IOTA API and IOTA C lib, we’re using it for signing transactions, and sending them to the Tangle.
- ARDUINO UNO => it doesn’t contains any functions but we’re using it for getting 3.3v and for uploading sketches into ESP8266 and for communications between STM32 and PC via UART protocol.
All communications between functional parts happens via UART protocol. For communications between STM32 and ESP8266 we’re using Serial1 pin and for STM32 and PC Serial2. The communication for sending transactions was done via HTTPS protocol.
As a reminder: First we’re using zero value transaction for demonstrations proposes:
Step 1: for initiating our demo we need send the following JSON command to STM32 controller.
After that STM32 will transfer input data to ESP8266 so the ESP can start preparing bundles with transaction data.