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

How to use the provisioner to configure provisionee?

Hi,

I'm trying to test the BLE Mesh example. I want to prove that whether the feature of Relay is able to work or not. So, I use the functionality of heartbeat publishing to test it. At first, the first provisioning is finished, the provisionee begins publishing the Heartbeat state to the provisioner. I can also use the command "config_client_relay_get" and "config_client_relay_set" to get and set the parameter. Upon the second provisioning finished, the previous provisionees can't receive any commands. I also found why it can't send the command to the specific address.

In the config_client.c

static config_client_t m_client;

static uint32_t send_reliable(config_opcode_t opcode, uint16_t length, config_opcode_t reply_opcode)
{

    access_reliable_t reliable;
    reliable.model_handle = m_client.model_handle;

...

}

I got some questions as below.

1.How to enable the provisionee to re-start publishing the Heartbeat state to provisioner?

2.How to send the command listed in the "opcode_handlers" array to any provisioned device?

Parents Reply
  • With regard to this problem, I've found that there are three steps are necessary.

    1. Reconfigure the handle of device and address according to the specific address for communicating with provisionee.

    node_addr.value = uni_addr;
    node_addr.type = NRF_MESH_ADDRESS_TYPE_UNICAST;
    ERROR_CHECK(dsm_address_handle_get(&node_addr, &addr_hdl));
    ERROR_CHECK(dsm_devkey_handle_get(uni_addr, &dvc_hdl));
    ERROR_CHECK(config_client_server_set(dvc_hdl, addr_hdl));

    2.Refer to the following codes locate at node_setup.c to enable the functionality of heartbeat publication.

    pubstate.model_id.company_id = ACCESS_COMPANY_ID_NONE;
    pubstate.model_id.model_id = HEALTH_SERVER_MODEL_ID;
    retry_on_fail(config_client_model_publication_set(&pubstate));

    3.Send the command "config_client_relay_set" to enable or disable the functionality of relay.

Children
Related