This is the first summary of the ongoing progress of running a IOTA Wallet on IoT devices. Please find the general project description linked here: Embed<IOTA>

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 .

Experimental Setup

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.

Bundle signature on ESP8266

Once bundle created, ESP8266 will send it back to STM32 and restart itself. As mentioned, we did this in so radical way as there are some issues with ESP8266 during bundle prepare procedure.

But after it restarts everything becomes fine and we got what we where looking for.

Step 2: Send signed bundle from Step 1 back to ESP8266. Once ESP8266 receive this command above it starts to do the following steps:

1. It calls getTransactionsToApprove API and selects branch and trunk transactions.

2. Then it calls attacheToTangle API — for outsourcing POW for our bundle.

3. Next it calls storeTransactions API — for saving our transaction in to node’s local storage.

4. Finally it calls broadcastTransaction API of to broadcast it between nodes.

output from getTranactionsToApprove call

output from attachToTangle, storeTransactions, broadcastTransactions calls

After 4-th step broadcastTransactions was performed, we where able to see our transaction in nodes.thetangle.org:

This shows the basic transaction signature process and transfer to an IOTA Node can be done with an very limited device like ESP8266 without external flash memory.

experimental setup based on ESP32

Obviously the experimental setup was driven by workarounds so we tried to streamline it at some point.

So it was a good incidence that our ESP32 experimental setup was able to reproduce the same result with much less periphery.

At same time it has not so tight memory restrictions so we decided to continue the next steps with this kind of experimental setups.

Done:

bundle creation

attaching zero value transactions to tangle

Next Steps:

continue with ESP32 experimental setups

finding transactions on Tangle and evaluate its transaction info on ESP32

If you like what you read, go here and hit the Heard: EcoSystem Project Page