Framework
SmingHub/Sming avatar
SmingHub/Sming

Sming Embedded C++ Framework: Setup and Architecture

Sming - powerful open source framework simplifying the creation of embedded C++ applications.

1,569 stars344 forksC++LGPL-3.0

At a glance

What is it?
Sming is an asynchronous C++ framework for ESP8266, ESP32, and Raspberry Pi Pico applications. It combines GPIO, WiFi, HTTP, OTA updates, and Arduino-style library use, but requires target-specific development tools and a larger framework toolchain.
Who is it for?
Sming fits embedded C++ developers who want HTTP clients, HTTP servers, WiFi, OTA updates, and GPIO control through one framework across ESP8266, ESP32, RP2040, and RP2350. It is a poor fit for someone who wants an undocumented, installation-free native device workflow.
Can I use it commercially?
Yes, with conditions. LGPL-3.0 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
Is it still maintained?
Yes. The repository last received commits 14 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Sming's Target Platforms and Embedded C++ Use Case

Sming addresses the gap between writing firmware directly against a microcontroller platform and assembling networking, HTTP, WiFi, and update support as separate components. It is intended for developers building embedded C++ applications, particularly people working with ESP8266, ESP32, or Raspberry Pi Pico hardware. The README identifies support for both RP2040 and RP2350, so the supported target list extends beyond the older ESP devices.

The repository is organized around a framework under `Sming/`, reusable code under `Libraries/`, command-line tools under `Tools/`, documentation under `docs/`, and deployable examples under `samples/`. That layout exposes Sming as a complete application framework rather than a single Arduino-compatible library. It is a better fit for a C++ developer who wants the framework to supply a server, client, OTA updater, and hardware-facing APIs in one project.

The framework is not limited to networking. The examples cover blinking, GPIO input and output, serial communication, sensors, I2C devices, analog output, interrupts, Ethernet, audio, dual-core operation, and programmable memory. Sming also retains an Arduino-facing surface for common operations. For example, it uses familiar calls such as `pinMode()`, `digitalWrite()`, and `Serial.begin()`. The DHT22 sample also includes a library with the explicit `<Libraries/DHTesp/DHTesp.h>` path, which suggests that integration with existing Arduino-style libraries is an intended part of development.

That breadth creates a clear choice. Developers who only need a small GPIO routine may prefer a lighter approach. Sming becomes more relevant when the same application also needs WiFi, HTTP, templates, file responses, SSL-oriented examples, or OTA application updates.

Sming's Asynchronous Network and Callback Structure

Sming describes itself as asynchronous, and its HTTP examples show that model through client operations and completion callbacks rather than a single blocking request function. The `HttpClient` example calls `downloadString()` with `onDataSent`, then checks the `successful` Boolean in `void onDataSent(HttpClient& client, bool successful)`. The application can therefore continue through its own control flow and receive an explicit success or failure result.

For inbound traffic, the server example registers route handlers and listens on port 80. `server.paths.set()` associates exact paths with handlers, while `setDefault()` handles other requests. A handler receives `HttpRequest &request` and `HttpResponse &response`, which separates request inspection from response construction. The example can create a `TemplateFileStream`, populate variables, and call `response.sendTemplate()`. It can also set cache duration and return a file with `response.sendFile()`.

WiFi setup follows the same application-level API. `WifiStation.enable(true)` turns on station mode, `WifiStation.config()` receives an SSID and password, and `WifiStation.getIP()` retrieves the assigned address. Sming combines these network primitives into a single source tree, including examples for an HTTP client, an HTTP server, email, ThingSpeak, and network configuration.

OTA updates are also represented as an explicit asynchronous-looking workflow. The example creates an `Ota::Network::HttpUpgrader`, selects a boot partition with `ota.getNextBootPartition()`, adds the image URL, registers a callback, and starts the update. The commented requirement to delete a prior updater before retrying is an important operational detail: Sming expects that object to be recreated after an earlier failed attempt.

Installing Sming and Building Basic_Blink

The README does not provide a universal installation command because the required development software depends on the selected architecture. It directs users to the Getting Started documentation and says to choose an architecture before installing the needed tools. Developers can also use the interactive browser tutorial for a host-emulator workflow without installing the toolchain locally.

After installing the architecture-specific tools, clone the repository with the command documented in the README:

bash
git clone https://github.com/SmingHub/Sming.git

For the first hardware use, enter the sample directory and run the two documented Make targets:

bash
cd Sming/samples
cd Basic_Blink
make
make flash

The first `make` command compiles the application. The second attempts to upload it to an ESP8266 device, according to the README's example description. Because the installation documentation is architecture-specific, the expected generated files, connected-device detection behavior, and any required board settings are not documented in the README excerpt.

The Basic_Blink application uses a simple hardware-facing setup:

c++
#define LED_PIN 2 // GPIO2
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, HIGH);

