Skip to main content
Version: 0.0.x

Result Code - IoT SDK

This file defines all possible result codes returned by the VideoSDK functions. Each result code is represented as an enum constant, making it easier for developers to identify, handle, and debug errors in a standardized way across publishing, subscribing, and other SDK operations.

tip

Codes that mean the session dropped mid-call are handled with a rejoin, not a retry of the failed call. See Connection State.

Enum ConstantValueDescription
RESULT_OK0Operation completed successfully with no errors.
SSL_CONNECT_FAILED3001The TLS handshake with the VideoSDK server did not complete. Confirm the device has working DNS and internet access, and that CONFIG_MBEDTLS_CERTIFICATE_BUNDLE and CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL are still set in your sdkconfig, since a trimmed bundle cannot verify the server certificate. Retry once the network is up.
HTTP_REQUEST_FAILED3002The HTTP request could not be sent from the device, or the server did not respond. Check that Wi-Fi is connected and DNS resolves, and that the token is not empty. Retry with a delay rather than in a tight loop.
MEMORY_ALLOC_FAILED3003Allocation failed because the requested buffer exceeded the available heap. Confirm PSRAM is enabled (CONFIG_SPIRAM, CONFIG_SPIRAM_MODE_OCT, CONFIG_SPIRAM_SPEED_80M), print the free heap, and reduce your own allocations before retrying. See Logging and Debugging.
DEVICE_NOT_SUPPORTED3004The board does not have the hardware for that direction: receiving audio needs a speaker and receiving video needs a display. The subscribe calls return this code on boards without that hardware (expected, not a failure). See Supported Microcontrollers.
NULL_PARAMETER3005A function call failed because a required input parameter was NULL or empty, resulting in an invalid operation. Ensure all required parameters are properly initialized before invoking the function.
INIT_BOARD_FAILED3006Initialization of the board or audio codec hardware failed. Check that the board selected under menuconfig -> SET Microcontroller matches the hardware you are flashing, and that the board is powered and seated correctly.
PEER_INIT_FAILED3007SRTP initialization failed, usually a memory shortage or a stale build. Print the free heap, then rebuild after deleting sdkconfig, and confirm the libsrtp compile option from Quick Start, Step 3, is present in main/CMakeLists.txt.
TASK_ALREADY_STARTED3008That direction is already running. There is no separate stop call, so end the session with leave() before starting it again.
PUBLISH_MUTEX_CREATE_FAILED3009The mutex needed to synchronize publishing could not be allocated. Free memory and retry. See Logging and Debugging.
AUDIO_CODEC_INIT_FAILED3010Audio codec initialization failed, usually a codec the board cannot handle. Select a different init_config_t.audioCodec (AUDIO_CODEC_PCMA, AUDIO_CODEC_PCMU or AUDIO_CODEC_OPUS) and confirm your board selection under menuconfig -> SET Microcontroller.
PUBLISH_PEER_CONNECTION_FAILED3011The peer connection for publishing failed to come up. Verify the token is valid and unexpired, that the meeting ID exists, and that the network allows outbound UDP. Retry with backoff.
PUBLISH_MEMORY_ALLOC_FAILED3012Memory for the publishing path could not be allocated. Confirm PSRAM is enabled and check the free heap before retrying. See Logging and Debugging.
PUBLISH_TASK_CREATE_FAILED3013FreeRTOS could not create the publishing task, usually because internal RAM is exhausted. Free memory, or allow task stacks in PSRAM with CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY, then retry.
SUBSCRIBE_MUTEX_CREATE_FAILED3014The mutex needed to synchronize subscribing could not be allocated. Free memory and retry. See Logging and Debugging.
SUBSCRIBE_PEER_CONNECTION_FAILED3015The peer connection for subscribing failed to come up. Verify the token is valid and unexpired, that the meeting ID exists, and that the network allows outbound UDP. Retry with backoff.
SUBSCRIBE_MEMORY_ALLOC_FAILED3016Memory for the subscribing path could not be allocated. Confirm PSRAM is enabled and check the free heap before retrying. See Logging and Debugging.
SUBSCRIBE_TASK_CREATE_FAILED3017FreeRTOS could not create the subscribing task, usually because internal RAM is exhausted. Free memory, or allow task stacks in PSRAM with CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY, then retry.
STOP_PUBLISH_TASK_CREATE_FAILED3018leave() could not start tearing down the publishing side, so nothing was torn down and the session is still active. Free some memory and call leave() again.
STOP_SUBSCRIBE_TASK_CREATE_FAILED3019leave() could not start tearing down the subscribing side, so nothing was torn down and the session is still active. Free some memory and call leave() again.
CANDIDATE_PAIR_FAILED3020ICE found no working network path. Usually a network that blocks outbound UDP, such as guest Wi-Fi or a captive portal. Try another network or a phone hotspot to confirm, then retry the join.
DTLS_HANDSHAKE_FAILED3021The DTLS handshake between peers failed. Retry the join. If it repeats, check the free heap and that the CONFIG_MBEDTLS_* options from Quick Start, Step 5, are still set, and make sure only one session is active on the device.
LEAVE_FAILED3022Teardown started but did not finish within 6 seconds, so something is stuck. Unlike 3018/3019, the session is not left intact, so do not assume it is safe to rejoin immediately.
INIT_NOT_CALLED3023This error occurs when the init() function was not called before using other functions like publish() or subscribe(). To resolve this, call init() first.
DATA_CHANNEL_NOT_STARTED3025sendMessage() was called before startMessageChannel(). Call startMessageChannel() once before sending messages.
DATA_CHANNEL_QUEUE_FULL3026The message send queue is momentarily full, so the message was not queued. Retry shortly.

Got a Question? Ask us on discord