Hi team,
I'm currently playing around with the sensor server example where I wanted to include the generic_onoff model in a separate element. I wanted to learn how to add models when I use it to develop. The examples both work separately with no issues at all. But problems occur before I can even run a trial.
The problem occurs when I add the necessary header files within a folder I created. Keep in mind, I add the header files in the preprocessor to avoid any issues.

Initially, by adding the header files, you don't get an issue. Building the code - no errors. Flashing onto the device - mesh initiates properly. However, to re-create the issue:
1) add generic_onoff_server.c and generic_onoff_mc.c onto folder within sensor server.
2) Add any #define on main.c or any integer types.
After this, building it shouldn't cause any issue. Only after flashing the firmware onto the device, does the device become undiscoverable and show the error shown below.

When debugging line by line, it fails at mesh_config_backend_init() inside mesh_config_backend.c at the for loop (line 102) shown below.

If there is a fix to this, please let me know. All in all, I am just trying to learn how to add models and functionality such as sending sensor data as well as turning an LED on. There are no documents related to this for SDK 4.2.0. but there are documents for "Creating new models" in SDK for Mesh v1.0.1. Is this still valid to follow? If not, would you please provide a source to learn?
Thanks,
Christian
which I find it surprising because when executing line by line, it didn't even cause any errors here.