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

How to refer to device id in mesh?

Hi All, I am using light_control example from Mesh SDK and I need to get something that identify my device in mesh e.g id, address. I would like to send some message to the specific node. Do you have any idea how to do it?

Regards, Butu

Parents
  • Hi Butu,

    You can print out the unique address of the node using dsm_local_unicast_addresses_get() call.

    dsm_local_unicast_address_t address;
    dsm_local_unicast_addresses_get(&address);
    

    You will have a list of address, for your elements on the node, start from address.address_start and have address.count addresses (count = 1 if you only have one element).

    You should call this after you have your device configured, suggest to call inside configuration_complete()

Reply
  • Hi Butu,

    You can print out the unique address of the node using dsm_local_unicast_addresses_get() call.

    dsm_local_unicast_address_t address;
    dsm_local_unicast_addresses_get(&address);
    

    You will have a list of address, for your elements on the node, start from address.address_start and have address.count addresses (count = 1 if you only have one element).

    You should call this after you have your device configured, suggest to call inside configuration_complete()

Children
Related