hi...
i am working on mesh , i have done light switch example , now i want to get some message from node and send to particular node . how to print the same message which is from particular node to uart termite
please help me out.
thanks in advance
hi...
i am working on mesh , i have done light switch example , now i want to get some message from node and send to particular node . how to print the same message which is from particular node to uart termite
please help me out.
thanks in advance
Which part are you stuck on:
Each one is entirely independent of the other.
i am using two boards , example A and B .. A will sent a message to B And that message has to be read and write on uart using termite
message_create(p_client, GENERIC_ONOFF_OPCODE_SET, (const uint8_t *) &p_client->msg_pkt.set,
server_msg_length, &p_client->access_message.message); in this case which paramater i should send message
If you are sending a generic on off set message, the set_params variable in generic_onoff_client_set(&m_clients[0], &set_params, &transition_params); will send the message data, which will send a bool value state. Like I have mentioned previously, one of the updates you will need to make is to change this bool value to a character string. The message_set_packet_create function takes the set_params variable & makes changes via call by reference to the first argument provided (i.e. &p_client->msg_pkt.set).
how to change the bool value to a character string
That's standard 'C' - nothing to do with Nordic.
A moment with google:
https://stackoverflow.com/questions/17307275/what-is-the-printf-format-specifier-for-bool
ps_anu I did not mean to typecast the bool value to a character string, but instead of using bool on_off inside generic_onoff_set_params_t, you could use a fixed size variable e.g. char[3] msg
It should hopefully not be too hard to make the required changes required to send a message of a constant size over the mesh. You should also be able to provision & configure a custom model with nRF Mesh.
ps_anu I did not mean to typecast the bool value to a character string, but instead of using bool on_off inside generic_onoff_set_params_t, you could use a fixed size variable e.g. char[3] msg
It should hopefully not be too hard to make the required changes required to send a message of a constant size over the mesh. You should also be able to provision & configure a custom model with nRF Mesh.
thank you so much...i have sent the message from client to server , now how can i print the data from server using uart
As far as the UART is concerned, it's just data - it is irrelevant where it came from, or how it got there.
Surely, you have used the UART before?
i hope, u didn't understand my question
Then please clarify your question!
What have you tried?
Where are you stuck?
Have you tried SDK examples?
thank you so much Bjorn kvaale. i have set the message in generic_onoff_set_params_t, in light switch client example , i am getting results like what does it mean ?
this is pic of client

this is pic of server side

how do i know my message have sent from client to server and want to know whether it is received in server side or not