Configuration#

User-configurable stack configuration macros and defaults.

Connect stack provides various interfaces to apply configuration:

  • APIs to change configuration run-time

  • Manufacturing tokens to change configuration during device flashing

  • Macros to change configuration at compile-time

The compile time configuration macros and their default values are listed here.

The default values are always chosen to make it usable for most applications, but in some cases, you might need to change it. The recommended way is to either define the macro you need to change in the compilation command (e.g. gcc -D) or you by manipulating the configuration options in the configurator GUI.

See ember-configuration-defaults.h for source code.

Macros#

#define

The size in bytes of the Ember heap. See Memory Buffer for more details.

#define

The maximum number of children supported by the device. Can be configured from 0 to 64. 11B of token space is allocated for each child in the table.

#define
EMBER_CHILD_TABLE_TOKEN_SIZE EMBER_CHILD_TABLE_SIZE
#define

Every child should exchange regularly some sort of traffic with the parent. Eventually, if traffic is not exchanged for a prolonged period of time, the parent may remove the child from the child table. In particular the parent shall remove the oldest stale child whenever the child table is full and there is the need of making room for a new child. Range extenders periodically exchange network-level commands with the coordinator. End devices and sleepy end devices can use emberPollForData() as keep alive mechanism, or use the Poll Plugin plugin. The maximum allowed timeout value is EMBER_CHILD_TABLE_MAX_TIMEOUT_S. Setting the timeout value to EMBER_CHILD_TABLE_AGING_DISABLED disables aging of the child table.

#define

Indirect queue is used on a parent to store a message intended for a sleepy end device, this configures the size of that queue. Configure it to 0 if parent support plugin is not used.

#define

