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

Send string in a Mesh. With nRF52DK

Hello:

I have to nRF52DK boards and I am able to run the ligth_switch example, but the thing that I want to do is send a message, "hello" from one node to other. I saw the example in the Q&A, here but the example talks about the Mesh SDK v1.0.0. and I have the nrf5SDKforMeshv310src examples.

In the code I can't figure how to send a string.

Could you give me some clues to do it?

Thank you.

Parents
  • Hi Guillermo

    Due to the Easter holiday you will have to expect a delay in replies, sorry for the inconvenience!

    We do not have any examples of this for Mesh 3.1. But I suggest you have a look at or Getting started guide on how to creale your own models in mesh. Alternatively, it is possible to use the nrf_mesh_packet_send() API for access to the lower layers in the spec, found here on our GitHub.

    Best regards,

    Simon

  • Hi Simonr:

    Don't worry it is Easter Holiday in my country too.

    I will check and I give you some feedback as soon as I try it.

  • Hello, did you have some success on this? I have the same problem too.
    I was trying to implement a Library called 'simple message' but it only works with the old Mesh SDK 1.0
    If anyone could help me showing me some tutorial for sending and receiving strings in mesh

  • hello ,Did you do it? I had the same problem

  • Hello Sir  I got the messages to be sent and received over the light_switch example by modifying the type of every data variable to uint8_t * (you can notice that every data variables have the same bool type).

    After that, I force the message to be unsegmented, that means that the message will only support like 9 characters, so, it's good to be aware about that.

    then, I used a new opcode for receiving and sending string data over there.

    These are the functions to be changed over the Generic OnOff client code on the generic_onoff_client.c

    This code is part of the Generic OnOff Server's code and should be modified.

Reply
  • Hello Sir  I got the messages to be sent and received over the light_switch example by modifying the type of every data variable to uint8_t * (you can notice that every data variables have the same bool type).

    After that, I force the message to be unsegmented, that means that the message will only support like 9 characters, so, it's good to be aware about that.

    then, I used a new opcode for receiving and sending string data over there.

    These are the functions to be changed over the Generic OnOff client code on the generic_onoff_client.c

    This code is part of the Generic OnOff Server's code and should be modified.

Children
  • Hi JEFT 

    Thanks , I'm also looking to do the same , but sending an Integer. 

    Could you share your project \ modified files ?  

    I don't see where you set the msg "hello" in your example. 

    Thanks,Ran 

  • hi ..JEFT  ...  i want to send a string from client to server ... same as you ... can you tell me where you set a data ?

    please help out 

    Thanks&Regards ,

    pspavi

  • Hi Pspavi,

    Even i am trying to send a string from client to server have you got any solution if so can you please share

    Thanks,

    Krupa

  • Hi JEFT,

    Thanks, I want to send an integer from client to server, and i modified every bool variable data to unit8_t in both client and server code..

    And iam getting below errors in client.

    main.c,  156, Acknowledged transfer cancelled.

     main.c,  152, Acknowledged transfer timeout.

     please help out..

    Thanks,

    Sam 

  • Please create new tickets with more details if you have new questions. If they are related to this thread, you can link to it in your ticket.

    Best regards,

    Simon