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 Reply Children
  • I saw that repo, but which of the projects is it? And what IDE did you use to set up the project? I tried the freertos_coap_server\pca10056\blank\ses and armgcc, but none of them compiled in an unmodified SDK2.0.0. Where should I place the project file, and what IDE do you use? Please make sure that it compiles in an unmodified SDK.

    SDK2.0.0 is a bit old, so you can consider to move to SDK4.1.0, but we can look into it in the SDK2.0.0 first.

    BR,

    Edvin

  • The projects are explained in the readme. The "freertos_coap_server" is the freertos openthread mqtt program. 

    I am able to compile it in an unmodified SDK2.0.0. I tried downloading a new SDK now and tested it. I copied the files from the github repo into SDK/examples-folder. I used VS code to modify the code, but to compile it i ran the makefile in pca/10056/blank/armgcc using a terminal. You can see where i placed the project files in the picture. Does this not work for you?

    Kind regards, Asgeir. 





  • Yes. It was probably what it said earlier as well, but I guess it wasn't an error:

    So, I am currently working from home, and can't monitor the LEDs, because the DK is connected in my work computer in the office, so I added the line:

    NRF_LOG_INFO("led task"); right before toggling the led in the while loop.

    I saw that it was only printed once, and I wanted to debug, so I had to port the segger project that you provided. However, running that, I see that it is printed regularly (LED1_BLINK_INTERVAL).

    Can you try the attached project (unzip in the same location as you had your project) and check if it behaves the same, or if the LED keeps blinking in your case?

    6281.freertos_coap_server.zip

  • It behaves the same. The LED only blinks once. When i remove the call to mqttsn_client_search_gateway(), the blinking tasks works as expected. 

  • Did you test the SES (segger embedded Studio) project that I attatched in the previous reply? Does it behave the same there?

Related