Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

105, Mesh assert at 0x00032118

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

Parents
  • Hi, 

    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.

    Does it cause by NRF_MESH_ASSERT(p_file != NULL && p_file->p_backend_data != NULL); or NRF_MESH_ASSERT(size_guard <= UINT16_MAX);? Please check the veriables are meet the condifions. 

    You also could use addr2line tool to find which line of code match with location 0x00032118. See this post

    -Amanda

  • After running the tool, the error occurs at mesh_config_backend.c:74. 

    That means its within this function  which I find it surprising because when executing line by line, it didn't even cause any errors here. 

    just for reference (correct me if I'm wrong), using cmd, I went to the directory containing the .elf file and ran using the command, "addr2line -e file.elf 0x00032118" to get the results.

Reply
  • After running the tool, the error occurs at mesh_config_backend.c:74. 

    That means its within this function  which I find it surprising because when executing line by line, it didn't even cause any errors here. 

    just for reference (correct me if I'm wrong), using cmd, I went to the directory containing the .elf file and ran using the command, "addr2line -e file.elf 0x00032118" to get the results.

Children
Related