This example is useful as a compilation and upload check because it exercises the selected architecture's build path with minimal application logic. The repository's broader `samples/` directory is the documented place to learn the API, with named samples for serial output, sensors, HTTP, OTA, and other hardware tasks.

HTTP Server and OTA Constraints in Sming Applications

The HTTP server sample exposes several design decisions that application developers must handle rather than hide. Port 80 is passed directly to `server.listen()`, routes are registered before traffic arrives, and each route handler controls the response object. Serving a file depends on the requested path and uses `response.sendFile()`. The code also calls `response.setCache(86400, true)`, making cache policy part of application behavior.

The server sample therefore does more than expose a single endpoint. It demonstrates exact route registration, a default handler, template variables, filesystem responses, and cache metadata. It is also network-facing code, so credentials and deployment configuration matter. The WiFi example contains network values directly in `WifiStation.config()`. The README does not document credential storage, production configuration files, access control, or rollback behavior for failed HTTP deployments, so those areas should not be assumed.

OTA introduces a second operational boundary. The example chooses a flash partition, downloads content into it, and calls back without immediately switching the requested boot state. The README excerpt does not show the complete image URL definition, partition configuration, success handler, or recovery path. It also does not document rollback if the newly selected image fails to boot. Based on the visible code, a developer should treat partition selection and the updater object's lifecycle as explicit application responsibilities.

Sming Versus a Local Install or Arduino-Style Library Use

Sming has two documented setup paths: architecture-specific local development tools or the Killercoda host emulator. These are genuine alternatives in how a developer learns or begins using the framework. A local setup compiles samples with Make and can upload firmware through commands such as `make flash`. The browser tutorial instead runs a host-emulator scenario directly and is explicitly offered for trying Sming without a local installation. It is a different execution environment, not evidence that all device features can be emulated.

There is also a distinction between adopting Sming as the application framework and borrowing an individual Arduino-style library. The DHT22 example includes `<Libraries/DHTesp/DHTesp.h>` and calls it a popular Arduino library. That library addresses sensor access, whereas Sming supplies the larger application environment: asynchronous HTTP, WiFi station configuration, routing, templates, file responses, and OTA update objects. Adding the sensor library to a different framework would not provide Sming's server and updater APIs.

The trade-off is toolchain commitment. Sming centralizes more embedded application facilities, but its documented build flow requires selecting and installing tools for an architecture. A developer who needs only `DHTesp` can use that library directly without adopting the whole Sming application model. Sming makes more sense when the framework features are part of the firmware requirements.

Sming Releases, LGPL-3.0, and Upgrade Scope

The repository is not archived, and the last push was on 2026-10-09. The README identifies Sming 6.2.0, released on 2025-12-24, as the current stable version, while the default branch is `develop`. Earlier listed releases include 6.1.0 from 2025-07-30 and 6.0.0 from 2024-12-27.

Sming uses the LGPL-3.0 license. That matters when an organization plans how modified or redistributed library code will be handled, especially for linked application components. This article does not provide legal advice, and the README does not state an exception for particular sample applications or linking patterns. License review should therefore use the repository's `LICENSE` file and the actual distribution model of the firmware.

An upgrade is not necessarily just a changed C++ header. The repository contains framework code, tools, tests, documentation, and many architecture-specific samples. The README does not publish a migration guide for upgrading a device application from one Sming major version to another. It does provide separate stable and latest documentation, which helps distinguish the 6.2.0 reference point from development-branch behavior. The first practical compatibility check is therefore a clean build of the application's existing sample base or firmware, followed by hardware upload and target-specific checks.

Editorial conclusion

Sming fits embedded C++ developers who want HTTP clients, HTTP servers, WiFi, OTA updates, and GPIO control through one framework across ESP8266, ESP32, RP2040, and RP2350. It is a poor fit for someone who wants an undocumented, installation-free native device workflow. Before adoption, verify that Sming supports the selected board and architecture, install the matching development tools from its Getting Started documentation, and compile the Basic_Blink sample for that target before moving the application into a hardware build.

Frequently asked questions

Which hardware platforms does Sming support?

The README lists ESP8266, ESP32, and Raspberry Pi Pico support, including both RP2040 and RP2350 architectures.

How do I compile and upload the Sming Basic_Blink example?

After installing the development tools for the selected architecture, enter `Sming/samples/Basic_Blink`, run `make`, and then run `make flash`. The README describes the latter as an attempted upload to an ESP8266 device.

Can I try Sming without installing the development tools locally?

The README points to an interactive Killercoda host-emulator tutorial that can run in a browser without a local installation.

Which Sming release is documented as current and stable?

The README identifies Sming 6.2.0 as the current stable release and links the version 6.2.0 documentation as the stable documentation.

Official sources

  1. License: LGPL-3.0
  2. Project website
  3. README
  4. Releases
  5. SmingHub/Sming on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/sminghub-sming.svg)](https://hysenlabs.com/projects/sminghub-sming)

Was this useful?