SDK Version : Mesh 4.0 & SDK_16.0
Software : Segger Embedded Studio
Hardware : 2 PCA10040 devices as a client and a server
System : Windows 7
Hi,
I want to send a string from client to server.Can you please help me for the same
SDK Version : Mesh 4.0 & SDK_16.0
Software : Segger Embedded Studio
Hardware : 2 PCA10040 devices as a client and a server
System : Windows 7
Hi,
I want to send a string from client to server.Can you please help me for the same
Hi,
I suggest you have a look at the following threads:
https://devzone.nordicsemi.com/f/nordic-q-a/46092/send-string-in-a-mesh-with-nrf52dk
https://devzone.nordicsemi.com/f/nordic-q-a/29836/send-and-receive-a-string-via-access-layer (This post includes a custom simple_message model example that will let you send a string over the mesh network. It is made for Mesh SDK v1.0.0 but I suggest you to use the example application as a reference/guidance on how you can make a custom model for Mesh SDK 4.0.0, that let you send a string. )
https://devzone.nordicsemi.com/f/nordic-q-a/31256/receiving-simple-message-mesh
There are many similar threads on Devzone discussing this already, I recommend you try to search around a bit if you have further questions regarding this.
Hi Mttrinh,
Thanks for the reply.
I have gone through the threads suggested by you and I could send the string from client side but still not understanding how to print it in server side ???
I receive the 0 status after "access_model_publish" in client which means string is sent successfully.
Please help
Because I can understand that "mesh_msg_handle" in access.c is receiving the message and printing it.
But I am not understanding when to call this function.
You should be calling that function inside the mesh event callback(mesh_evt_cb), whenever you receive the NRF_MESH_EVT_MESSAGE_RECEIVED event. Take a look at the third thread I sent you.
Hi that thing I understood,but what changes I need to do in main.c of server? because if I am running server code as it is,I am not receiving the string I am sending