I'm working with simple_message_model using light switch example from Mesh SDK v2.0.1, I have 4 boards nRF5832, 1 client, 1 provisioner, 1 relay node and 1 server which have the ble_nus project combined with my message model. The communication between client and server works fine but when I add relay node which is a server that have a relay functionality enabled, it doesn't relay my messages, I tried lowering the TX power of all the devices but it appears that the range is smaller and communication won't happen between the nodes, I ve looked into the network.c file and found that should_relay() function is responsible of whether relaying or not the packet, there is a condition that It should relay to a non unicast address, which is not my case, I want to relay it to my server which have a unicast address so I changed that condition, and still won't relaying, I don't know why ? is it because I'm sending string messages? Or something related with addresses and how they are assigned by provisioner (in order) because in my case they are not, I have relay node having 0x0107 address and server node with 2 elements assigned with these addresses 0x105 and 0x106.
Any help please, it would be greatly appreciated.
All examples in our Mesh SDK has relay role by default. How did you disable the role ?
Could you try to test and verify the issue with the light switch example in the SDK ? You can have 1 light switch client, 2 servers. And one of the server should act as a relay to forward the command from the client to the other server.
What you send in your payload shouldn't affect the package relaying. Packet to an unicast address should get relayed as well.
I didn't disable relay role on devices, they all have m_relay_enable set to true, I placed server node in a different room and so far from client node and put relay node in between, I don't know if the packet is relayed by this node, there is no log showing, the communication still happen between the server and client even without the relay node, so I tried to lower the TX power of the devices from 0 dBm to NEG16dBm and the range is smaller but still won't relaying, I will test with the light switch example and see if it works.
Are you sure when you set the TX power to neg16, the relay node is reachable from the other two nodes ?
My suggestion for you to test is to leave 1 node still, then move the other node until you don't receive any packet from the first node. Then you put the relay node in the middle between 2 nodes. The communication should be restored again.
I did what you said and it works now with my message model too.
Thank you so much
Could you please share me your three source and compiled hex files for respective nodes,so that it can be helpful for me also.
Thanks in advance.
Hi hung bui
i want to do the same thing ,i am using three boards latest version 3.1 , 1 client and two server . i want to get the message from client to server using relay node . my server is far away from client . i have used the mesh app for provisioning nodes but i am not getting the message from relay node to server . why?
i hope you , you will help me
Thanks in advance