LogoLogo
  • Welcome
  • Getting Started
    • Create a Workspace
    • Join a Workspace
    • Manage your Workspace
  • User Guides
    • Platform User Guide
      • Creating a Platform
      • Creating Chips
    • Fleet User Guide
      • Creating a Fleet
      • Enrolling Machines
        • Enrolling ESP32 Devices
      • Managing a Fleet
    • Workflow User Guide
      • Creating a Workflow
      • Packages and Releases
      • Running Workflows
      • Managing Workflows
  • Operator Guides
    • Generate Chassy Tokens
    • Integrating with GitHub
      • Workflow Run Action
      • Upload Action
  • Tutorials
    • Deploy an Artifact
  • Reference
    • Workflow Components
      • Steps
    • Hardware Hierarchy
    • Integrations
      • AWS
      • GitHub
      • Docker Hub
      • Slack
      • Wasabi
    • Chassy Component for ESP32
Powered by GitBook
On this page
  • Overview
  • Key Features
  • Requirements
  • Prerequisites
  • Configuration
  • Integration Guide
  • Enrolment
  1. Reference

Chassy Component for ESP32

Overview

The Chassy Component is a library for ESP32 devices that enables seamless integration with the Chassy services. It provides functionality for device registration, authentication, and over-the-air (OTA) firmware updates. This component simplifies the process of connecting ESP32 devices to the Chassy cloud, allowing for remote management and monitoring of your fleet.

Key Features

  • Automatic device registration and enrolment

  • Secure authentication and communication using modern TLS protocols

  • OTA firmware updates

  • Status reporting to the Chassy endpoint

Requirements

  1. ESP-IDF v5.5 or later: This component is built and tested with ESP-IDF version 5.5. Earlier versions may not be fully compatible.

  2. OTA Partition Configuration: Your device must have at least 2 OTA partitions of 1 MB each to support the OTA update functionality.

  3. NVS Storage: A minimum of 4 KB of NVS (Non-Volatile Storage) must be reserved for Chassy component use. This storage is used for maintaining device credentials, deployment information, and update status.

  4. Network Connectivity: The device must have Wi-Fi or Ethernet connectivity to communicate with Chassy services.

Prerequisites

  1. ESP-IDF: This component requires the Espressif IoT Development Framework (ESP-IDF). Follow the official installation guide to set up ESP-IDF on your development machine.

  2. Bootstrap Token: A bootstrap token from your Chassy account is required for initial device enrolment.

Configuration

The component requires the following configuration in your device's Non-Volatile Storage (NVS):

  • hostname: A unique name for your device

  • bootstrap_token: The token obtained from your Chassy account

  • endpoint: Set to either "development" or "production" depending on your environment

Integration Guide

To include the Chassy component in your ESP32 project:

  1. Add the Chassy component as a library to your project

  2. In your initialization function, call:

    chassy::ChassyDeviceManager::run_on_init(device_ip_address);
  3. In your main loop, periodically call:

    chassy::ChassyDeviceManager::update_chassy_endpoint(device_ip_address);
  4. To check for and perform updates when available:

    auto status = chassy::ChassyDeviceManager::update_chassy_endpoint(device_ip_address);
    if (status == chassy::ChassyDeviceManager::CheckUpdateStatus::kUpdateAvailable) {
        chassy::ChassyDeviceManager::perform_update(device_ip_address);
    }

Enrolment

For a guide on how to enrol a new ESP32 device, please follow this guide.

Last updated 1 month ago