Sming (main)

This is the main Sming Component containing all architecture-independent code. All architecture-specific stuff is in either Sming (Esp8266) or Sming (Host).

Serial baud rate


Default baud rate for serial port.

This will recompile your application to use the revised baud rate. Note that this will change the default speed used for both flashing and serial comms. See also Esptool and Terminal for further details.

The default rate for serial ports is 115200 baud. You can change it like this:

make COM_SPEED=921600

Debug information log level and format


When compiled in debug mode (:envvar:SMING_RELEASE undefined) there are four debug levels in increasing level of verbosity:

  • 0: errors
  • 1: warnings
  • 2: information (default)
  • 3: debug

Change it like this:


Set this to 1 to include the filename and line number in every line of debug output. This will require extra space on flash.


If you change these settings and want them applied to Sming, not just your project, then you’ll need to recompile all components like this:

make components-clean

Task Queue

The task queue is used for System.queueCallback() calls.


Maximum number of entries in the task queue (default 16). Must be a power of 2.


If problems are suspected with task queuing, it may be getting flooded. For this reason you should check the return value from queueCallback().

You can enable this option to keep track of the number of active tasks, System::getTaskCount(), and the maximum, System::getMaxTaskCount().

By default this is disabled and both methods will return 255. This is because interrupts must be disabled to ensure an accurate count, which may not be desirable.

Release builds


By default, this value is undefined to produce a build with debug output. To build for release, do this:


This remains in force until you change it back:


Command Executor


Default: ON. This feature enables execution of certain commands by registering token handlers for text received via serial, websocket or telnet connection. If this feature is not used additional RAM/Flash can be obtained by setting ENABLE_CMD_EXECUTOR=0. This will save ~1KB RAM and ~3KB of flash memory.

group commandhandler

Provide command line interface.

Command handler provides a common command line interface. CLI is available for the following remote access methods:

  • Serial
  • Telnet
  • Websockets

By default, CLI is disabled. Enable CLI by calling “commandProcessing” on the appropriate access class object, e.g.


Commands can be added to and removed from the command handler. Each command will trigger a defined Delegate.

A welcome message may be shown when a user connects and end of line character may be defined. An automatic “help” display is available.


typedef Delegate<void(String commandLine, CommandOutput *commandOutput)> CommandFunctionDelegate

Command delegate function.

CommandFunctionDelegate defines the structure of a function that handles individual commands
Can use standard print functions on commandOutput
  • commandLine: Command line entered by user at CLI, including command and parameters
  • commandOutput: Pointer to the CLI print stream

typedef CommandFunctionDelegate commandFunctionDelegate


enum VerboseMode

Verbose mode.



Verbose mode.


Silent mode.


CommandHandler commandHandler

Global instance of CommandHandler.

class CommandDelegate
#include <CommandDelegate.h>

Command delegate class.

class CommandHandler
#include <CommandHandler.h>

Command handler class.

WiFi Connection


Set to 1 to enable WiFi Protected Setup (WPS) WPS is not enabled by default to preserve resources, and because there may be security implications which you should consider carefully.


Set to 1 to enable WiFi Smart Configuration API SmartConfig requires extra libraries and ENABLE_ESPCONN. See Basic Smart Config sample application.

If you want to provide a default SSID and Password for connection to your default Access Point, you can do this:

make WIFI_SSID=MyAccessPoint WIFI_PWD=secret

These are provided as #defined symbols for your application to use. See Basic WiFi for a simple example, or MeteoControl for a more flexible solution using configuration files.


SSID identifying default Access Point to connect to. By default, this is undefined.


Password for the WIFI_SSID Access Point, if required. If the AP is open then leave this undefined.

SSL support


Default: undefined (disabled)

SSL requires lots of RAM and some intensive processing, so to conserve resources it is disabled by default. If you want to enable it then take a look at the Basic SSL sample.

Set to 1 to enable SSL support using the AXTLS 8266 Component.

HTTP support


Default: 1 (enabled)

Adds “HttpServer/Sming” to the SERVER field in response headers. If disabled, the SERVER field is omitted from all responses.


Default: 0 (disabled)

Adds the current Sming build version to the SERVER field in response headers. For example, “Sming/4.0.0-rc2”.

Requires HTTP_SERVER_EXPOSE_NAME to be enabled.


Default: 0 (disabled)

Sets the DATE field in response headers.



Sming can format dates/time values based on a country code identified by this value. This is provided as a #define symbol for your application to use. See Sming/Core/SmingLocale.h for further details.