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

sending message from client to specific server

Hi All, 

I am using the light switch example and have modified it a bit to send packets of data. 
I am able to send data from the client to group address, by setting the publication address of the client to 0xCAFE (using the nrf mesh app)and the message is recieved by the servers.
But if i set the publication address of the client to the unicast address of one of my servers (0x0001), I am not receiving any message.

Please advice if this is the correct way to send message to only one server?

Thanks, 

Nishant

  • Hello,

    Does it work if you use the unmodified light_switch examples (server + client)? I tested it here, and it seems to work, so I just want to check if the issue is related to the publication/subscription setup or the model setup.

  • Hi Edvin, 

    Yes it did work on the light switch unmodified example. 

  • How do you provision your devices? Try to use the nRF Mesh app for mobile, and set the clien't publish adress equal to the address of the nRF5x Mesh Light (in the screenshots below, that would be 0001, but it may vary depending on what order you provision the devices).

    So, try to flash both devices with their respective examples. Then provision both. Enter the "nRF5x Mesh Light", and set the subscription address to a group address, e.g. C001. Then go to the "nRF5x Mesh Switch", and set the first generic OnOff Client to publish to this address, C001. Check that this works first. You should be able to press button 0 and 1 (1 and 2) on the DK of the Client to turn on and off the LED on the server. If that works, then try to set the second "Generic OnOff Client" to publish to "nRF5x Mesh Light"s unicast address (0001 in the screenshot). Does that work?

  • I have tried something very similar to this. 

    Using my modified version. I provision the client using nRFMesh, I then provision the server. 
    Using nRFMesh, I set app keys on both client and server, and I set the publication address on the client to 0x0002. I try to send a message accross, it is not recieved.

    I then set the publication address on the client to 0xCAFE, and set teh subscription address on the server to 0xCAFE the server is then able to recieve messages from the client. 

  • Edvin said:
    Does it work if you use the unmodified light_switch examples (server + client)? I tested it here, and it seems to work, so I just want to check if the issue is related to the publication/subscription setup or the model setup.

     It should work, but it would be nice to know whether the problem is related to your implementation or the way that you set up the configuration. This is why I would like you to test on the unmodified light switch example. You can just unzip an unmodified version of the SDK for mesh to test this.

Related