This is the 2nd update about ongoing progress of running a IOTA Wallet on IoT devices. Please find the general vision and project description linked here: Embed<IOTA> and first part here: Embed<IOTA> update I.

Previous update described some tinkering with different MCU boards to achieve basically attaching MCU signed zero value transactions to Tangle.

Figure 1. Basic workflow described in update I where it was achieved to bring zero value transactions to Tangle signed by ESP8266 and ESP32 via WiFi.

For any serious application it wouldn’t be acceptable to fire and forget transactions. DLT’s bring the benefit of immutable data/information storage, so it’s essential to get the data back at some point. For instance if you store any sensor values in Tangle, other MCU’s should have a chance to find this data and use it. Another issue comes with value transactions, where any IoT device should have the chance to check if its own or other transaction is confirmed. So today, lets start taking this chance…

Basically there are multiple ways finding transactions on Tangle. You can try it with any Tangle explorer. You can find transactions by knowing the address, transaction hash, bundle hash or tag. Depending on use case some of this methods make more or less sense to use. But as a first step we don’t care about particular use cases cause the general implementation is same for all — it just need some use case dependent adjustment, we come back to it at later point.

Figure 2. Basic workflow of attaching bundles to tangle and try to find them at a later point in time to receive its information.

For a simple test the most obvious approach was chosen. Only two API methods are necessary to get the transaction info back: findTranaction() and getTrytes().

As you can see findTransaction() allows multiple inputs. Due to fact the same device was sending the transaction wants to find it, lets keep it simple for testing. As we know the seed, we can iterate over the known address space or better say “indices”.

The output from findTransaction() is simply getTrytes() input to receive the transaction information we want to have. Now the loop is closed at least for one IoT device interacting with its self.

Figure 3. Console output from ESP32 while checking each of its own addresses on Tangle to get back containing trytes.

For interaction between different actors it not practicable to share the seed for address generation — never ever do this! of course, finally the target is each IoT actor maintaining its own seed and by this its own wallet.

But how can multiple IoT actors find transactions from unknown participants and share information? In a later post I come back to this issue more in detail cause I feel it may be worth a segregated post.

Done:

bundle creation

attaching zero value transactions to tangle

finding transactions on Tangle and evaluate its transaction info on ESP8266 and ESP32

Next Steps:

checking out Entangled project and reproduce the results

having multiple actors interchanging data via Tangle

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