Using RT-Thread together with RUI3

The RAK4630 supports RT-Thread (as shown in the example code available), can RUI3 be used together with RT-Thread? Most importantly, the sleep function and LoRaWAN function of RUI3.

Instead of using the RAK timer, I want to write my code base on RT-Thread and call RUI3’s functions. Then when no tasks are scheduled, run RUI3 to sleep the device.

Most likely it will not work with RUI3 as RUI3 has its own scheduler running in the background and this might collide with RT-Thread. However, you an give it a try and let us know.

If you need a real time OS, the open source version for the RAK4630 (based on Arduino BSP), has built in FreeRTOS, but of course not all the features that RT-Thread is offering.

Thanks for the quick info.

Does the open-source version of RAK4630 come with RUI3 support? Or when I go for FreeRTOS I will lose the RUI3 function?

The bare Arduino BSP does not have LoRa/LoRaWAN support or AT command interface.

But if you are up for some challenge, I have written the WisBlock-API-V2

  • LoRa driver, LoRaWAN stack included
  • API calls (but different to RUI3) to setup everything
  • AT command (more or less) compatible to RUI3 AT commands

But WisBlock-API-V2 is event driven. You do not have a setup() or loop() function anymore (they are inside the WisBlock-API-V2).
Events are timer interrupts or external interrupts. These events create flags and wake up the loop(), then the events are handled in the app_event_handler. LoRa and LoRaWAN events are handled in callbacks.

It requires some re-thinking how you write your code. But today I am writing all my PoC code based on WisBlock-API-V2. No more copy/paste of LoRaWAN initialization routines, for setup I just use the AT command interface.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.