Hi all,
I am using nRF SDK for Mesh v1.0.1 and I want to implement following as in picture:
I am publishing to group address (group address because in the future I want to use more nodes with simple OnOff server model). I send the message from the OnOff client to the OnOff server, the light switch turns on. But I am not receiving message after publishing to that group address (I didnt change code for switch server and from the simple_on_off_server.c I can see that after receiving SIMPLE_ON_OFF_OPCODE_SET_UNRELIABLE the callback function responds with publish_state() to the address set as publish address for that simple OnOff server model - and that is set by provisioner). In nrf connect app I can see, that the message is sent from the OnOff server model, but not received by simple OnOff client model. First I thought that I set the bad Publish address for OnOff server model (set to PROVISIONER ADDRESS + 1 - in nrf_mesh_config_app.h set the right count of models[3] and elements[2 for light switch client example]) but I dont think that this is the issue. I enclose key parts of code:
SERVER_COUNT set to 1, because I provision only 1 element
key functions from main.c:
SERVER_COUNT set to 1 because I want to provision only one element
access_setu() function and all the necessary configuring for OnOff client model:
from provisioner.c:
the handler prov_evt_handler() completed fine
I went through this steps by incrementing ->
static const config_steps_t server_config[]=
{
PROV_STATE_CONFIG_COMPOSITION_GET,
PROV_STATE_CONFIG_APPKEY_ADD,
PROV_STATE_CONFIG_APPKEY_BIND_HEALTH,
PROV_STATE_CONFIG_APPKEY_BIND_ONOFF,
PROV_STATE_CONFIG_PUBLICATION_HEALTH,
PROV_STATE_CONFIG_PUBLICATION_ONOFF,
PROV_STATE_CONFIG_SUBSCRIPTION,
};
i include where i have doubts:
What am I missing? Something to change in mesh_config_app.h or what? Thankful for each one answer.
Patrik