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

how to test bidirectional working of mesh

i am using latest version mesh sdk 3.1 .. i want to interface two boards and want to check the bidirectional using text message, example if client sending the hello message and server should receive it and transmit back to client hello message . how can i do it? any sample code 

which function is used to send the message ?

 

thanks in advance

Parents
  • I would recommend using the light switch example as a starting point. You could then create a new model based on the generic on off model. In this new model, you could use the set message (generic_onoff_client_set() in generic_onoff_client.c file to send an acknowledged message from the client to the server. The server will then respond to this set message with the generic_onoff_state_set_cb_t() function in generic_onoff_server.h using a status message (see generic_onoff_status_params_t in generic_onoff_common.h).

    Take a look at the generic_onoff_set_msg_pkt_t in generic_onoff_messages.h in the client example. You will essentially need to update the on_off variables to instead of being boolean variables to be a string. You will also need to make sure that all callbacks & the provisioner code is also updated to reflect this change.

    You could then use button presses on the client to send an acknowledged set message that sends a small string value & the server can respond with this same value.

    I am referring to mesh sdk version 3.1.0 in this example. If you wish to use a different version, some other changes may also be needed.

  • hi... if i send  acknowledged message  from clienr to server where i can be able to see the message...

    where i can enter my message in message parameter ,is it right?

     

  • If you send an acknowledged set message, the server will respond with a status message. This is handled in the status_handle() function generic_onoff_client.c. This function then calls app_generic_onoff_client_status_cb() in main.c.

Reply Children
Related