Network Configurations

Changing Stack Parameters

The following sections provide the name and description of the most significant variables to be considered when designing a mesh network. They are ordered by project location as can be found in an imported Z-Stack project.

Note

Be sure to perform a clean build (ProjectClean) after configuring a parameter to ensure that the changes take effect.

Zigbee Device

Location: Project output folder → default/syscfg/ti_zstack_config.h

  • DEFAULT_CHANLIST: Set of 2.4-GHz channels that the Zigbee device will first attempt to operate on
  • SECONDARY_CHANLIST: Set of 2.4-GHz channels to use if DEFAULT_CHANLIST is unsuitable
  • ZDAPP_CONFIG_PAN_ID: Default PAN ID the coordinator will use to form the network, setting to 0xFFFF results in a random assignment
  • NWK_INDIRECT_MSG_TIMEOUT: Maximum time that parent will buffer indirect messages for its sleeping end devices
  • APSC_MAX_FRAME_RETRIES: Maximum number of APS layer retries, this value plus one is the maximum number of attempts
  • NWK_MAX_DATA_RETRIES: Maximum number of NWK layer retries
  • MAX_RTG_ENTRIES: Maximum number of AODV routing entries, maintained by ROUTE_EXPIRY_TIME
  • DEFAULT_KEY: Default network security key, if set to all 0x00 then a random key will be generated
  • RFD_RCVC_ALWAYS_ON: Determines whether an end device is allowed to enter standby mode for low power operation
  • POLL_RATE: End device time delay before requesting data from its parent, must be shorter than the NWK_END_DEV_TIMEOUT_DEFAULT to avoid being aged out and can be disabled by setting the value to 0xFFFFFFFF

Note

This file is generated automatically from the project’s .syscfg file. Please see Zigbee Configuration.

Network Parameters

Location: Stack/nwk/nwk_globals.h

  • NWK_LINK_STATUS_PERIOD: Interval for which link status reports are broadcast on the network, a jitter mask of LINK_STATUS_JITTER_MASK is used (see default/syscfg/ti_zstack_config.h)
  • NWK_MAX_DEVICE_LIST: Number of direct children supported by the association table, further maintained by child aging
  • MAX_NEIGHBOR_ENTRIES: Number of neighbors supported by the neighbor table, maintained by NWK_ROUTE_AGE_LIMIT
  • MAX_RTG_SRC_ENTRIES: Number of cached source routes, coordinator MTO-routing specific and should equal the max number of nodes in the the network
  • SRC_RTG_EXPIRY_TIME: Hop count for concentrator route discoveries, pertains only to coodinator MTO-routing
  • DEFAULT_TC_LINK_KEY: Pre-configured Trust Center link key and must remain as default for Zigbee Alliance 3 compliance

Z-Stack Parameters

Location: Stack/sys/zglobals.h

  • MAX_POLL_FAILURE_RETRIES: Maximum retries for an end device not receiving ACKs
  • CONCENTRATOR_ENABLE: Set to TRUE for coordinator MTO routing
  • CONCENTRATOR_DISCOVERY_TIME: MTO RREQ broadcast period in seconds, set to zero to disable
  • CONCENTRATOR_ROUTE_CACHE: Source route cache table, setting to TRUE is recommended for applications with allowable RAM space
  • NWK_END_DEV_TIMEOUT_DEFAULT: Default time before a routing devices ages out a child
  • NWK_END_DEVICE_LEAVE_TIMEOUT: Further time for which a leave request will be queued for children who have unknowingly aged out
  • END_DEV_TIMEOUT_VALUE: Timeout value for child aging as sent by the end device during the NWK association’s end device timeout request

Base Device Behavior

Location: Stack/bdb/bdb.h

  • TCLK_POLL_RATE: Poll rate for the Trust Center link key exchange process
  • BDB_DEFAULT_TC_LINK_KEY_EXCHANGE_ATTEMPS_MAX: Number of times a device will attempt a link key exchange with the trust center
  • BDBC_TC_LINK_KEY_EXANGE_TIMEOUT: Time before link exchange fails, at which point the device will try again if attempts remain

Location: Stack/bdb/bdb_interface.h

  • BDBC_MIN_COMMISSIONING_TIME: Length of time to commission the network for which permit join is enabled, a maximum of 254 seconds is required in accordance with Zigbee 2015 and later specification
  • BDB_INSTALL_CODE_USE: Defines which method of install code is used if enabled
  • BDB_DEFAULT_JOIN_USES_INSTALL_CODE_KEY: Enables install codes if set to TRUE
  • BDB_DEFAULT_TC_REQUIRE_KEY_EXCHANGE: Leave FALSE to allow pre-Zigbee 3 devices to join the network

Other Parameters

  • Stack/zdo/zd_sec_mgr.hZDSECMGR_TC_DEVICE_MAX: Maximum number of unique trust center link keys supported (and therefore Zigbee 3 devices allowed) in the network

Determining Project Build Size

Project options such as device type (ZC, ZR, ZED, ZNP), features (OTA, UART, etc), and the network configurations provided above will affect the flash and RAM space required to build the application. In order to understand this dependency, it is possible to refer to the MAP file generated after building a Z-Stack project. For CCS this is the MEMORY CONFIGURATION section at the top of the MAP file located inside the default folder, where total Flash is equivalent to the total of the FLASH, FLASH_NV, and FLASH_LAST used rows. With IAR it is the Grand Total at the bottom of the MAP file found within the Output folder by adding the code, ro data, and rw data columns.