triggering model reset handler

Hi, 

I have implemented a set of custom mesh models on nCS. In vendor models we have reset handlers, as in nrf documentation: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrf/ug_bt_mesh_vendor_model_dev_overview.html#:~:text=The%20model%20reset%20handler%20is%20called%20when%20the%20mesh%20node%20is%20reset

I have two questions here:

  1. What are the guidelines to write reset handlers, I mean what should they do..?
  2. How do I trigger reset handlers to test..? I do not know how a node is reset, hence kindly suggest how to trigger reset handler.

Thanks,

Parents
  • Hi,

    I will consult with some of my colleagues early next week regarding your questions, but in the meanwhile could you elaborate a bit about your questions for me:

    What are the guidelines to write reset handlers, I mean what should they do..?

    Correct me if I am wrong, but from the documentation you just linked I would think the reset handler should do the following: "The model reset handler is called when the mesh node is reset. All of the model’s configuration is deleted on reset, and the model should clear its state. If the model stores any persistent data, this needs to be erased manually", 

    How do I trigger reset handlers to test..? I do not know how a node is reset, hence kindly suggest how to trigger reset handler.

    You could try to call this function to reset the node: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/mesh/cfg_cli.html?highlight=node%20reset#c.bt_mesh_cfg_node_reset

    Let me know if any of this helps, and please feel free to add more information regarding your ticket!

    Kind regards,
    Andreas

  • Hello,

    "The model reset handler is called when the mesh node is reset. All of the model’s configuration is deleted on reset, and the model should clear its state. If the model stores any persistent data, this needs to be erased manually",

    Noted on this.

    You could try to call this function to reset the node:

    I need to know where do we call this function from..?

    As an opcode callback..?

    Because I believe nrf mesh app provides reset button to each model, which triggers a model reset API.

    So, i would want to know the standard way of resetting the model. I mean where in code to call the reset callback..?

    Thanks,

Reply
  • Hello,

    "The model reset handler is called when the mesh node is reset. All of the model’s configuration is deleted on reset, and the model should clear its state. If the model stores any persistent data, this needs to be erased manually",

    Noted on this.

    You could try to call this function to reset the node:

    I need to know where do we call this function from..?

    As an opcode callback..?

    Because I believe nrf mesh app provides reset button to each model, which triggers a model reset API.

    So, i would want to know the standard way of resetting the model. I mean where in code to call the reset callback..?

    Thanks,

Children
No Data
Related