Starting the Coordinator

The Coordinator must be the first node to be started. This node is pre-configured using the ZPS Configuration Editor. The functions that must be called in the Coordinator application to initialize the node are those listed at the start of this (Section 6.1).

Once the stack has been started using zps_eAplZdoStartStack(), the Coordinator works through the following process to establish a network:

Setting the radio channel for the network

The choice of 2.4-GHz band channel for the network is pre-configured via the the ZPS Configuration Editor (see Section 13.4.3). It is either a fixed channel in the range 11-26 or a set of channels from which the best channel is selected by the Coordinator. In the latter case, the Coordinator performs an energy scan of the possible channels and chooses the quietest channel.

Parent topic:Starting the Coordinator

Setting the Extended PAN ID for the network

The 64-bit Extended PAN ID (EPID) for the network is obtained as follows:

  • A pre-configured value may be set in the advanced device parameter APS Use Extended PAN IDin the ZPS Configuration Editor (see Section 13.4.4).

  • If the pre-set value is zero, the Coordinator uses its own IEEE/MAC address as the EPID.

Note: The application might override the EPID value set by the ZPS Configuration Editor by calling zps_eAplAibSetApsUseExtendedPanId() before calling zps_eAplZdoStartStack().

Parent topic:Starting the Coordinator

Accepting join requests from other devices (if enabled)

The Coordinator may now allow other devices (Routers and End Devices) to join the network as its children, enabling the network to grow. A maximum number of (direct) children of the Coordinator is pre-set via the advanced network parameters Active Neighbor Table Sizeand Child Table Sizein the ZPS Configuration Editor (see Section 13.4.4, Setting advanced device parameters), beyond which the Coordinator does not accept any further join requests from prospective children.

Note:

The initial ‘permit joining’ status is pre-set via the Coordinator parameter Permit Joining Time in the ZPS Configuration Editor.

If this is initially disabled, the Coordinator may not accept children until joining has been enabled using zps_eAplZdoPermitJoining().

However, the ‘permit joining’ status is ignored during a join in which the pre-set EPID on the joining device is non-zero and during any rejoin (see Section 6.6.2). The above function can be used at any time to allow joinings for a limited time-period or indefinitely, and can also be used to disable joinings.

Once the Coordinator (and therefore network) has started, the stack event zps_EVENT_NWK_STARTED is generated on the device. If the Coordinator fails to start, the stack event zps_EVENT_NWK_FAILED_TO_START is generated.

When a node joins the Coordinator, the stack event zps_EVENT_NWK_NEW_NODE_HAS_JOINED is generated on the Coordinator.

Parent topic:Starting the Coordinator

Parent topic:Forming and joining a network