This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Mesh status_handle() payload addition

Hi, i am trying to add additional payload to the Mesh Light Switch example. However, i modified all structs and it came down to the status_handle() function inside generic_onoff_client.c.

in_data.present_on_off = p_msg_params_packed->present_on_off
in_data.test_value = p_msg_params_packed->test_value;

The additional payload gets send and i can read it. But somehow i am missing to where the data input for status_handle() is set. Right now i am getting a random value for test_value. If i assign test_value the same value as present_on_off it has the correct value. Could you give me a hint to where i can / have to manipulate the data that gets handled by status_handle()? I am using the newest Mesh SDK.

Thanks in advance.

Parents
  • Have you modified both the structures, `generic_onoff_status_params_t` and `generic_onoff_status_msg_pkt_t` correctly with additional data variable that you need? Also check if this additional variable is set correctly in the `status_send()` function in the server module code.

    If you want to modify generic models, change the model ID of the model to the vendor specific model ID before using them in your end product.

Reply
  • Have you modified both the structures, `generic_onoff_status_params_t` and `generic_onoff_status_msg_pkt_t` correctly with additional data variable that you need? Also check if this additional variable is set correctly in the `status_send()` function in the server module code.

    If you want to modify generic models, change the model ID of the model to the vendor specific model ID before using them in your end product.

Children
No Data
Related