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

Mesh: set Message Destination Address

hi,

How can i set Destination Address to a particular Mesh Node. so that all message reach that particular Node Only.Since provisioner can set address while provisioning process. 

reply is appreciated. .

Parents
  • You can use the unicast address to send a message from one node to an element in another node. During provisioning, each element in a node is assigned a unicast address. When you then send a message via the unicast address, only the element with that particular unicast address will read the message.

    For example, in the light switch example in the newest mesh sdk v2.0.1, when you test this example with three boards (one provisioner, one client & one server), when you press button 2 on the client board, this refers to case 1 in button_event_handler() function in main.c in the client example. This then calls the simple_on_off_client_set() function, which then sends a message through the send_reliable_message() function.

    In the server board, this unicast message gets picked up in the mesh_msg_handle() function inside access.c of the light switch server example. The handle_incoming() function then handles the unicast message to turn the LED on the server board on & off.

Reply
  • You can use the unicast address to send a message from one node to an element in another node. During provisioning, each element in a node is assigned a unicast address. When you then send a message via the unicast address, only the element with that particular unicast address will read the message.

    For example, in the light switch example in the newest mesh sdk v2.0.1, when you test this example with three boards (one provisioner, one client & one server), when you press button 2 on the client board, this refers to case 1 in button_event_handler() function in main.c in the client example. This then calls the simple_on_off_client_set() function, which then sends a message through the send_reliable_message() function.

    In the server board, this unicast message gets picked up in the mesh_msg_handle() function inside access.c of the light switch server example. The handle_incoming() function then handles the unicast message to turn the LED on the server board on & off.

Children
Related