MAC Outgoing paclet queue is to store messages until the radio is available to send it (In most cases, the radio is unavailable because it's already transmitting). The configures the size of that queue.

#define

The maximum amount of time (in milliseconds) that the MAC will hold a message for indirect transmission to a child. The maximum value is 30 seconds (30000 milliseconds).

#define

The period in seconds a range extender sends an update command to the coordinator containing the list of its children.

#define

The ACK timeout in milliseconds. This parameter should be fine-tuned to reduce energy consumption for sleepy devices and depends on the data rate of the PHY configuration used. The maximum allowed value is 65.

#define

The CCA threshold used at the MAC layer for CSMA/CA, in dBm.

#define

The frequency hopping channel sequence generation seed. Can be configured between 0 and 65535. See the Frequency Hopping chapter of UG235.03 for more details.

#define

The lowest channel on the frequency hopping list. See the Frequency Hopping chapter of UG235.03 for more details.

#define

The highest channel on the frequency hopping list. See the Frequency Hopping chapter of UG235.03 for more details.

#define

The time in milliseconds to stay on each channel for frequency hopping. See the Frequency Hopping chapter of UG235.03 for more details.

#define

The time in milliseconds to guard each channel while frequency hopping. No MAC activity is allowed when entering or exiting the slot. See the Frequency Hopping chapter of UG235.03 for more details.

#define

The duration in seconds after which the server should broadcast its frequency hopping information to allow clients to realign. See the Frequency Hopping chapter of UG235.03 for more details.

#define

The duration in seconds after which a sleepy client should resync with the server if the last resync happened more than this duration ago. See the Frequency Hopping chapter of UG235.03 for more details.

#define

The maximum duration in seconds a non sleepy client would keep hopping without receiving frequency hopping information from the server, after which the synchronization with the server is deemed lost. A special value of EMBER_FREQUENCY_HOPPING_ALWAYS_ON_CLIENT_SYNC_DISABLE_TIMEOUT disables this timeout.

#define

When a node is started a frequency hopping server, it will first advertise on all channels to resynchronize all existing clients in case the server was started as result of a reboot. This parameter defines the number of iterations over the entire hopping sequence.

#define

An EMBER_STAR_COORDINATOR assigns short IDs to other nodes in the star network sequentially starting from this short ID. This option provides a simple effective way to reserve an pool of short addresses for commissioning.

#define

The size of the short-to-long address mapping table. See emberMacAddShortToLongAddressMapping for more details.

#define

The size of the the receiving buffer in CSP Callbacks.

Macro Definition Documentation#

EMBER_HEAP_SIZE#

#define EMBER_HEAP_SIZE
Value:
2000

The size in bytes of the Ember heap. See Memory Buffer for more details.

Warnings

  • This should be configured from the Parent Support plugin options.


Definition at line 90 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_CHILD_TABLE_SIZE#

#define EMBER_CHILD_TABLE_SIZE
Value:
0

The maximum number of children supported by the device. Can be configured from 0 to 64. 11B of token space is allocated for each child in the table.

Note

Warnings

  • This should be configured from the Parent Support plugin options.


Definition at line 102 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_CHILD_TABLE_TOKEN_SIZE#

#define EMBER_CHILD_TABLE_TOKEN_SIZE
Value:
EMBER_CHILD_TABLE_SIZE

Definition at line 105 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_CHILD_TIMEOUT_SEC#

#define EMBER_CHILD_TIMEOUT_SEC
Value:
3600

Every child should exchange regularly some sort of traffic with the parent. Eventually, if traffic is not exchanged for a prolonged period of time, the parent may remove the child from the child table. In particular the parent shall remove the oldest stale child whenever the child table is full and there is the need of making room for a new child. Range extenders periodically exchange network-level commands with the coordinator. End devices and sleepy end devices can use emberPollForData() as keep alive mechanism, or use the Poll Plugin plugin. The maximum allowed timeout value is EMBER_CHILD_TABLE_MAX_TIMEOUT_S. Setting the timeout value to EMBER_CHILD_TABLE_AGING_DISABLED disables aging of the child table.

Warnings

  • This should be configured from the Parent Support plugin options.


Definition at line 123 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_INDIRECT_QUEUE_SIZE#

#define EMBER_INDIRECT_QUEUE_SIZE
Value:
0

Indirect queue is used on a parent to store a message intended for a sleepy end device, this configures the size of that queue. Configure it to 0 if parent support plugin is not used.

Warnings

  • This should be configured from the Parent Support plugin options.


Definition at line 139 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_MAC_OUTGOING_QUEUE_SIZE#

#define EMBER_MAC_OUTGOING_QUEUE_SIZE
Value:
0

MAC Outgoing paclet queue is to store messages until the radio is available to send it (In most cases, the radio is unavailable because it's already transmitting). The configures the size of that queue.

Warnings

  • This should be configured from the MAC Packet Queue plugin options.


Definition at line 149 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_INDIRECT_TRANSMISSION_TIMEOUT_MS#

#define EMBER_INDIRECT_TRANSMISSION_TIMEOUT_MS
Value:
8000

The maximum amount of time (in milliseconds) that the MAC will hold a message for indirect transmission to a child. The maximum value is 30 seconds (30000 milliseconds).

Warnings

  • This should be configured from the Parent Support plugin options.


Definition at line 159 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_NWK_RANGE_EXTENDER_UPDATE_PERIOD_SEC#

#define EMBER_NWK_RANGE_EXTENDER_UPDATE_PERIOD_SEC
Value:
60

The period in seconds a range extender sends an update command to the coordinator containing the list of its children.


Definition at line 168 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_MAC_ACK_TIMEOUT_MS#

#define EMBER_MAC_ACK_TIMEOUT_MS
Value:
25

The ACK timeout in milliseconds. This parameter should be fine-tuned to reduce energy consumption for sleepy devices and depends on the data rate of the PHY configuration used. The maximum allowed value is 65.


Definition at line 177 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_RADIO_CCA_THRESHOLD#

#define EMBER_RADIO_CCA_THRESHOLD
Value:
-65

The CCA threshold used at the MAC layer for CSMA/CA, in dBm.

Warnings

  • This should be configured from the Connect Stack plugin options.


Definition at line 185 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_FREQUENCY_HOPPING_SEED#

#define EMBER_FREQUENCY_HOPPING_SEED
Value:
0

The frequency hopping channel sequence generation seed. Can be configured between 0 and 65535. See the Frequency Hopping chapter of UG235.03 for more details.


Definition at line 194 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_FREQUENCY_HOPPING_START_CHANNEL#

#define EMBER_FREQUENCY_HOPPING_START_CHANNEL
Value:
0

The lowest channel on the frequency hopping list. See the Frequency Hopping chapter of UG235.03 for more details.


Definition at line 202 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_FREQUENCY_HOPPING_END_CHANNEL#

#define EMBER_FREQUENCY_HOPPING_END_CHANNEL
Value:
24

The highest channel on the frequency hopping list. See the Frequency Hopping chapter of UG235.03 for more details.


Definition at line 210 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_FREQUENCY_HOPPING_CHANNEL_DURATION_MS#

#define EMBER_FREQUENCY_HOPPING_CHANNEL_DURATION_MS
Value:
400

The time in milliseconds to stay on each channel for frequency hopping. See the Frequency Hopping chapter of UG235.03 for more details.


Definition at line 218 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_FREQUENCY_HOPPING_CHANNEL_GUARD_DURATION_MS#

#define EMBER_FREQUENCY_HOPPING_CHANNEL_GUARD_DURATION_MS
Value:
20

The time in milliseconds to guard each channel while frequency hopping. No MAC activity is allowed when entering or exiting the slot. See the Frequency Hopping chapter of UG235.03 for more details.


Definition at line 227 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_FREQUENCY_HOPPING_SERVER_FREQ_INFO_BROADCAST_PERIOD_S#

#define EMBER_FREQUENCY_HOPPING_SERVER_FREQ_INFO_BROADCAST_PERIOD_S
Value:
15

The duration in seconds after which the server should broadcast its frequency hopping information to allow clients to realign. See the Frequency Hopping chapter of UG235.03 for more details.


Definition at line 236 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_FREQUENCY_HOPPING_SLEEPY_CLIENT_RESYNC_PERIOD_S#

#define EMBER_FREQUENCY_HOPPING_SLEEPY_CLIENT_RESYNC_PERIOD_S
Value:
60

The duration in seconds after which a sleepy client should resync with the server if the last resync happened more than this duration ago. See the Frequency Hopping chapter of UG235.03 for more details.


Definition at line 245 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_FREQUENCY_HOPPING_ALWAYS_ON_CLIENT_SYNC_TIMEOUT_S#

#define EMBER_FREQUENCY_HOPPING_ALWAYS_ON_CLIENT_SYNC_TIMEOUT_S
Value:
(100)

The maximum duration in seconds a non sleepy client would keep hopping without receiving frequency hopping information from the server, after which the synchronization with the server is deemed lost. A special value of EMBER_FREQUENCY_HOPPING_ALWAYS_ON_CLIENT_SYNC_DISABLE_TIMEOUT disables this timeout.


Definition at line 256 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_FREQUENCY_HOPPING_SERVER_ADVERTISING_ITERATION_COUNT#

#define EMBER_FREQUENCY_HOPPING_SERVER_ADVERTISING_ITERATION_COUNT
Value:
(3)

When a node is started a frequency hopping server, it will first advertise on all channels to resynchronize all existing clients in case the server was started as result of a reboot. This parameter defines the number of iterations over the entire hopping sequence.


Definition at line 266 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_COORDINATOR_FIRST_SHORT_ID_TO_BE_ASSIGNED#

#define EMBER_COORDINATOR_FIRST_SHORT_ID_TO_BE_ASSIGNED
Value:
1

An EMBER_STAR_COORDINATOR assigns short IDs to other nodes in the star network sequentially starting from this short ID. This option provides a simple effective way to reserve an pool of short addresses for commissioning.


Definition at line 276 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_SECURITY_SHORT_TO_LONG_MAPPING_TABLE_SIZE#

#define EMBER_SECURITY_SHORT_TO_LONG_MAPPING_TABLE_SIZE
Value:
10

The size of the short-to-long address mapping table. See emberMacAddShortToLongAddressMapping for more details.


Definition at line 287 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h

EMBER_CSP_CALLBACK_MESSAGE_BUFFER_SIZE#

#define EMBER_CSP_CALLBACK_MESSAGE_BUFFER_SIZE
Value:
127

The size of the the receiving buffer in CSP Callbacks.

  • This must be set high enough depending on the PHY to prevent buffer overflow. In SUN PHYs (OFDM and FSK), the max message length is 2048. Considering the impact of this parameter on the stack size, this needs to be fine tuned according the need of the application


Definition at line 298 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/stack/config/ember-configuration-defaults.h