Components#

To add a new software component, for example a new model, in Bluetooth Mesh SDK v1.x the user must:

  1. Copy the corresponding SDK files from the SDK folder into the project folder.

  2. Copy all the dependencies of the given component into the project folder.

  3. Add new include directories to the project settings.

    And additionally:

  4. Write the initialization code manually in the application.

  5. Configure the component manually in the config files.

  6. Use the API of the component in the application.

This is quite a cumbersome process, especially when figuring out the dependencies between components.

In Bluetooth Mesh SDK v2.x software components can be added easily by installing them from the Component Library. The installation process will automatically execute the first three steps listed above, and it also modifies the corresponding auto-generated files to integrate the component into the application (“glue logic”).

Additionally, the Component Configurator provides the possibility of:

  1. Adding an “init” type component that initializes the software component

  2. Configuring the component with a GUI

Some software components (like OTA DFU) will fully integrate into the application to perform a specific task without the need of any additional code, while other components provide an API to be used in the application. The only task left for the developer is to use the API of those component in the application.

It is important to note that in Bluetooth Mesh SDK v2.x the Bluetooth Mesh stack itself is also just a collection of software components that can be added to and removed from the project.

When migrating a project into Bluetooth Mesh SDK v2.x, start by finding out which functionality can be provided by installing a software component from the Component Library. Although this means you must become familiar with the software components first, it will save time later. Generally speaking, if you would have copied an additional SDK file into your project, you will probably find a software component that solves the integration of that file.

To see the component library, click the <project-name>.slcp tab of your project, and click Software Components. A number of filters as well as a keyword search are available to help you explore the various component categories. Note that components for all installed SDKs are presented.

Explore the various component categoriesExplore the various component categories