Miscellaneous Constants

This module includes configuration variables for Miscellaneous constants.

Summary

Macros

OPENTHREAD_CONFIG_ALLOW_EMPTY_NETWORK_NAME 0
Define as 1 to enable support for an empty network name (zero-length: "")
OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL 0
Define as 1 to enable assert check of pointer-type API input parameters against null.
OPENTHREAD_CONFIG_ASSERT_ENABLE 1
Define as 1 to enable assert function OT_ASSERT() within OpenThread code and its libraries.
OPENTHREAD_CONFIG_BLE_TCAT_ENABLE 0
Define to 1 to enable TCAT over BLE support.
OPENTHREAD_CONFIG_DEFAULT_CHANNEL 11
The default IEEE 802.15.4 channel.
OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE 1280
This setting configures the default buffer size for IPv6 datagram destined for an attached SED.
OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT 1
This setting configures the default datagram count of 106-octet IPv6 datagram per attached SED.
OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER 0
The default IEEE 802.15.4 transmit power (dBm).
OPENTHREAD_CONFIG_DETERMINISTIC_ECDSA_ENABLE 1
Define to 1 to generate ECDSA signatures deterministically according to RFC 6979 instead of randomly.
OPENTHREAD_CONFIG_DEVICE_POWER_SUPPLY OT_POWER_SUPPLY_EXTERNAL
Specifies the default device power supply config.
OPENTHREAD_CONFIG_DTLS_APPLICATION_DATA_MAX_LENGTH 1400
The size of dtls application data when the CoAP Secure API is enabled.
OPENTHREAD_CONFIG_DUA_ENABLE 0
Define as 1 to support Thread 1.2 Domain Unicast Address feature.
OPENTHREAD_CONFIG_ECDSA_ENABLE 0
Define to 1 to enable ECDSA support.
OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 1
Define as 1 to enable builtin-mbedtls.
OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS
Define as 1 to enable builtin mbedtls management.
OPENTHREAD_CONFIG_ENABLE_DEBUG_UART 0
Enable the "Debug Uart" platform feature.
OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS 4
This setting configures the number of consecutive MCPS.DATA-Confirms having Status NO_ACK that cause a Child-to-Parent link to be considered broken.
OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 0
Enable the external heap.
OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE (1616 * sizeof(void *))
The size of heap buffer when DTLS is enabled.
OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS 384
The size of heap buffer when DTLS is disabled.
OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 0
Define to 1 to enable the Jam Detection service.
OPENTHREAD_CONFIG_JOINER_UDP_PORT 1000
The default Joiner UDP port.
OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS 1
The maximum number of state-changed callback handlers (set using otSetStateChangedCallback()).
OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE (sizeof(void *) * 32)
The size of a message buffer in bytes.
OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE 0
Whether use heap allocator for message buffers.
OPENTHREAD_CONFIG_MLR_ENABLE 0
Define as 1 to support Thread 1.2 Multicast Listener Registration feature.
OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE 0
Define to 1 to enable multipan RCP support.
OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 0
Define to 1 to enable multiple instance support.
OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_NUM 3
Define number of OpenThread instance for static allocation buffer.
OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE 0
Define to 1 to enable multiple static instance support.
OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE 0
Define as 1 to enable support for Neighbor Discover Agent.
OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 44
The number of message buffers in the buffer pool.
OPENTHREAD_CONFIG_OPERATIONAL_DATASET_AUTO_INIT 0
Define as 1 to enable support for locally initializing an Active Operational Dataset.
OPENTHREAD_CONFIG_OTNS_ENABLE 0
Define to 1 to enable OTNS interactions.
OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 0
Define to 1 to enable otPlatFlash* APIs to support non-volatile storage.
OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_SUPPORT 0
Define to 1 to support proprietary radio configurations defined by platform.
OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH "tmp"
The settings storage path on posix platform.
OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 1
Define to 1 to support OQPSK modulation in 2.4GHz frequency band.
OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 0
Define to 1 to support OQPSK modulation in 915MHz frequency band.
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 0
Define to 1 to enable Thread Test Harness reference device support.
OPENTHREAD_CONFIG_STACK_VENDOR_OUI 0x18b430
The Organizationally Unique Identifier for the Thread stack.
OPENTHREAD_CONFIG_STACK_VERSION_MAJOR 0
The Stack Version Major for the Thread stack.
OPENTHREAD_CONFIG_STACK_VERSION_MINOR 1
The Stack Version Minor for the Thread stack.
OPENTHREAD_CONFIG_STACK_VERSION_REV 0
The Stack Version Revision for the Thread stack.
OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD 1000
The value ahead of the current frame counter for persistent storage.
OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 0
Define to 1 to enable UDP forward support.
OPENTHREAD_CONFIG_UPTIME_ENABLE OPENTHREAD_FTD
Define to 1 to enable tracking the uptime of OpenThread instance.

