Skip to main content
Voice sessions are not available on FreeRTOS in v1. The WebRTC voice pipeline (DTLS, SRTP, Opus) requires roughly 512 KB RAM and a POSIX threading model — more than most microcontrollers provide. FreeRTOS targets support text sessions and streaming only.For voice on constrained hardware, the recommended architecture is a companion Linux module (Raspberry Pi, i.MX8, or similar) connected over UART or SPI. The Linux module runs kiosk-c with -DKIOSK_WITH_VOICE=ON and handles the WebRTC session; the FreeRTOS MCU handles local I/O, sensors, and display. See the audio hardware guide for companion module wiring and the Raspberry Pi guide for the Linux-side setup.
The kiosk-c library targets C99 and uses libcurl for HTTP/HTTPS. On FreeRTOS you need a network stack that provides a BSD socket layer compatible with libcurl’s curl-for-RTOS port. The lwIP + FreeRTOS-Plus-TCP combination is the most common choice.

Heap requirements

Configure configTOTAL_HEAP_SIZE in FreeRTOSConfig.h accordingly:

CMakeLists integration


FreeRTOS task example

Run the kiosk client inside a dedicated FreeRTOS task. The task opens a session, processes messages, and handles errors.
kiosk_session_stream() and kiosk_session_message() both block the calling task until the operation completes. Run the kiosk task at a priority that lets the TCP/IP and Wi-Fi driver tasks run — typically priority 3 or 4 out of 10.

Task stack sizing

The kiosk task stack must accommodate:
  • The C library’s call stack (~4 KB peak)
  • libcurl’s internal stack (~6 KB peak)
  • Your application code
Use uxTaskGetStackHighWaterMark() after a full conversation to measure actual usage:
If high water mark is below 256 words, increase KIOSK_TASK_STACK_WORDS.

Credential storage on FreeRTOS

Do not store credentials in plain RAM. Use your MCU’s non-volatile storage: See Credential management for provisioning and rotation patterns.