nRF Machine Learning: Application-specific Kconfig options

The nRF Machine Learning introduces Kconfig options that you can use to simplify the application configuration. The application introduces configuration options related specifically to its modules and data providers.

Configurations for modules

The nRF Machine Learning application is modular and event driven. You can enable and configure the modules separately for the selected board and build type. See the documentation page of the selected module for information about the functionalities provided by the module and its configuration. See nRF Machine Learning: Internal modules for a list of modules available in the application.

Advertising configuration

If the given build type enables Bluetooth, the CAF: Bluetooth LE advertising module is used to control the Bluetooth advertising. The data providers used by the nRF Machine Learning application are configured using the src/util/Kconfig file. The nRF Machine Learning application configures the data providers in src/util/Kconfig. By default, the application enables a set of data providers available in the nRF Connect SDK and adds a custom provider that appends UUID128 of Nordic UART Service (NUS) to the scan response data if the NUS is enabled in the configuration and the Bluetooth local identity in use has no bond.

Following are the application-specific configuration options that you can configure for the nRF Machine Learning and the modules:

CONFIG_ML_APP_SENSOR_EVENT_DESCR

(string) Description of handled sensor event

The application handles sensor events with predefined description. Other sensor events are ignored.

CONFIG_ML_APP_EVENT_PROXY

(bool) Event proxy module

Enable and initialize event manager proxy subsystem on application start. Subscription to events is done based on configuration file.

CONFIG_ML_APP_REMOTE_CORE_INITIALIZATION_TIMEOUT

(int) Remote core initialization timeout [ms]

The time to wait for remote cores to report its readiness. The time is given in milliseconds.

CONFIG_ML_APP_SENSOR_STUB_GEN

(bool) Sensor stub data generator

None

CONFIG_ML_APP_SENSOR_STUB_GEN_TRIG_TIMEOUT_MS

(int) Wave signal change timeout [ms]

The timeout triggers selecting next simulated wave signal.

CONFIG_ML_APP_EI_DATA_FORWARDER_EVENTS

(bool) Enable EI data forwarder events

None

CONFIG_ML_APP_INIT_LOG_EI_DATA_FORWARDER_EVENTS

(bool) Log EI data forwarder events

None

CONFIG_ML_APP_ML_RESULT_EVENTS

(bool) Enable machine learning result events

None

CONFIG_ML_APP_INIT_LOG_ML_RESULT_EVENTS

(bool) Log machine learning result events

None

CONFIG_ML_APP_MODE_EVENTS

(bool) Enable machine learning mode events

None

CONFIG_ML_APP_INIT_LOG_ML_APP_MODE_EVENTS

(bool) Log machine learning mode events

None

CONFIG_ML_APP_SENSOR_SIM_EVENTS

(bool) Enable simulated sensor events

None

CONFIG_ML_APP_INIT_LOG_SENSOR_SIM_EVENTS

(bool) Log simulated sensor events

None

CONFIG_ML_APP_DATA_AGGREGATOR_RELEASE

(bool) Data aggregator buffer automatic release

The module registers as a last listener for data aggregator event and automatically request the buffer release.

CONFIG_ML_APP_EI_DATA_FORWARDER

(bool) Edge Impulse data forwarder

None

CONFIG_ML_APP_EI_DATA_FORWARDER_UART

(bool) UART

None

CONFIG_ML_APP_EI_DATA_FORWARDER_BT_NUS

(bool) Nordic UART Service (NUS)

None

CONFIG_ML_APP_EI_DATA_FORWARDER_SENSOR_EVENT_DESCR

(string) Description of forwarded sensor event

The module forwards data related to sensor events with predefined description. Other sensor events are ignored.

CONFIG_ML_APP_EI_DATA_FORWARDER_BUF_SIZE

(int) Data buffer size

Size of the buffer used to temporarily store forwarded data. The buffer must be big enough to store a single line of forwarded data.

CONFIG_ML_APP_EI_DATA_FORWARDER_PIPELINE_COUNT

(int) Number of samples pipelined in the Bluetooth stack

