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

Multiple similar elements - Mesh

Hello, 

I'm working with : 

- nRF mesh SDK 2.1.1

- light_switch_proxy_server 

- I implemented the generic model on / off

I work with a module (server) that has two states: state of the button (on / off) and the state of a relay (on / off).

If I use the generic model On / Off, how is it possible to manage the use of the same model twice? Do the elements have an address?

When handle_set_unreliable_cb() is called can I know which instance of the corresponding onoff model ?

Thank you very much 

Parents
  • Hi Nabil, 

    According to the spec, you can't have two same model on one element. In your case you need to locate them on different elements (still on same device).

    Each element will have its own address and works as independent mesh node. 

    When you receive a call back in the client model, you will have the model handle in the call back. Checking that you would know which model (on which element) is targeted. 

  • hi #hung_bui,I am not understanding what the function of model_handle is? Because according to the spec, based on the address in the received packet, the node was able to determine which packet the packet was destined for, and then relied on the opcode in the packet to determine which model was in the given element will handle the packet. So, I think no model_handle is needed.

Reply Children
Related