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

Thread example for nRF52840

Hello,

I am new to thread technology, and I would like your advice. I studied thread CLI example and thread client and server examples. However, in these examples I did not find any function for sending multiple bytes in one package. Can someone please tell me if there is an example where I can see how to send a package with multiple bytes? Thank you for your time.

  • Hi

    Thread does all processing queued at a time when the thread_process() function is called. It will be up to you how many bytes you queue before doing any processing/transfers.  Are you using the nRF5 SDK or NCS? Let me know and I'll help you find the exact function you're looking for.

    Best regards,

    Simon

  • Hello Simonr,

    I am using nRF SDK and the microcontroller is nRF52840. I am trying to understand thread_simple_coap_client_example and thread_simple_coap_server example because they work in conjuction. The way I see it, at the beginning of the program the pheripherals are being initiated and then the thread_process() funtion. I do not yet understand how thread_process() function works. 

    The way I understand the functions, thread_coap_provisioning_request_send() from the clients side is actually a request for pairing devices. If the server responds, a connection is made. If that is the case, then the client should be able to send one byte by calling the function thread_coap_utils_unicast_light_request_send( byte size data type argument ). I would like to send more then one byte so I am looking for an alternative function.

    Thank you for your time and help,
    Best regards

  • Hi again

    If you're new to Thread development, I would strongly suggest looking at nRFConnect SDK rather than nRF5 SDK, as future development and improvements of Thread example projects will be focused on NCS, and not the nRF5 SDK. It also, in my opinion has a better Thread user guide to get started with, and might help you get a better understanding of OpenThread altogether.

    If you insist on staying in the nRF5 SDK, I think you should check out the message.h header file located in ...\nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8\external\openthread\include\openthread\ which, among other things let you set message lengths in bytes and functions that manipulate OpenThread message buffers.

    Best regards,

    Simon

  • Hello Simon,

    Thank you for your advice and help. I will look into it.

    Best regards

Related