Number of sensor samples pipelined in the Bluetooth stack. Pipelining samples in the Bluetooth stack reduces latency related to delivering subsequent sensor samples to the stack.

CONFIG_ML_APP_EI_DATA_FORWARDER_BUF_COUNT

(int) Data buffer count

Up to CONFIG_ML_APP_EI_DATA_FORWARDER_PIPELINE_COUNT sensor samples are pipelined in the Bluetooth stack. In case the pipeline is full, additional samples are buffered by the application module. This Kconfig option specifies number of sensor samples temporarily stored by the application module.

CONFIG_ML_APP_LED_STATE

(bool) LED state

None

CONFIG_ML_APP_LED_STATE_ANOMALY_THRESH

(int) Anomaly threshold [in 0.001 units]

If anomaly value reported by the machine learning model is greater than the defined anomaly threshold, the result is marked as anomaly and label assigned by the model is ignored.

CONFIG_ML_APP_LED_STATE_VALUE_THRESH

(int) Value threshold [in 0.001 units]

If value reported by the machine learning model is smaller than the defined threshold, the result is ignored.

CONFIG_ML_APP_LED_STATE_PREDICTION_STREAK_THRESH

(int) Number of subsequent predictions required to report result

LED state module displays result reported by the machine learning model if the same label is observed for the predefined number of times in a row.

CONFIG_ML_APP_MODE

(bool) Machine learning application mode

None

CONFIG_ML_APP_MODE_CONTROL_BUTTON_ID

(hex) Key ID of button used to control machine learning state

None

CONFIG_ML_APP_ML_RUNNER

(bool) Machine learning model runner

None

CONFIG_ML_APP_ML_RUNNER_SENSOR_EVENT_DESCR

(string) Description of handled sensor event

The module handles data related to sensor events with predefined description. Other sensor events are ignored.

CONFIG_ML_APP_ML_RUNNER_WINDOW_SHIFT

(int) Prediction window shift [windows]

Number of windows the prediction window is shifted between predictions.

CONFIG_ML_APP_ML_RUNNER_FRAME_SHIFT

(int) Prediction window shift [frames]

Number of frames the prediction window is shifted between predictions.

CONFIG_ML_APP_USB_STATE

(bool) USB module

Enable USB subsystem on application start.

CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT

(unknown)

Leave USB device initialization to the USB module.

CONFIG_ML_APP_SENSOR_SIM_CTRL

(bool) Simulated sensor controller

None

CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_TIMEOUT

(bool) Timeout

None

CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_BUTTON

(bool) Button press

None

CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_TIMEOUT_MS

(int) Wave signal change timeout [ms]

The timeout triggers selecting next simulated wave signal.

CONFIG_ML_APP_SENSOR_SIM_CTRL_TRIG_BUTTON_ID

(hex) ID of button used to change wave signal

Pressing the button triggers selecting next simulated wave signal.

CONFIG_ML_APP_EI_RESULT_NSMS

(bool) Enable ML result via NSMS

Enable instance of Nordic Status Message Service carrying result of gesture recognition.

CONFIG_ML_APP_EI_RESULT_SECURITY_LEVEL_NONE

(bool) None

None

CONFIG_ML_APP_EI_RESULT_SECURITY_LEVEL_ENCRYPT

(bool) Encryption

None

CONFIG_ML_APP_EI_RESULT_SECURITY_LEVEL_AUTHEN

(bool) Authentication

None

CONFIG_ML_APP_EI_RESULT_SECURITY_LEVEL

(int)

None

CONFIG_APP_SENSOR_SLEEP_TO

(int) Sensor default time in seconds before sensor goes to sleep

The number of seconds of inactivity before sensor goes into sleep mode. This configuration is used only for physical sensors that have triggers configured. It is ignored for simulated sensors.

CONFIG_BT_ADV_PROV_FLAGS

(unknown)

None

CONFIG_BT_ADV_PROV_DEVICE_NAME

(unknown)

None

CONFIG_ML_APP_ADV_PROV_UUID128_ALL

(bool) UUID128 advertising provider

Adds UUID128 of Nordic UART Service (NUS) to the scan response data if used Bluetooth local identity has no bond.