Zelta/Documentation

Quick Start Guide

Get your first OTA update running in 5 minutes.

Prerequisites

  • A Zelta account (sign up at dashboard)
  • An embedded device with network connectivity
  • Basic familiarity with C programming

Step 1: Create a Product

  1. Log in to the Zelta Dashboard
  2. Go to Products and click Add Product
  3. Enter a name (e.g., "Smart Sensor v2")
  4. Optionally add a Hardware ID for automatic device matching

Step 2: Generate Signing Keys

Firmware must be signed to prevent unauthorized updates.

  1. Go to Firmware page
  2. In the Signing Key section, click Generate Keypair
  3. Download the private key and store it securely (you'll need this to sign firmware)
  4. Click Save Public Key to Org to enable signature verification

Step 3: Upload Firmware

  1. Select your product from the dropdown
  2. Enter the version number (e.g., "1.0.0")
  3. Select your firmware binary file (.bin)
  4. Click Upload & Sign

The firmware will be signed with your private key and uploaded to secure storage.

Step 4: Create an API Key

Devices need an API key to communicate with Zelta.

  1. Go to API Keys page
  2. Click Create API Key
  3. Give it a name (e.g., "Production Devices")
  4. Copy the key immediately - it won't be shown again!

Step 5: Integrate the SDK

Add the Zelta SDK to your embedded project:

#include "zelta.h"

// Initialize
zelta_config_t config = {
    .server_url = "https://your-project.supabase.co/functions/v1",
    .api_key = "your-api-key",
    .device_id = "device-001",
    .current_version = "0.9.0",
    .product_id = "your-product-uuid",
};

zelta_init(&config);

// Check for updates
zelta_update_info_t update;
if (zelta_check_update(&update) == ZELTA_UPDATE_AVAILABLE) {
    printf("Update available: %s\\n", update.version);
    
    // Download and apply
    if (zelta_download_and_apply(&update) == ZELTA_OK) {
        // Reboot to new firmware
        sys_reboot(SYS_REBOOT_COLD);
    }
}

Step 6: Test the Update

  1. Flash your device with v0.9.0 (or any version lower than uploaded)
  2. Power on the device and connect to network
  3. The device will check for updates and find v1.0.0
  4. Watch the update download and apply
  5. Check the Dashboard to see the device status update

Next Steps