ESP32 Animal Tag: FUOTA

Last Updated on the 21st September, 2021

Upland hill harming is a key pastoral farming practice integral to the prosperity of the Lake District World Heritage Site. An ESP32 based animal tag device developed by Milliamp Technologies aims to help maintain the occupancy, which in turn sustains the cultural landscape. This project develops the Firmware Update Over-the-Air (FUOTA) mechanisms and evaluates the efficacy of the animal tag in operation. Code links for this project are not available and information is limited due to a signed NDA agreement.


System Architectural Overview

LPWAN ESP32 animal tag basic system architecture
Basic System Architecture

The overall system framework for this project consists of animal tags that communicate with nearby gateways that are geographically distributed to cover a selected area. The basic figure above provides a simplistic overview of the interoperability between the various components that constitute this projects architecture. For a more detailed overview, selected the detailed tab above.

LPWAN ESP32 animal tag advanced system architecture
Comprehensive System Architecture

This higher fidelity architectural diagram illustrates a more elaborate overview of system communication over various network layers. Each system element's internal components are detailed and the interoperability between them is shown. Examples of potential subscribed and published MQTT topics, along with gRPC service messages are detailed.

Project Information
Created:

Friday, 18th June 2021

Tools:
Protocols:
Frameworks:
Languages:
  • C++
  • Go
  • JavaScript
Useful Links

The ESP32 Animal Tag

The animal tags are an ESP32 series end-device and the targets for multicast firmware updates over an LPWAN. Their primary operation involves the utilisation of a machine-learning algorithm to detect livestock ailments. When a negative animal health status is detected, the device will send an uplink alert to the gateway, which will alert a farmer's dashboard.

The video shows a Raspberry Pi LoRa gateway equiped with a LoRa concentrator that publishes to an MQTT broker over TCP. A low-power formatted alert uplink is then transmitted and securely ingested by the network server. We then decrypt the base-64 encoded payload for demonstrational purposes.


Firmware Updates Over-the-Air

The developed application implements multicast firmware updates over LoRaWAN using an end-device Class C configuration by adopting remote multicast setup, fragmented data block transport, and application layer clock synchronization specifications. Class C is known as the ‘continuous’ reception mode as the receive windows stay persistently open. The Class C transmission figure below, shows how the open-ended receive window only closes when the device sends a transmission back to the server. Due to this, the mode has low latency yet must compromise its receiver's power expenditure—making this mode best suited for applications where continuous power is available. To overcome this, mode switching can be used for intermittent task switching to apply firmware updates over-the-air.

Class C LoRaWAN transmission timing diagram
Class C reception window slot timing

The video below shows the server-side application operating without the animal tag functioning—time was limited for developing that side of the system. For a more detailed overview of this project and to find out about thorough testing and experimentation completed, please view the dissertation document found under 'useful links'.