Macros

OPENTHREAD_CONFIG_ALLOW_EMPTY_NETWORK_NAME

 OPENTHREAD_CONFIG_ALLOW_EMPTY_NETWORK_NAME 0

Define as 1 to enable support for an empty network name (zero-length: "")

OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL

 OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL 0

Define as 1 to enable assert check of pointer-type API input parameters against null.

Enabling this feature can increase code-size significantly due to many assert checks added for all API pointer parameters. It is recommended to enable and use this feature during debugging only.

OPENTHREAD_CONFIG_ASSERT_ENABLE

 OPENTHREAD_CONFIG_ASSERT_ENABLE 1

Define as 1 to enable assert function OT_ASSERT() within OpenThread code and its libraries.

OPENTHREAD_CONFIG_BLE_TCAT_ENABLE

 OPENTHREAD_CONFIG_BLE_TCAT_ENABLE 0

Define to 1 to enable TCAT over BLE support.

OPENTHREAD_CONFIG_DEFAULT_CHANNEL

 OPENTHREAD_CONFIG_DEFAULT_CHANNEL 11

The default IEEE 802.15.4 channel.

OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE

 OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE 1280

This setting configures the default buffer size for IPv6 datagram destined for an attached SED.

A Thread Router MUST be able to buffer at least one 1280-octet IPv6 datagram for an attached SED according to the Thread Conformance Specification.

OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT

 OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT 1

This setting configures the default datagram count of 106-octet IPv6 datagram per attached SED.

A Thread Router MUST be able to buffer at least one 106-octet IPv6 datagram per attached SED according to the Thread Conformance Specification.

OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER

 OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER 0

The default IEEE 802.15.4 transmit power (dBm).

OPENTHREAD_CONFIG_DETERMINISTIC_ECDSA_ENABLE

 OPENTHREAD_CONFIG_DETERMINISTIC_ECDSA_ENABLE 1

Define to 1 to generate ECDSA signatures deterministically according to RFC 6979 instead of randomly.

OPENTHREAD_CONFIG_DEVICE_POWER_SUPPLY

 OPENTHREAD_CONFIG_DEVICE_POWER_SUPPLY OT_POWER_SUPPLY_EXTERNAL

Specifies the default device power supply config.

This config MUST use values from otPowerSupply enumeration.

Device manufacturer can use this config to set the power supply config used by the device. This is then used as part of default otDeviceProperties to determine the Leader Weight used by the device.

OPENTHREAD_CONFIG_DTLS_APPLICATION_DATA_MAX_LENGTH

 OPENTHREAD_CONFIG_DTLS_APPLICATION_DATA_MAX_LENGTH 1400

The size of dtls application data when the CoAP Secure API is enabled.

OPENTHREAD_CONFIG_DUA_ENABLE

 OPENTHREAD_CONFIG_DUA_ENABLE 0

Define as 1 to support Thread 1.2 Domain Unicast Address feature.

OPENTHREAD_CONFIG_ECDSA_ENABLE

 OPENTHREAD_CONFIG_ECDSA_ENABLE 0

Define to 1 to enable ECDSA support.

OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS

 OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 1

Define as 1 to enable builtin-mbedtls.

Note that the OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS determines whether to use builtin-mbedtls as well as whether to manage mbedTLS internally, such as memory allocation and debug.

OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT

 OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS

Define as 1 to enable builtin mbedtls management.

OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT determines whether to manage mbedTLS memory allocation and debug config internally. If not configured, the default is to enable builtin management if builtin mbedtls is enabled and disable it otherwise.

OPENTHREAD_CONFIG_ENABLE_DEBUG_UART

 OPENTHREAD_CONFIG_ENABLE_DEBUG_UART 0

Enable the "Debug Uart" platform feature.

In the embedded world, the CLI application uses a UART as a console and the NCP application can be configured to use either a UART or a SPI type device to transfer data to the host.

The Debug UART is or requires a second uart on the platform.

The Debug Uart has two uses:

Use #1 - for random 'debug printf' type messages a developer may need Use #2 (selected via DEBUG_LOG_OUTPUT) is a log output.

