This section summarizes the key configuration options for the Mender MCU client in Zephyr. There are two categories of configuration: compile-time options (Kconfig) which you set before building your firmware, and runtime variables or values which the device determines during operation (often via callbacks or code). Most of the client behavior is controlled via Kconfig options in Zephyr's menuconfig system.
Integration of mender-mcu as a Zephyr module makes Kconfig options available under Modules → mender-mcu in west menuconfig. These options allow you to configure server connectivity, authentication, and client behavior. Below are the most important Kconfig settings:
MENDER_MCU_CLIENT
– Main switch to include the Mender client in the build. Set this to y to enable Mender OTA functionality. If not set, none of the client code is included.MENDER_SERVER_HOST
– The Mender server's base URL. Defaults to the hosted Mender endpoint. Set this to your server's address if not using hosted Mender. Note that this should be the host URL without any API path.MENDER_SERVER_TENANT_TOKEN
– The tenant token used to authenticate to a Mender server instance. You must set this to connect to the hosted Mender. It is a string provided by the Mender UI. If using an open-source Mender server, leave this blank or unset.MENDER_CLIENT_UPDATE_POLL_INTERVAL
– The interval in seconds between update checks. Short intervals like a couple of minutes or hours mean the device will receive updates quickly but use more network/power. Longer intervals conserve resources. Recommended default for production use is once per day.MENDER_CLIENT_INVENTORY_REFRESH_INTERVAL
– The Interval in seconds between inventory reports. You can adjust this based on how frequently you want the device to report its information. Omitting it or leaving the default uses a sensible value, e.g., every few days. Considering the inventory data is static in most cases (device ID, MAC address) it is recommended to send it to the server once every few days (the recommended default for production is 14 days).MENDER_DEVICE_TYPE
– The device type string reported by the client. By default, this is derived from Zephyr's board name at build time. For example, if you build for esp32s3_devkitc/esp32s3/procpu
, the device will report esp32s3_devkitc
as its type. This must match the device type specified in your Mender Artifacts as Mender ensures compatibility with the board and the software being deployed. It's recommended to leave this as the default unless you have a specific reason to override it.MENDER_LOG_LEVEL_DBG
, MENDER_LOG_LEVEL_INF
, etc. – These control the log level of the Mender client's internal logging. Only one of these should be set to y: e.g., MENDER_LOG_LEVEL_INF
for informational logs or MENDER_LOG_LEVEL_DBG
for debug logs which is very verbose. If none is set, a default will be used. In development, DBG
is helpful; in production, INF
or even higher (WARN
) might be preferred to reduce log noise.To view all available options with descriptions, run west build -t menuconfig
and navigate to Modules → mender-mcu. Each option has help text explaining its purpose. Generally, the defaults are sane for a basic setup such as pointing to a hosted Mender server, but when using hosted Mender or Mender Enterprise on-premises you must at minimum set the Tenant token. For an on-premise installation you need to set the Server URL.
At runtime, the MCU client does not use a traditional configuration file, but there are a few variables/values determined at runtime that you should be aware of:
In summary, most of the "variables" for Mender on microcontrollers are either compiled in or maintained by the client internally. Unlike Linux, you won't edit config files at runtime. Still, you should design your firmware to supply the needed data, mainly identity/inventory, and handle dynamic conditions like network up/down via the callback system. Once the device is running, any changes to its configuration such as pointing to a different server or changing poll intervals would require building and flashing a new firmware with the new settings. This can be done via Mender as an update.
© 2025 Northern.tech AS