Close

esp-link MQTT software

A project log for Spider, a Tiny Home Automation Hub

Low-cost modular MQTT devices

danny-havenithDanny Havenith 05/28/2017 at 19:460 Comments

Spider uses esp-link for its wifi connectivity. This custom esp8266 firmware offers many functions in addition to plain network connectivity. The one feature that was very useful from day one was the AVR firmware update: An avr with a suitable boot loader can receive firmware updates over WiFi via the esp.

Spider uses the optiboot boot loader. This means it's flashable through its serial port. It should even be possible to flash a Spider board from the Arduino IDE, although most programs will probably not work as expected due to the 8 Mhz clock.

Another nice feature of esp-link is that it can take care of maintaining a connection with an MQTT-broker. It allows the AVR to publish messages and to subscribe to topics. The AVR and esp-link must use the SLIP protocol in order to have both plain serial communications and in-band esp-link commands on the same serial port.

For Arduino, there is already an esp-link client library that takes care of the SLIP communications and the format of the command packets that are sent from and to the esp-link. Stubbornly, I decided that this library could not be used for Spider:

In other words: I'm a walking example of the NIH syndrome.

The library is still a work-in-progress. As always, writing my own version of this library took way more time than predicted. It has also taught me a lot about how the esp-link firmware works though, so in the end I don't consider it a complete waste of time.

Discussions