As a DIY enthusiast but also as an IoT startup founder and lead developer, I am often worried that a small firmware bug will make one of our systems collapse. Therefore I’m always looking for better approaches to perform over the air firmware upgrades after the “product has shipped” such as LWM2M, Eclipse Leshan, Wakaama and Kura in hope to utilize them in our future projects as the main components required for remote device management and OTA.
I am participating in this Eclipse IoT challenge as a way to enrich our knowledge on the subject and share the experience along the way. To keep things simple, we have DIY oriented requirements in mind e.g. take central control with OTA ability for multiple arduino compatible wifi devices (e.g. ESP8266). If the “arduino” part is a deal breaker, we will explore other solutions SDK/RTOS based but keeping the lightweight M2M protocol compatiblity, in order to take advantage of future developments from Eclipse on this topic.
Gateway device management is easy, as the hardware resources are not as restricted as microcontrollers, so Kura on a RPi is fine. Would be interesting to find an organized way to cascade OTA e.g. trigger an update from a cloud server, which will update the gateways which will update the ESP8266 nodes of the intranet and if these are gateways to another network e.g. Arduino NRF24 via mysensors.org or LoraWAN, then update the arduino end nodes as well.
…yes, it sounds like a mad scientist’s plan to take over the world with OTA updates ?
…and it seems more mad scientists exist in Eclipse and Bosch and are already working on similar concepts already! A few weeks after submitting for the IoT challenge proposal, we found out about hawkbit from Benjamin’s blog. Looking forward to the source code release! but until then, we will try our own little hack.
Like most IoT enthusiasts, I am a big fan of ESP8266 so the plan for this project is to port wakaama on ESP8266 (ideally as an arduino lib) and use a modified Leshan for device management and bulk OTA firmware upgrade. I’ve been researching on ESP8266, Arduino, OTA, CoaP, lwM2M so I will list some of the useful stuff that I have found along the way.
The first thing I searched for was an Arduino lib version of the wakaama. I was in FOSDEM last year in Ben’s presentation of LwM2M (asking about TI CC3200 cause I couldn’t read chinese at the time either, but ESP8266 has grown since and it seems many of us have learned how to read chinese ?
In his presentations there are references for various ports of wakaama for Cortex M3 devices and ATmega2560, but I could only find the mbed demo. Eitherway, I assume all these must be SDK based but I’m looking for an Arduino lib flavour. Is there one? (haven’t found any)
Is it possible to make one ?
These are the nearest components I could find:
Arduino ESP8266 OTA
Arduino ESP8266 CoaP lib
So theoretically, if I merge these two and add some lwM2M protocol specific features I will have a wakaama arduino lib for ESP8266 ?
On my github account I’ve published a first attempt which works, but has no lwM2M features yet.
Stay tuned for the next episode.