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

Receiving simple message mesh

Hi, 

I followed this thread (Link) to implement a simple message model on the light switch example from nRF SDK for Mesh v1.0.1. I created a "send_simple_message" function with all the given code that i call in a function called when a button is pushed on the client.

It seems the message is sent since i receive a "0" status after "access_model_publish". From the server, the led still change its state when i push the button; but i don't know how to read the message (and how to receive it).

Do i have to use the "simple_message_init" function and the others functions defined in the model, how to and when ?
Has somebody implemented the simple message model and could help me?

Thanks.

Parents
  • Hi,

    If you take a look at the mesh light switch example in the mesh sdk v1.0.1 inside the main.c file, you can see the nrf_mesh_node_config() function call at the bottom of the int main(void) function. Going to the definition of the nrf_mesh_node_config() file, the access layer gets initialized inside the access_init() function. Inside the access_init() function, there is a line: 

    m_evt_handler.evt_cb = mesh_evt_cb;

    Going to the definition of mesh_evt_cb, you can see that whenever the NRF_MESH_EVT_MESSAGE_RECEIVED event occurs, the mesh_msg_handle() function gets called. It seems that this mesh_msg_handle() function, which is defined in access.c, handles the incoming mesh messages on the server side. This is defined similarly on the client side too (can be checked by looking at the client mesh example). The mesh simple model is given in the link you provided, so that should work correctly.

    What exactly is not working in the link you provided. Is it the provisioning or is it something else?

     

     

  • I want after recieving the simple_message by a server to transmit it through UART to PC, how can i do that please?

  • If this is related to your other question Arij, we can continue the conversation there.

Reply Children
  • HI,

    i am able to receive simple_message_OPCODE_SEND but not the message .how to read the message in server node

  • Hi, I would not recommend using this mesh sdk anymore, as it is quite outdated & the stack is not bluetooth mesh certified. I would download the newest mesh sdk & really understand the light switch example there. In addition, this documentation could be helpful.

  • Hello,

            As nordic has implemented sdk for mesh and i have been using mesh sdk v3.0.0  LIGHT_SWITCH_EXAMPLE  but i am facing some problem regarding pa_lna. Actually wt i have done is i send a data and it has to be relayed to particular device so that among many devices in a group it can reach to speicific device and it was implemented successfully but here while i need to receive the advertising packets from different devices it is showing more RSSI .here i am using nrf52832  developed with separate ble boards with different gpio's .so as mentioned by nordic semi related to pa_lna ,the pins were used as 24 and 25 but we are using different gpio's according to our boards.so here we are facing problems that when ever the data is advertising it is showing more RSSI and when ever command/data has been send from client to specific server then suddenly the RSSI shows less .

    softdevice S132 and mesh sdk v3.0.0

    windows using keil

    so i am expecting that both pa_lna has to switch its role frequently but in my case its not happening,only when sending  any command its showing less RSSI and the remaining advertising time its been more.

    As i couldn't find any other solution related to this . so i hope could anyone help me regarding this problem .it will be so much helpful if i could complete this work with your help.

    Thank You.

  • I believe you have already opened a new case regarding this. A support engineer will reply to you there soon.

  • Hi Damien,Vishal,Bjorn

    I have still the same problem i send hello message from client and unable to read and print hello string on server side. can you please help me for the same. Where should i need to write code for print incoming message and change in server main file. 

    Any help most appreciate for me...!

    Thanks.

Related