See #include for more details

OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS

 OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS 4

This setting configures the number of consecutive MCPS.DATA-Confirms having Status NO_ACK that cause a Child-to-Parent link to be considered broken.

OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE

 OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 0

Enable the external heap.

OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE

 OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE (1616 * sizeof(void *))

The size of heap buffer when DTLS is enabled.

OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS

 OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS 384

The size of heap buffer when DTLS is disabled.

OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE

 OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 0

Define to 1 to enable the Jam Detection service.

OPENTHREAD_CONFIG_JOINER_UDP_PORT

 OPENTHREAD_CONFIG_JOINER_UDP_PORT 1000

The default Joiner UDP port.

OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS

 OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS 1

The maximum number of state-changed callback handlers (set using otSetStateChangedCallback()).

OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE

 OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE (sizeof(void *) * 32)

The size of a message buffer in bytes.

Message buffers store pointers which have different sizes on different system. Setting message buffer size according to the CPU word length so that message buffer size will be doubled on 64bit system compared to that on 32bit system. As a result, the first message always have some bytes left for small packets.

Some configuration options can increase the buffer size requirements, including OPENTHREAD_CONFIG_MLE_MAX_CHILDREN and OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE.

OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE

 OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE 0

Whether use heap allocator for message buffers.

OPENTHREAD_CONFIG_MLR_ENABLE

 OPENTHREAD_CONFIG_MLR_ENABLE 0

Define as 1 to support Thread 1.2 Multicast Listener Registration feature.

OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE

 OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE 0

Define to 1 to enable multipan RCP support.

OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE

 OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 0

Define to 1 to enable multiple instance support.

OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_NUM

 OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_NUM 3

Define number of OpenThread instance for static allocation buffer.

OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE

 OPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE 0

Define to 1 to enable multiple static instance support.

OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE

 OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE 0

Define as 1 to enable support for Neighbor Discover Agent.

OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS

 OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 44

The number of message buffers in the buffer pool.

OPENTHREAD_CONFIG_OPERATIONAL_DATASET_AUTO_INIT

 OPENTHREAD_CONFIG_OPERATIONAL_DATASET_AUTO_INIT 0

Define as 1 to enable support for locally initializing an Active Operational Dataset.

OPENTHREAD_CONFIG_OTNS_ENABLE

 OPENTHREAD_CONFIG_OTNS_ENABLE 0

Define to 1 to enable OTNS interactions.

OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE

 OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 0

Define to 1 to enable otPlatFlash* APIs to support non-volatile storage.

When defined to 1, the platform MUST implement the otPlatFlash* APIs instead of the otPlatSettings* APIs.

OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_SUPPORT

 OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_SUPPORT 0

Define to 1 to support proprietary radio configurations defined by platform.

OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH

 OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH "tmp"

The settings storage path on posix platform.

OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT

 OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 1

Define to 1 to support OQPSK modulation in 2.4GHz frequency band.

The physical layer parameters are defined in section 6 of IEEE802.15.4-2006.

OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT

 OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 0

Define to 1 to support OQPSK modulation in 915MHz frequency band.

The physical layer parameters are defined in section 6 of IEEE802.15.4-2006.

OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE

 OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 0

Define to 1 to enable Thread Test Harness reference device support.

OPENTHREAD_CONFIG_STACK_VENDOR_OUI

 OPENTHREAD_CONFIG_STACK_VENDOR_OUI 0x18b430

The Organizationally Unique Identifier for the Thread stack.

OPENTHREAD_CONFIG_STACK_VERSION_MAJOR

 OPENTHREAD_CONFIG_STACK_VERSION_MAJOR 0

The Stack Version Major for the Thread stack.

OPENTHREAD_CONFIG_STACK_VERSION_MINOR

 OPENTHREAD_CONFIG_STACK_VERSION_MINOR 1

The Stack Version Minor for the Thread stack.

OPENTHREAD_CONFIG_STACK_VERSION_REV

 OPENTHREAD_CONFIG_STACK_VERSION_REV 0

The Stack Version Revision for the Thread stack.

OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD

 OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD 1000

The value ahead of the current frame counter for persistent storage.

OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE

 OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 0

Define to 1 to enable UDP forward support.

OPENTHREAD_CONFIG_UPTIME_ENABLE

 OPENTHREAD_CONFIG_UPTIME_ENABLE OPENTHREAD_FTD

Define to 1 to enable tracking the uptime of OpenThread instance.

Resources

OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.