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

How to use "Any Node (Destination)Address" to send data?

Hi Nordic Team,
I am currently working on how to build one mesh provisioner. 
Current Env: Nrf_sdk: 17.0, Mesh SDK: 5.0, Board Chip: nrf52832
My Questions is how to use any node address to send data.
If one mesh node had been provisioned by Phone, and i only have know its node address, how do i control it with my nrf52832's mesh provisioner?
For example, if we conrtol its "ONOFF", i will follow your example as this.(generic_onoff_client_set(&m_clients[0], &set_params, NULL);)
But i dont have node's handle, how do i exchange the dst addr to model_handle? (node addr  --> /** Model handle assigned to this instance */ access_model_handle_t model_handle; ???)

(Questions 2:  As i know, if i want to control node's configuration server, i need to add the devkey into my provisioner, it that right? can you help to list how to control one node(not provisioned by current provisioner)) 

Thanks for Nordic Team
BR,
TimCheng.

  • If you want to send data to one node at a time, B and then C for example. You first set the publication address to B. Send the packet. After that you set the publication address to C , then you send the new packet. 

    Yes, it is correct image. but after test,

    1, set B into publish_address_handle, (Ok, and node address is ok)

    2, set C into publish_address_handle,(Ok, and node address is ok, because B and C are new address)

    3, when trying to switch the C to B, it preforms wrong (Wrong, Still C,  because B is existed. it will not set)

    Anyway, i make some changes for exchanging the node address into  publish_address_handle. and not store these publish_address_handle for fitting my application. 

    (After view Nordic DevZone, there are some engineers confused about this handle,it is big different from other platforms)

  • I'm not sure which function you are calling at step 1 2 and 3.

    You can to store the address handle you have and reuse later. If you don't store it and want to get it back from the list, you call dsm_address_handle_get() to get the handle from the address. 
    Think of the DSM as a database of addresses that's stored on the flash. All library uses the handles in DSM instead of directly use the address. 

Related