Date: May 2020
Client: FantomLED LLC
Services: IoT Software engineering
Objective: To create an Over the Air Update system for keeping hundreds of MediaTek 7688 based IoT gateways in sync with the latest release of the firmware. The system is based on a client script that is run automatically at night, and a dashboard that allows system administrators to manage firmware images, and track the update status of each device.
The MediaTek 7688 SoC is an appliance automation bridge. It integrates a 1T1R 802.11n Wi-Fi radio, a 580MHz MIPS® 24KEc™ CPU, 1-port fast Ethernet PHY, USB2.0 host, PCIe, SD-XC, I2S/PCM and multiple low-speed IOs in a single SoC.
OTA Update Client
The Update Client is made of a few Lua scripts performing various tasks, such as reporting the gateway status and performance data to the server, checking for new updates, and downloading the latest firmware. In addition to that, the OTA Update Client is able to update itself from the server without updating the firmware.
Stack: REST API, https, Lua, OpenWRT sysupgrade
Programming Languages: Lua
Approach: First I designed a mock-up REST API in Node.js/Express that I used to develop and test the OTA Update Client. I then proceeded by creating the bootloader and all the other scripts needed to communicate with the server. Finally, I replaced the mock-up REST API with a fully working backend and dashboard.
OTA Update Management and Dashboard
The OTA Update Management System allows system administrators to manage firmware releases (file upload, update enabled/disabled, release date/time) and shows statistics such as total no. of downloads, no. of gateways tracked, no. successful updates, no. failed updates. The backend also provides all the REST API needed by the OTA Update Client to properly work.
Stack: Vue.js, REST API, Node.js, Express, MongoDB
Approach: I started by creating the backend of the application in Node.js and integrating it with MongoDB and Express. Even if MongoDB is a NoSql DBMS, I wrote additional code responsible for keeping the records structure consistent. I then developed the frontend in Vue.js dividing properly the interface in multiple components and keeping the code as tidy and scalable as possible.