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

Openthread with FreeRTOS

Hi!
I've successfully set op an OpenThread MQTT broker using a Rasperry Pi and nrf52 dongle and I am able to publish and subscribe to and from my computer by flashing the mqttsn_client_subscriber and mqttsn_client_publisher examples to my nrf52840 DK.

I want to incorporate thread communication into a larger project on the nrf52840 DK using FreeRTOS. My first step has been trying to modify the mqttsn_client_subscriber example to incorporate FreeRTOS. However I have not had much success.

Does the SDK provide examples of OpenThread with FreeRTOS or are there other sources I can consult?






Parents
  • Hello,

    There is one example that uses the openthread stack and FreeRTOS:

    SDK_for_Thread_and_Zigbee_4.1.0\examples\thread\freertos_coap_server

    Perhaps you can use this example for reference.

    Best regards,

    Edvin

  • Hi!
    I've tried this unsuccessfully.

    I modified the mqttsn_client_subscriber example some, making it connect to the broker and subscribe to topic automatically, not using the buttons.
    This solution works well. 



    However when i try to implement the same solution in FreeRTOS, using the freertos_coap_server as a reference, it doesn't work. The program does not connect to the gateway etc. 


    There seems to be an issue with running the mqttsn_evt_handler, perhaps this is related to using the app_scheduler in the program? I am not sure, but the events are not triggered. 

    Here is my code: https://github.com/hunshamar/freertos_openthread

    Do you have any suggestions for making this work? I am not too experienced with FreeRTOS or the nordic SDK, so any help would be appreciated. 

    -Asgeir


Reply
  • Hi!
    I've tried this unsuccessfully.

    I modified the mqttsn_client_subscriber example some, making it connect to the broker and subscribe to topic automatically, not using the buttons.
    This solution works well. 



    However when i try to implement the same solution in FreeRTOS, using the freertos_coap_server as a reference, it doesn't work. The program does not connect to the gateway etc. 


    There seems to be an issue with running the mqttsn_evt_handler, perhaps this is related to using the app_scheduler in the program? I am not sure, but the events are not triggered. 

    Here is my code: https://github.com/hunshamar/freertos_openthread

    Do you have any suggestions for making this work? I am not too experienced with FreeRTOS or the nordic SDK, so any help would be appreciated. 

    -Asgeir


Children
Related