About set up group address?

I encountered a problem in configuring the general switch model. I want to configure the group address at the beginning. I set the dsm_address_publish_add() and  access_model_publish_address_set(), but I can't get access_model_publish_application_set()  Parameter publish_appkey_handle, is my configuration correct? How to publish_ appkey_ Handle, it seems that the group address can only be set manually from the app.

nrf_mesh_address_t publish_address_stored;
dsm_handle_t publish_address_handle = DSM_HANDLE_INVALID;
uint16_t publish_address = 0xc000;
dsm_address_publish_add(publish_address,&publish_address_handle);
dsm_address_get(publish_address_handle, &publish_address_stored);
access_model_publish_address_set(p_server->model_handle,publish_address_handle);
const config_publication_params_t * p_pubstate;
dsm_handle_t publish_appkey_handle = dsm_appkey_index_to_appkey_handle(p_pubstate->appkey_index);
access_model_publish_application_set(p_server->model_handle, publish_appkey_handle);

The following is a photo of the mobile phone configuration group address:

Parents Reply Children
No Data
Related