Mesh dimming example client with generic_level_server element integrated to receive mesh messages

I am using the SDK v17 with the Mesh SDK v5 and the nRF52 development kits and I'm using SEGGER. 

SETUP:

I have a mesh network with:

1 dimming client

1 dimming server

2 dimming client/server

Description:

I have integrated the generic level server into my 2 clients so that the 2 clients can send and receive messages to each other as well as receive messages from the dimming client. I have the 1 client that sends dimming levels to the 1 dimming server and the 2 dimming client/servers to control the dimming as well but they have a motion sensor on board so that they can dim the LEDs up and down when motion is sensed and when it is not. The 1 dimming server is simply dimming an LED based on the messages sent to it from the 2 dimming client/servers and the 1 dimming client they are provisioned to publish to all nodes.

The Issue:

Everything is working well but the issue that I am seeing is that on each of the 2 dimming client/servers they are receiving their own messages into the generic_level_server.c inside of static void handle_set(access_model_handle_t model_handle, const access_message_rx_t * p_rx_msg, void * p_args). They are also receiving each others messages there, which is what I want. I believe that they are receiving their own messages or that maybe this function being called somewhere. 

Goal:

To allow the 2 dimming level client/servers to be able to send messages to each other without going into void_handle_set when they themselves send a message out and to only go into this function when they receive a message.  

Is there a way to prevent this from happening with every message that is sent and are the dimming client/servers in fact, immediately receiving their own messages that they are sending out?

Furthermore, do I need to create separate client and server elements so that the 2 client/servers can send/receive messages to each other and then use the generic level client and generic level server element to receive the messages to the 1 dimming client and send messages to the 1 dimming server?


Thank you

Parents
  • Amanda, 

    Thank you the groups are working well. Although, if I do subscribe a dimming server to a specific address then will this dimming server still send the dimming level message through the entire mesh or will it only relay the dimming level through to its subscribed groups? I assume it is the latter.

    For example, if I had two of the same groups each made up of dimming servers but they were far enough apart that group 1s radios could not reach group 2s, but there were other dimming servers subscribed to different groups in between. Would the message from group 1 be passed through the other dimming servers that were not part of these groups so that the message could reach the other group 2?

    Thank you

Reply
  • Amanda, 

    Thank you the groups are working well. Although, if I do subscribe a dimming server to a specific address then will this dimming server still send the dimming level message through the entire mesh or will it only relay the dimming level through to its subscribed groups? I assume it is the latter.

    For example, if I had two of the same groups each made up of dimming servers but they were far enough apart that group 1s radios could not reach group 2s, but there were other dimming servers subscribed to different groups in between. Would the message from group 1 be passed through the other dimming servers that were not part of these groups so that the message could reach the other group 2?

    Thank you

Children
Related