Abstract Machines logoHardware
S0 Gateway

Getting Started with S0

Quick start guide for S0 IoT Gateway

Getting Started with S0

This guide will help you get up and running with the S0 IoT Gateway.

What You'll Need

Hardware

  • S0 IoT Gateway module
  • USB-C cable for power and programming
  • Optional: S0 Base Board for expanded functionality

Software

  • Zephyr SDK
  • Serial terminal (minicom, screen, or PuTTY)
  • Git

Accounts

  • Magistrala account (cloud or local instance)
  • Optional: NB-IoT/LTE-M SIM card with data plan

Development Environment Setup

Install Zephyr OS

To program and build firmware for the S0 board, install Zephyr OS from the official website:

https://docs.zephyrproject.org/latest/develop/getting_started/index.html

Zephyr provides:

  • Hardware abstraction for ESP32-C6 peripherals
  • Real-time task scheduling
  • Networking and protocol stacks
  • Secure communication and TLS support

Once Zephyr is installed, you can build and flash applications directly to the S0 board using west.

Clone the Embedded Repository

Zephyr code for the various protocols can be accessed by cloning the Embedded Repository:

git clone https://github.com/absmach/embedded

Magistrala Setup

  1. Navigate to Magistrala and sign up.

  2. Create a domain, channel, and client.

  3. Connect the client to the channel you created.

  4. Note down the CHANNELID, DOMAINID, CLIENTID, and CLIENTSECRET — you will need these when configuring firmware.

Uploading Code

Before uploading any code, be sure to have activated a virtual environment as guided in the Zephyr documentation.

Download and install the binary blobs that the Espressif HAL needs:

west blob fetch hal_espressif

Navigate to the Zephyr protocol examples:

cd embedded/targets/zephyr
ls

Choose the protocol you want to communicate over by moving into that directory. Make sure the directory contains:

CMakeLists.txt
prj.conf
src/

Change the variables in src/config.h to match your SuperMQ environment:

  • CLIENTID
  • CLIENTSECRET
  • DOMAINID
  • CHANNELID

Build the code:

west build -p always -b esp32c6_devkitc

The board parameter can be changed to whichever board you are using as long as it is recognized by Zephyr. See Zephyr supported boards for more information.

To upload code to the S0 and monitor the serial output:

west flash
west espressif monitor

Next Steps

On this page