Host EZSP layer.

Provides functions that allow the Host application to send every EZSP command to the NCP.

Commands to send to the serial>ASH layers all are named ezsp${CommandName}. They do nothing but build the command, send it and return the value(s). Callers are expected to handle errors appropriately.

  • They will throw EzspStatus if sendCommand fails or the returned value(s) by NCP are invalid (wrong length, etc).
  • Most will return EmberStatus given by NCP (some EzspStatus, some SLStatus...).

Hierarchy

Constructors

Properties

Accessors

Methods

callbackDispatch checkConnection ezspAddChild ezspAddEndpoint ezspAddressTableEntryIsActive ezspAesEncrypt ezspAesMmoHash ezspApsCryptMessage ezspBindingIsActive ezspBootloadTransmitCompleteHandler ezspBroadcastNetworkKeySwitch ezspBroadcastNextNetworkKey ezspCalculateSmacs ezspCalculateSmacs283k1 ezspCalculateSmacsHandler ezspCalculateSmacsHandler283k1 ezspCallback ezspCheckKeyContext ezspChildId ezspChildIndex ezspChildJoinHandler ezspChilPower ezspClearBindingTable ezspClearKeyTable ezspClearMessageFlag ezspClearStoredBeacons ezspClearTemporaryDataMaybeStoreLinkKey ezspClearTemporaryDataMaybeStoreLinkKey283k1 ezspClearTransientLinkKeys ezspConcentratorNoteRouteError ezspConcentratorStartDiscovery ezspConcentratorStopDiscovery ezspCounterRequiresDestinationNodeId ezspCounterRequiresPhyIndex ezspCounterRolloverHandler ezspCurrentStackTasks ezspCustomFrame ezspCustomFrameHandler ezspDebugWrite ezspDelayTest ezspDeleteBinding ezspDGpSend ezspDGpSentHandler ezspDsaSignHandler ezspDsaVerify ezspDsaVerify283k1 ezspDsaVerifyHandler ezspDutyCycleHandler ezspEcho ezspEnergyScanRequest ezspEnergyScanResultHandler ezspEraseKeyTableEntry ezspErrorHandler ezspExportKey ezspExportLinkKeyByEui ezspExportLinkKeyByIndex ezspExportTransientKeyByEui ezspExportTransientKeyByIndex ezspFindAndRejoinNetwork ezspFindKeyTableEntry ezspFindUnusedPanId ezspFormNetwork ezspGenerateCbkeKeys ezspGenerateCbkeKeys283k1 ezspGenerateCbkeKeysHandler ezspGenerateCbkeKeysHandler283k1 ezspGetAddressTableInfo ezspGetApsKeyInfo ezspGetBeaconClassificationParams ezspGetBinding ezspGetBindingRemoteNodeId ezspGetCertificate ezspGetCertificate283k1 ezspGetChildData ezspGetConfigurationValue ezspGetCurrentDutyCycle ezspGetCurrentNetwork ezspGetCurrentSecurityState ezspGetDutyCycleLimits ezspGetDutyCycleState ezspGetEndpoint ezspGetEndpointCluster ezspGetEndpointCount ezspGetEndpointDescription ezspGetEndpointFlags ezspGetEui64 ezspGetExtendedPanId ezspGetExtendedSecurityBitmask ezspGetExtendedTimeout ezspGetExtendedValue ezspGetInitialNeighborOutgoingCost ezspGetLastLeaveReason ezspGetLastRejoinReason ezspGetLibraryStatus ezspGetManufacturerCode ezspGetMaxMacRetries ezspGetMfgToken ezspGetMulticastTableEntry ezspGetNeighbor ezspGetNeighborFrameCounter ezspGetNetworkKeyInfo ezspGetNetworkParameters ezspGetNodeId ezspGetNumStoredBeacons ezspGetParentChildParameters ezspGetParentIncomingNwkFrameCounter ezspGetPermitJoining ezspGetPhyInterfaceCount ezspGetPolicy ezspGetRadioChannel ezspGetRadioParameters ezspGetRandomNumber ezspGetRouteTableEntry ezspGetRoutingShortcutThreshold ezspGetSourceRouteOverhead ezspGetSourceRouteTableEntry ezspGetSourceRouteTableFilledSize ezspGetSourceRouteTableTotalSize ezspGetStandaloneBootloaderVersionPlatMicroPhy ezspGetStoredBeacon ezspGetTimer ezspGetToken ezspGetTokenCount ezspGetTokenData ezspGetTokenInfo ezspGetTrueRandomEntropySource ezspGetValue ezspGetVersionStruct ezspGetXncpInfo ezspGetZllPrimaryChannelMask ezspGetZllSecondaryChannelMask ezspGpepIncomingMessageHandler ezspGpProxyTableGetEntry ezspGpProxyTableLookup ezspGpProxyTableProcessGpPairing ezspGpSecurityTestVectors ezspGpSinkCommission ezspGpSinkTableClearAll ezspGpSinkTableFindOrAllocateEntry ezspGpSinkTableGetEntry ezspGpSinkTableGetNumberOfActiveEntries ezspGpSinkTableInit ezspGpSinkTableLookup ezspGpSinkTableRemoveEntry ezspGpSinkTableSetEntry ezspGpSinkTableSetSecurityFrameCounter ezspGpTranslationTableClear ezspIdConflictHandler ezspImportKey ezspImportLinkKey ezspImportTransientKey ezspIncomingBootloadMessageHandler ezspIncomingManyToOneRouteRequestHandler ezspIncomingMessageHandler ezspIncomingMfgTestMessageHandler ezspIncomingNetworkStatusHandler ezspIncomingRouteErrorHandler ezspIncomingRouteRecordHandler ezspIsResetRejoiningNeighborsFrameCounterEnabled ezspIsZllNetwork ezspJoinNetwork ezspJoinNetworkDirectly ezspLaunchStandaloneBootloader ezspLeaveNetwork ezspLookupEui64ByNodeId ezspLookupNodeIdByEui64 ezspMacFilterMatchMessageHandler ezspMacPassthroughMessageHandler ezspMaxChildCount ezspMaximumPayloadLength ezspMaxRouterChildCount ezspMessageSentHandler ezspMfglibRxHandler ezspMfgTestSendCommand ezspMfgTestSendEui64 ezspMfgTestSendManufacturingString ezspMfgTestSendRadioParameters ezspMfgTestSendRebootCommand ezspMfgTestSetPacketMode ezspMultiPhySetRadioChannel ezspMultiPhySetRadioPower ezspMultiPhyStart ezspMultiPhyStop ezspNeighborCount ezspNetworkFoundHandler ezspNetworkInit ezspNetworkState ezspNoCallbacks ezspNop ezspOkToHibernate ezspOkToLongPoll ezspOkToNap ezspParentTokenSet ezspPendingAckedMessages ezspPermitJoining ezspPollCompleteHandler ezspPollForData ezspPollHandler ezspProxyNextBroadcastFromLong ezspRadioGetSchedulerPriorities ezspRadioGetSchedulerSliptime ezspRadioSetSchedulerPriorities ezspRadioSetSchedulerSliptime ezspRawTransmitCompleteHandler ezspReadAndClearCounters ezspReadAttribute ezspReadCounters ezspRemoteDeleteBindingHandler ezspRemoteSetBindingHandler ezspRemoveChild ezspRemoveDevice ezspRemoveNeighbor ezspReplaceAddressTableEntry ezspRequestLinkKey ezspRescheduleLinkStatusMsg ezspResetNode ezspResetRejoiningNeighborsFrameCounter ezspRouterChildCount ezspSavePreinstalledCbkeData283k1 ezspScanCompleteHandler ezspSendBootloadMessage ezspSendBroadcast ezspSendLinkPowerDeltaRequest ezspSendManyToOneRouteRequest ezspSendMulticast ezspSendPanIdUpdate ezspSendRawMessage ezspSendReply ezspSendTrustCenterLinkKey ezspSendUnicast ezspSendZigbeeLeave ezspSetAddressTableInfo ezspSetAPSFrameCounter ezspSetBeaconClassificationParams ezspSetBinding ezspSetBindingRemoteNodeId ezspSetBrokenRouteErrorCode ezspSetChildData ezspSetChildPower ezspSetConcentrator ezspSetConfigurationValue ezspSetDutyCycleLimitsInStack ezspSetEndpointFlags ezspSetExtendedSecurityBitmask ezspSetExtendedTimeout ezspSetIncomingTcLinkKeyFrameCounter ezspSetInitialNeighborOutgoingCost ezspSetInitialSecurityState ezspSetLogicalAndRadioChannel ezspSetMacPollFailureWaitTime ezspSetManufacturerCode ezspSetMessageFlag ezspSetMfgToken ezspSetMulticastTableEntry ezspSetNeighborFrameCounter ezspSetNumBeaconToStore ezspSetNWKFrameCounter ezspSetNwkUpdateId ezspSetParentIncomingNwkFrameCounter ezspSetPassiveAckConfig ezspSetPendingNetworkUpdatePanId ezspSetPolicy ezspSetPowerDescriptor ezspSetPreinstalledCbkeData ezspSetRadioChannel ezspSetRadioIeee802154CcaMode ezspSetRadioPower ezspSetRoutingShortcutThreshold ezspSetSourceRouteDiscoveryMode ezspSetTimer ezspSetToken ezspSetTokenData ezspSetupDelayedJoin ezspSetValue ezspSetZllAdditionalState ezspSetZllNodeType ezspSetZllPrimaryChannelMask ezspSetZllSecondaryChannelMask ezspSleepyToSleepyNetworkStart ezspStackPowerDown ezspStackPowerUp ezspStackStatusHandler ezspStackTokenChangedHandler ezspStartScan ezspStartWritingStackTokens ezspStopScan ezspStopWritingStackTokens ezspSwitchNetworkKeyHandler ezspTimerHandler ezspTokenFactoryReset ezspTrustCenterJoinHandler ezspUnicastCurrentNetworkKey ezspUnicastNwkKeyUpdate ezspUnusedPanIdFoundHandler ezspUpdateTcLinkKey ezspVersion ezspWriteAttribute ezspWriteNodeData ezspZigbeeKeyEstablishmentHandler ezspZllAddressAssignmentHandler ezspZllClearTokens ezspZllGetRadioIdleMode ezspZllGetTokens ezspZllNetworkFoundHandler ezspZllNetworkOps ezspZllOperationInProgress ezspZllRxOnWhenIdleGetActive ezspZllScanCompleteHandler ezspZllScanningComplete ezspZllSetDataToken ezspZllSetInitialSecurityState ezspZllSetNonZllNetwork ezspZllSetRadioIdleMode ezspZllSetRxOnWhenIdle ezspZllSetSecurityStateWithoutKey ezspZllStartScan ezspZllTouchLinkTargetHandler mfglibInternalEnd mfglibInternalGetChannel mfglibInternalGetPower mfglibInternalSendPacket mfglibInternalSetChannel mfglibInternalSetPower mfglibInternalStart mfglibInternalStartStream mfglibInternalStartTone mfglibInternalStopStream mfglibInternalStopTone send setProtocolVersion start stop validateReceivedFrame

Constructors

Properties

ash: UartAsh
counterErrQueueFull: number

Counter for Queue Full errors

Accessors

  • get callbackFrameToString(): string
  • Create a string representation of the last received callback frame in storage.

    Returns string

  • get pendingResponseCount(): number
  • Returns the number of EZSP responses that have been received by the serial protocol and are ready to be collected by the EZSP layer via responseReceived().

    Returns number

Methods

  • Add a child to the child/neighbor table only on SoC, allowing direct manipulation of these tables by the application. This can affect the network functionality, and needs to be used wisely. If used appropriately, the application can maintain more than the maximum of children provided by the stack.

    Parameters

    • shortId: number

      The preferred short ID of the node.

    • longId: `0x${string}`

      The long ID of the node.

    • nodeType: EmberNodeType

      The nodetype e.g., SL_ZIGBEE_ROUTER defining, if this would be added to the child table or neighbor table.

    Returns Promise<SLStatus>

    • SLStatus.OK - This node has been successfully added.
    • SLStatus.FAIL - The child was not added to the child/neighbor table.
  • Configures endpoint information on the NCP. The NCP does not remember these settings after a reset. Endpoints can be added by the Host after the NCP has reset. Once the status of the stack changes to EMBER_NETWORK_UP, endpoints can no longer be added and this command will respond with EzspStatus.ERROR_INVALID_CALL.

    Parameters

    • endpoint: number

      uint8_t The application endpoint to be added.

    • profileId: number

      uint16_t The endpoint's application profile.

    • deviceId: number

      uint16_t The endpoint's device ID within the application profile.

    • deviceVersion: number

      uint8_t The endpoint's device version.

    • inputClusterList: number[]

      uint16_t * Input cluster IDs the endpoint will accept.

    • outputClusterList: number[]

      uint16_t * Output cluster IDs the endpoint may send.

    Returns Promise<SLStatus>

    • SLStatus.OK if the endpoint was added,
    • SLStatus.ZIGBEE_EZSP_ERROR if there is not enough memory available to add the endpoint, if the endpoint already exists, if endpoints can no longer be added.
  • Indicates whether any messages are currently being sent using this address table entry. Note that this function does not indicate whether the address table entry is unused. To determine whether an address table entry is unused, check the remote node ID. The remote node ID will have the value EMBER_TABLE_ENTRY_UNUSED_NODE_ID when the address table entry is not in use.

    Parameters

    • addressTableIndex: number

    Returns Promise<boolean>

    True if the address table entry is active, false otherwise.

  • Perform AES encryption on plaintext using key.

    Parameters

    • plaintext: number[]
    • key: number[]

    Returns Promise<number[]>

    uint8_t * 16 bytes of ciphertext.

  • This routine processes the passed chunk of data and updates the hash context based on it. If the 'finalize' parameter is not set, then the length of the data passed in must be a multiple of 16. If the 'finalize' parameter is set then the length can be any value up 1-16, and the final hash value will be calculated.

    Parameters

    • context: EmberAesMmoHashContext

      EmberAesMmoHashContext * The hash context to update.

    • finalize: boolean

      This indicates whether the final hash value should be calculated

    • data: Buffer

      uint8_t * The data to hash.

    Returns Promise<[SLStatus, returnContext: EmberAesMmoHashContext]>

    The result of the operation

  • Encrypt/decrypt a message in-place using APS.

    Parameters

    • encrypt: boolean

      Encrypt (true) or decrypt (false) the message.

    • lengthCombinedArg: number

      uint8_t Length of the array containing message, needs to be long enough to include the auxiliary header and MIC.

    • message: Buffer

      uint8_t * The message to be en/de-crypted.

    • apsHeaderEndIndex: number

      uint8_t Index just past the APS frame.

    • remoteEui64: `0x${string}`

      IEEE address of the device this message is associated with.

    Returns Promise<[SLStatus, cryptedMessage: Buffer]>

    Status of the encryption/decryption call.

  • Indicates whether any messages are currently being sent using this binding table entry. Note that this command does not indicate whether a binding is clear. To determine whether a binding is clear, check whether the type field of the EmberBindingTableEntry has the value EMBER_UNUSED_BINDING.

    Parameters

    • index: number

      uint8_t The index of a binding table entry.

    Returns Promise<boolean>

    True if the binding table entry is active, false otherwise.

  • Callback A callback invoked by the EmberZNet stack when the MAC has finished transmitting a bootload message.

    Parameters

    • status: SLStatus

      An EmberStatus value of SLStatus.OK if an ACK was received from the destination or SLStatus.ZIGBEE_DELIVERY_FAILED if no ACK was received.

    • messageContents: Buffer

      uint8_t * The message that was sent.

    Returns void

  • This function broadcasts a switch key message to tell all nodes to change to the sequence number of the previously sent Alternate Encryption Key.

    Returns Promise<SLStatus>

    SLStatus value that indicates the success or failure of the command.

  • This function broadcasts a new encryption key, but does not tell the nodes in the network to start using it. To tell nodes to switch to the new key, use ezspBroadcastNetworkKeySwitch(). This is only valid for the Trust Center/Coordinator. It is up to the application to determine how quickly to send the Switch Key after sending the alternate encryption key.

    Parameters

    • key: EmberKeyData

      EmberKeyData * An optional pointer to a 16-byte encryption key (EMBER_ENCRYPTION_KEY_SIZE). An all zero key may be passed in, which will cause the stack to randomly generate a new key.

    Returns Promise<SLStatus>

    SLStatus value that indicates the success or failure of the command.

  • Calculates the SMAC verification keys for both the initiator and responder roles of CBKE using the passed parameters and the stored public/private key pair previously generated with ezspGenerateKeysRetrieveCert(). It also stores the unverified link key data in temporary storage on the NCP until the key establishment is complete.

    Parameters

    • amInitiator: boolean

      The role of this device in the Key Establishment protocol.

    • partnerCertificate: EmberCertificateData

      EmberCertificateData * The key establishment partner's implicit certificate.

    • partnerEphemeralPublicKey: EmberPublicKeyData

      EmberPublicKeyData * The key establishment partner's ephemeral public key

    Returns Promise<SLStatus>

  • Calculates the SMAC verification keys for both the initiator and responder roles of CBKE for the 283k1 ECC curve using the passed parameters and the stored public/private key pair previously generated with ezspGenerateKeysRetrieveCert283k1(). It also stores the unverified link key data in temporary storage on the NCP until the key establishment is complete.

    Parameters

    • amInitiator: boolean

      The role of this device in the Key Establishment protocol.

    • partnerCertificate: EmberCertificate283k1Data

      EmberCertificate283k1Data * The key establishment partner's implicit certificate.

    • partnerEphemeralPublicKey: EmberPublicKey283k1Data

      EmberPublicKey283k1Data * The key establishment partner's ephemeral public key

    Returns Promise<SLStatus>

  • Callback A callback to indicate that the NCP has finished calculating the Secure Message Authentication Codes (SMAC) for both the initiator and responder. The associated link key is kept in temporary storage until the host tells the NCP to store or discard the key via emberClearTemporaryDataMaybeStoreLinkKey().

    Parameters

    • status: SLStatus

      The Result of the CBKE operation.

    • initiatorSmac: EmberSmacData

      EmberSmacData * The calculated value of the initiator's SMAC

    • responderSmac: EmberSmacData

      EmberSmacData * The calculated value of the responder's SMAC

    Returns void

  • Callback A callback to indicate that the NCP has finished calculating the Secure Message Authentication Codes (SMAC) for both the initiator and responder for the CBKE 283k1 Library. The associated link key is kept in temporary storage until the host tells the NCP to store or discard the key via emberClearTemporaryDataMaybeStoreLinkKey().

    Parameters

    • status: SLStatus

      The Result of the CBKE operation.

    • initiatorSmac: EmberSmacData

      EmberSmacData * The calculated value of the initiator's SMAC

    • responderSmac: EmberSmacData

      EmberSmacData * The calculated value of the responder's SMAC

    Returns void

  • Convert a child index to a node ID

    Parameters

    • childIndex: number

      uint8_t The index of the child of interest in the child table. Possible indexes range from zero to EMBER_CHILD_TABLE_SIZE.

    Returns Promise<number>

    The node ID of the child or EMBER_NULL_NODE_ID if there isn't a child at the childIndex specified

  • Convert a node ID to a child index

    Parameters

    • childId: number

      The node ID of the child

    Returns Promise<number>

    uint8_t The child index or 0xFF if the node ID doesn't belong to a child

  • Callback Indicates that a child has joined or left.

    Parameters

    • index: number

      uint8_t The index of the child of interest.

    • joining: boolean

      True if the child is joining. False the child is leaving.

    • childId: number

      The node ID of the child.

    • childEui64: `0x${string}`

      The EUI64 of the child.

    • childType: EmberNodeType

      The node type of the child.

    Returns void

  • Return radio power value of the child from the given childIndex

    Parameters

    • childIndex: number

      uint8_t The index of the child of interest in the child table. Possible indexes range from zero to SL_ZIGBEE_CHILD_TABLE_SIZE.

    Returns Promise<number>

    The power of the child or maximum radio power, which is the power value provided by the user while forming/joining a network if there isn't a child at the childIndex specified

  • Clear a flag to indicate that there are no more messages for a child. The next time the child polls, it will be informed that it does not have any pending messages.

    Parameters

    • childId: number

      The ID of the child that no longer has pending messages.

    Returns Promise<SLStatus>

    • SLStatus.OK - The next time that the child polls, it will be informed that it does not have any pending messages.
    • SLStatus.NOT_JOINED - The child identified by childId is not our child.
  • Clears all cached beacons that have been collected from a scan.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure. Always OK in v13-.

  • Clears the temporary data associated with CBKE and the key establishment, most notably the ephemeral public/private key pair. If storeLinKey is true it moves the unverified link key stored in temporary storage into the link key table. Otherwise it discards the key.

    Parameters

    • storeLinkKey: boolean

      A bool indicating whether to store (true) or discard (false) the unverified link key derived when ezspCalculateSmacs() was previously called.

    Returns Promise<SLStatus>

  • Clears the temporary data associated with CBKE and the key establishment, most notably the ephemeral public/private key pair. If storeLinKey is true it moves the unverified link key stored in temporary storage into the link key table. Otherwise it discards the key.

    Parameters

    • storeLinkKey: boolean

      A bool indicating whether to store (true) or discard (false) the unverified link key derived when ezspCalculateSmacs() was previously called.

    Returns Promise<SLStatus>

  • Starts periodic many-to-one route discovery. Periodic discovery is started by default on bootup, but this function may be used if discovery has been stopped by a call to ::ezspConcentratorStopDiscovery().

    Returns Promise<void>

  • Check if a particular counter can report on the destination node ID they have been triggered from.

    Parameters

    Returns Promise<boolean>

    Whether this counter requires the destination node ID.

  • Check if a particular counter is one that could report from either a 2.4GHz or sub-GHz interface.

    Parameters

    Returns Promise<boolean>

    Whether this counter requires a PHY index when operating on a dual-PHY system.

  • Return a bitmask indicating the stack's current tasks. The mask ::SL_ZIGBEE_HIGH_PRIORITY_TASKS defines which tasks are high priority. Devices should not sleep if any high priority tasks are active. Active tasks that are not high priority are waiting for messages to arrive from other devices. If there are active tasks, but no high priority ones, the device may sleep but should periodically wake up and call ::emberPollForData() in order to receive messages. Parents will hold messages for ::SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT milliseconds before discarding them.

    Returns Promise<number>

    A bitmask of the stack's active tasks.

  • Provides the customer a custom EZSP frame. On the NCP, these frames are only handled if the XNCP library is included. On the NCP side these frames are handled in the emberXNcpIncomingCustomEzspMessageCallback() callback function.

    Parameters

    • payload: Buffer
    • replyLength: number

    Returns Promise<[SLStatus, outReply: Buffer]>

    The status returned by the custom command.

  • Callback A callback indicating a custom EZSP message has been received.

    Parameters

    • payload: Buffer

      uint8_t * The payload of the custom frame.

    Returns void

  • Sends a debug message from the Host to the Network Analyzer utility via the NCP.

    Parameters

    • binaryMessage: boolean

      true if the message should be interpreted as binary data, false if the message should be interpreted as ASCII text.

    • messageContents: Buffer

      uint8_t * The binary message.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Used to test that UART flow control is working correctly.

    Parameters

    • delay: number

      uint16_t Data will not be read from the host for this many milliseconds.

    Returns Promise<void>

  • Deletes a binding table entry.

    Parameters

    • index: number

      uint8_t The index of a binding table entry.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Adds/removes an entry from the GP Tx Queue.

    Parameters

    • action: boolean

      The action to perform on the GP TX queue (true to add, false to remove).

    • useCca: boolean

      Whether to use ClearChannelAssessment when transmitting the GPDF.

    • addr: EmberGpAddress

      EmberGpAddress * The Address of the destination GPD.

    • gpdCommandId: number

      uint8_t The GPD command ID to send.

    • gpdAsdu: Buffer

      uint8_t * The GP command payload.

    • gpepHandle: number

      uint8_t The handle to refer to the GPDF.

    • gpTxQueueEntryLifetimeMs: number

      uint16_t How long to keep the GPDF in the TX Queue.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Callback A callback to the GP endpoint to indicate the result of the GPDF transmission.

    Parameters

    • status: SLStatus

      An SLStatus value indicating success or the reason for failure.

    • gpepHandle: number

      uint8_t The handle of the GPDF.

    Returns void

  • Callback The handler that returns the results of the signing operation. On success, the signature will be appended to the original message (including the signature type indicator that replaced the startIndex field for the signing) and both are returned via this callback.

    Parameters

    • status: SLStatus

      The result of the DSA signing operation.

    • messageContents: Buffer

      uint8_t *The message and attached which includes the original message and the appended signature.

    Returns void

  • Verify that signature of the associated message digest was signed by the private key of the associated certificate.

    Parameters

    • digest: EmberMessageDigest

      EmberMessageDigest * The AES-MMO message digest of the signed data. If dsaSign command was used to generate the signature for this data, the final byte (replaced by signature type of 0x01) in the messageContents array passed to dsaSign is included in the hash context used for the digest calculation.

    • signerCertificate: EmberCertificateData

      EmberCertificateData * The certificate of the signer. Note that the signer's certificate and the verifier's certificate must both be issued by the same Certificate Authority, so they should share the same CA Public Key.

    • receivedSig: EmberSignatureData

      EmberSignatureData * The signature of the signed data.

    Returns Promise<SLStatus>

  • Verify that signature of the associated message digest was signed by the private key of the associated certificate.

    Parameters

    • digest: EmberMessageDigest

      EmberMessageDigest * The AES-MMO message digest of the signed data. If dsaSign command was used to generate the signature for this data, the final byte (replaced by signature type of 0x01) in the messageContents array passed to dsaSign is included in the hash context used for the digest calculation.

    • signerCertificate: EmberCertificate283k1Data

      EmberCertificate283k1Data * The certificate of the signer. Note that the signer's certificate and the verifier's certificate must both be issued by the same Certificate Authority, so they should share the same CA Public Key.

    • receivedSig: EmberSignature283k1Data

      EmberSignature283k1Data * The signature of the signed data.

    Returns Promise<SLStatus>

  • Callback This callback is executed by the stack when the DSA verification has completed and has a result. If the result is EMBER_SUCCESS, the signature is valid. If the result is EMBER_SIGNATURE_VERIFY_FAILURE then the signature is invalid. If the result is anything else then the signature verify operation failed and the validity is unknown.

    Parameters

    • status: SLStatus

      The result of the DSA verification operation.

    Returns void

  • Callback Callback fires when the duty cycle state has changed

    Parameters

    • channelPage: number

      uint8_t The channel page whose duty cycle state has changed.

    • channel: number

      uint8_t The channel number whose duty cycle state has changed.

    • state: EmberDutyCycleState

      The current duty cycle state.

    • totalDevices: number

      uint8_t The total number of connected end devices that are being monitored for duty cycle.

    • arrayOfDeviceDutyCycles: EmberPerDeviceDutyCycle[]

      EmberPerDeviceDutyCycle * Consumed duty cycles of end devices that are being monitored. The first entry always be the local stack's nodeId, and thus the total aggregate duty cycle for the device.

    Returns void

  • Variable length data from the Host is echoed back by the NCP. This command has no other effects and is designed for testing the link between the Host and NCP.

    Parameters

    • data: Buffer

      uint8_t * The data to be echoed back.

    Returns Promise<Buffer>

    uint8_t * The echo of the data.

  • Sends a ZDO energy scan request. This request may only be sent by the current network manager and must be unicast, not broadcast. See ezsp-utils.h for related macros emberSetNetworkManagerRequest() and emberChangeChannelRequest().

    Parameters

    • target: number

      The network address of the node to perform the scan.

    • scanChannels: number

      uint32_t A mask of the channels to be scanned

    • scanDuration: number

      uint8_t How long to scan on each channel. Allowed values are 0..5, with the scan times as specified by 802.15.4 (0 = 31ms, 1 = 46ms, 2 = 77ms, 3 = 138ms, 4 = 261ms, 5 = 507ms).

    • scanCount: number

      uint16_t The number of scans to be performed on each channel (1..8).

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Callback Reports the result of an energy scan for a single channel. The scan is not complete until the scanCompleteHandler callback is called.

    Parameters

    • channel: number

      uint8_t The 802.15.4 channel number that was scanned.

    • maxRssiValue: number

      int8_t The maximum RSSI value found on the channel.

    Returns void

  • This function erases the data in the key table entry at the specified index. If the index is invalid, false is returned.

    Parameters

    • index: number

      uint8_t This indicates the index of entry to erase.

    Returns Promise<SLStatus>

    The success or failure of the operation.

  • Event from the EZSP layer indicating that the transaction with the NCP could not be completed due to a serial protocol error or that the response received from the NCP reported an error. The status parameter provides more information about the error.

    Parameters

    Returns void

  • The application may call this function when contact with the network has been lost. The most common usage case is when an end device can no longer communicate with its parent and wishes to find a new one. Another case is when a device has missed a Network Key update and no longer has the current Network Key. The stack will call ezspStackStatusHandler to indicate that the network is down, then try to re-establish contact with the network by performing an active scan, choosing a network with matching extended pan id, and sending a ZigBee network rejoin request. A second call to the ezspStackStatusHandler callback indicates either the success or the failure of the attempt. The process takes approximately 150 milliseconds per channel to complete.

    Parameters

    • haveCurrentNetworkKey: boolean

      This parameter tells the stack whether to try to use the current network key. If it has the current network key it will perform a secure rejoin (encrypted). If this fails the device should try an unsecure rejoin. If the Trust Center allows the rejoin then the current Network Key will be sent encrypted using the device's Link Key.

    • channelMask: number

      uint32_t A mask indicating the channels to be scanned. See emberStartScan for format details. A value of 0 is reinterpreted as the mask for the current channel.

    • reason: number = 0xff

      uint8_t A sl_zigbee_rejoin_reason_t variable which could be passed in if there is actually a reason for rejoin, or could be left at 0xFF

    • nodeType: number = 0

      uint8_t The rejoin could be triggered with a different nodeType. This value could be set to 0 or SL_ZIGBEE_DEVICE_TYPE_UNCHANGED if not needed.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • This function searches through the Key Table and tries to find the entry that matches the passed search criteria.

    Parameters

    • address: `0x${string}`

      The address to search for. Alternatively, all zeros may be passed in to search for the first empty entry.

    • linkKey: boolean

      This indicates whether to search for an entry that contains a link key or a master key. true means to search for an entry with a Link Key.

    Returns Promise<number>

    uint8_t This indicates the index of the entry that matches the search criteria. A value of 0xFF is returned if not matching entry is found.

  • This function starts a series of scans which will return an available panId.

    Parameters

    • channelMask: number

      uint32_t The channels that will be scanned for available panIds.

    • duration: number

      uint8_t The duration of the procedure.

    Returns Promise<SLStatus>

    The error condition that occurred during the scan. Value will be SLStatus.OK if there are no errors.

  • This call starts the generation of the ECC Ephemeral Public/Private key pair. When complete it stores the private key. The results are returned via ezspGenerateCbkeKeysHandler().

    Returns Promise<SLStatus>

  • This call starts the generation of the ECC 283k1 curve Ephemeral Public/Private key pair. When complete it stores the private key. The results are returned via ezspGenerateCbkeKeysHandler283k1().

    Returns Promise<SLStatus>

  • Callback A callback by the Crypto Engine indicating that a new ephemeral public/private key pair has been generated. The public/private key pair is stored on the NCP, but only the associated public key is returned to the host. The node's associated certificate is also returned.

    Parameters

    • status: SLStatus

      The result of the CBKE operation.

    • ephemeralPublicKey: EmberPublicKeyData

      EmberPublicKeyData * The generated ephemeral public key.

    Returns void

  • Callback A callback by the Crypto Engine indicating that a new 283k1 ephemeral public/private key pair has been generated. The public/private key pair is stored on the NCP, but only the associated public key is returned to the host. The node's associated certificate is also returned.

    Parameters

    • status: SLStatus

      The result of the CBKE operation.

    • ephemeralPublicKey: EmberPublicKey283k1Data

      EmberPublicKey283k1Data * The generated ephemeral public key.

    Returns void

  • Gets the EUI64 and short ID of an address table entry.

    Parameters

    • addressTableIndex: number

    Returns Promise<[SLStatus, nodeId: number, eui64: `0x${string}`]>

    An SLStatus value indicating success or the reason for failure.

  • Returns the node ID for the binding's destination, if the ID is known. If a message is sent using the binding and the destination's ID is not known, the stack will discover the ID by broadcasting a ZDO address request. The application can avoid the need for this discovery by using setBindingRemoteNodeId when it knows the correct ID via some other means. The destination's node ID is forgotten when the binding is changed, when the local node reboots or, much more rarely, when the destination node changes its ID in response to an ID conflict.

    Parameters

    • index: number

      uint8_t The index of a binding table entry.

    Returns Promise<number>

    The short ID of the destination node or EMBER_NULL_NODE_ID if no destination is known.

  • Reads a configuration value from the NCP.

    Parameters

    • configId: EzspConfigId

      Identifies which configuration value to read.

    Returns Promise<[SLStatus, value: number]>

    • SLStatus.OK if the value was read successfully,
    • SLStatus.ZIGBEE_EZSP_ERROR (for SL_ZIGBEE_EZSP_ERROR_INVALID_ID) if the NCP does not recognize configId.
  • Returns the duty cycle of the stack's connected children that are being monitored, up to maxDevices. It indicates the amount of overall duty cycle they have consumed (up to the suspend limit). The first entry is always the local stack's nodeId, and thus the total aggregate duty cycle for the device. The passed pointer arrayOfDeviceDutyCycles MUST have space for maxDevices.

    Parameters

    • maxDevices: number

      uint8_t Number of devices to retrieve consumed duty cycle.

    Returns Promise<[SLStatus, arrayOfDeviceDutyCycles: number[]]>

    • SLStatus.OK if the duty cycles were read successfully,
    • SLStatus.INVALID_PARAMETER maxDevices is greater than SL_ZIGBEE_MAX_END_DEVICE_CHILDREN + 1.
  • Retrieve the endpoint number located at the specified index.

    Parameters

    • index: number

      uint8_t Index to retrieve the endpoint number for.

    Returns Promise<number>

    uint8_t Endpoint number at the index.

  • Retrieve one of the cluster IDs associated with the given endpoint.

    Parameters

    • endpoint: number

      Endpoint number to get a cluster ID for.

    • listId: number

      Which list to get the cluster ID from. (0 for input, 1 for output).

    • listIndex: number

      Index from requested list to look at the cluster ID of.

    Returns Promise<number>

    ID of the requested cluster.

  • Get the number of configured endpoints.

    Returns Promise<number>

    uint8_t Number of configured endpoints.

  • Indicates whether or not the stack will extend the normal interval between retransmissions of a retried unicast message by EMBER_INDIRECT_TRANSMISSION_TIMEOUT.

    Parameters

    • remoteEui64: `0x${string}`

      The address of the node for which the timeout is to be returned.

    Returns Promise<SLStatus>

    • SLStatus.OK if the retry interval will be increased by SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT
    • SLStatus.FAIL if the normal retry interval will be used.
  • Reads a value from the NCP but passes an extra argument specific to the value being retrieved.

    Parameters

    • valueId: EzspExtendedValueId

      Identifies which extended value ID to read.

    • characteristics: number

      uint32_t Identifies which characteristics of the extended value ID to read. These are specific to the value being read.

    • valueLength: number

    Returns Promise<[SLStatus, outValueLength: number, outValue: number[]]>

    • SLStatus.OK if the value was read successfully,
    • SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize valueId, if the length of the returned value exceeds the size of local storage allocated to receive it.
  • Get initial outgoing link cost for neighbor.

    Returns Promise<number>

    The default cost associated with new neighbor's outgoing links.

  • Gets the manufacturer code to the specified value. The manufacturer code is one of the fields of the node descriptor.

    Returns Promise<number>

    The manufacturer code for the local node.

  • Returns the maximum number of no-ack retries that will be attempted

    Returns Promise<number>

    Max MAC retries

  • Retrieves a manufacturing token from the Flash Information Area of the NCP (except for EZSP_STACK_CAL_DATA which is managed by the stack).

    Parameters

    Returns Promise<[number, tokenData: number[]]>

    uint8_t The length of the tokenData parameter in bytes.

  • Returns the neighbor table entry at the given index. The number of active neighbors can be obtained using the neighborCount command.

    Parameters

    • index: number

      uint8_t The index of the neighbor of interest. Neighbors are stored in ascending order by node id, with all unused entries at the end of the table.

    Returns Promise<[SLStatus, value: EmberNeighborTableEntry]>

    • SLStatus.FAIL if the index is greater or equal to the number of active neighbors, or if the device is an end device.
    • SLStatus.OK otherwise.
  • Return EmberStatus depending on whether the frame counter of the node is found in the neighbor or child table. This function gets the last received frame counter as found in the Network Auxiliary header for the specified neighbor or child

    Parameters

    • eui64: `0x${string}`

      eui64 of the node

    Returns Promise<[SLStatus, returnFrameCounter: number]>

    • SLStatus.NOT_FOUND if the node is not found in the neighbor or child table.
    • SLStatus.OK otherwise
  • Returns the number of cached beacons that have been collected from a scan.

    Returns Promise<number>

    uint8_t The number of cached beacons that have been collected from a scan.

  • Returns information about the children of the local node and the parent of the local node.

    Returns Promise<[number, parentEui64: `0x${string}`, parentNodeId: number]>

    uint8_t The number of children the node currently has.

  • Indicate the state of permit joining in MAC.

    Returns Promise<boolean>

    Whether the current network permits joining.

  • Returns number of phy interfaces present.

    Returns Promise<number>

    uint8_t Value indicate how many phy interfaces present.

  • Allows the Host to read the policies used by the NCP to make fast decisions.

    Parameters

    Returns Promise<[SLStatus, number]>

    • SLStatus.OK if the policy was read successfully,
    • SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize policyId.
  • Gets the channel in use for sending and receiving messages.

    Returns Promise<number>

    uint8_t Current radio channel.

  • Returns the route table entry at the given index. The route table size can be obtained using the getConfigurationValue command.

    Parameters

    • index: number

      uint8_t The index of the route table entry of interest.

    Returns Promise<[SLStatus, value: EmberRouteTableEntry]>

    • SLStatus.FAIL if the index is out of range or the device is an end
    • SLStatus.OK otherwise.
  • Gets the routing shortcut threshold used to differentiate between directly using a neighbor vs. performing routing.

    Returns Promise<number>

    uint8_t The routing shortcut threshold

  • Returns information about a source route table entry

    Parameters

    • index: number

      uint8_t The index of the entry of interest in the source route table. Possible indexes range from zero to SOURCE_ROUTE_TABLE_FILLED_SIZE.

    Returns Promise<[SLStatus, destination: number, closerIndex: number]>

    • SLStatus.OK if there is source route entry at index.
    • SLStatus.NOT_FOUND if there is no source route at index.
  • Returns the number of filled entries in source route table.

    Returns Promise<number>

    uint8_t The number of filled entries in source route table.

  • Returns the source route table total size.

    Returns Promise<number>

    uint8_t Total size of source route table.

  • Detects if the standalone bootloader is installed, and if so returns the installed version. If not return 0xffff. A returned version of 0x1234 would indicate version 1.2 build 34. Also return the node's version of PLAT, MICRO and PHY.

    Returns Promise<[bootloaderVersion: number, nodePlat: number, nodeMicro: number, nodePhy: number]>

    uint16_t BOOTLOADER_INVALID_VERSION if the standalone bootloader is not present, or the version of the installed standalone bootloader.

  • Fetches the specified beacon in the cache. Beacons are stored in cache after issuing an active scan.

    Parameters

    • beaconNumber: number

      uint8_t The beacon index to fetch. Valid values range from 0 to ezspGetNumStoredBeacons-1.

    Returns Promise<[SLStatus, beacon: EmberBeaconData]>

    An appropriate SLStatus status code.

  • Gets information about a timer. The Host can use this command to find out how much longer it will be before a previously set timer will generate a callback.

    Parameters

    • timerId: number

      uint8_t Which timer to get information about (0 or 1).

    Returns Promise<[number, units: EmberEventUnits, repeat: boolean]>

    uint16_t The delay before the timerHandler callback will be generated.

  • Retrieves a token (8 bytes of non-volatile storage) from the Simulated EEPROM of the NCP.

    Parameters

    • tokenId: number

      uint8_t Which token to read

    Returns Promise<[SLStatus, tokenData: number[]]>

    An SLStatus value indicating success or the reason for failure.

  • Gets the token data for a single token with provided key

    Parameters

    • token: number

      uint32_t Key of the token in the token table for which data is needed.

    • index: number

      uint32_t Index in case of the indexed token.

    Returns Promise<[SLStatus, tokenData: EmberTokenData]>

    An SLStatus value indicating success or the reason for failure.

  • Gets the token information for a single token at provided index

    Parameters

    • index: number

      uint8_t Index of the token in the token table for which information is needed.

    Returns Promise<[SLStatus, tokenInfo: EmberTokenInfo]>

    An SLStatus value indicating success or the reason for failure.

  • Reads a value from the NCP.

    Parameters

    • valueId: EzspValueId

      Identifies which value to read.

    • valueLength: number

    Returns Promise<[SLStatus, outValueLength: number, outValue: number[]]>

    • SLStatus.OK if the value was read successfully,
    • SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize valueId, if the length of the returned value exceeds the size of local storage allocated to receive it.
  • Allows the HOST to know whether the NCP is running the XNCP library. If so, the response contains also the manufacturer ID and the version number of the XNCP application that is running on the NCP.

    Returns Promise<[SLStatus, manufacturerId: number, versionNumber: number]>

    • SLStatus.OK if the NCP is running the XNCP library.
    • SLStatus.INVALID_STATE otherwise.
  • Get the primary ZLL (touchlink) channel mask.

    Returns Promise<number>

    uint32_t The primary ZLL channel mask

  • Get the secondary ZLL (touchlink) channel mask.

    Returns Promise<number>

    uint32_t The secondary ZLL channel mask

  • Callback A callback invoked by the ZigBee GP stack when a GPDF is received.

    Parameters

    • status: EmberGPStatus

      The status of the GPDF receive.

    • gpdLink: number

      uint8_t The gpdLink value of the received GPDF.

    • sequenceNumber: number

      uint8_t The GPDF sequence number.

    • addr: EmberGpAddress

      EmberGpAddress *The address of the source GPD.

    • gpdfSecurityLevel: EmberGpSecurityLevel

      The security level of the received GPDF.

    • gpdfSecurityKeyType: EmberGpKeyType

      The securityKeyType used to decrypt/authenticate the incoming GPDF.

    • autoCommissioning: boolean

      Whether the incoming GPDF had the auto-commissioning bit set.

    • bidirectionalInfo: number

      uint8_t Bidirectional information represented in bitfields, where bit0 holds the rxAfterTx of incoming gpdf and bit1 holds if tx queue is available for outgoing gpdf.

    • gpdSecurityFrameCounter: number

      uint32_t The security frame counter of the incoming GDPF.

    • gpdCommandId: number

      uint8_t The gpdCommandId of the incoming GPDF.

    • mic: number

      uint32_t The received MIC of the GPDF.

    • proxyTableIndex: number

      uint8_tThe proxy table index of the corresponding proxy table entry to the incoming GPDF.

    • gpdCommandPayload: Buffer

      uint8_t * The GPD command payload.

    Returns void

  • Finds the index of the passed address in the gp table.

    Parameters

    Returns Promise<number>

    uint8_t The index, or 0xFF for not found

  • Update the GP Proxy table based on a GP pairing.

    Parameters

    • options: number

      uint32_t The options field of the GP Pairing command.

    • addr: EmberGpAddress

      EmberGpAddress * The target GPD.

    • commMode: number

      uint8_t The communication mode of the GP Sink.

    • sinkNetworkAddress: number

      uint16_t The network address of the GP Sink.

    • sinkGroupId: number

      uint16_t The group ID of the GP Sink.

    • assignedAlias: number

      uint16_t The alias assigned to the GPD.

    • sinkIeeeAddress: `0x${string}`

      uint8_t * The IEEE address of the GP Sink.

    • gpdKey: EmberKeyData

      EmberKeyData * The key to use for the target GPD.

    • gpdSecurityFrameCounter: number

      uint32_t The GPD security frame counter.

    • forwardingRadius: number

      uint8_t The forwarding radius.

    Returns Promise<boolean>

    Whether a GP Pairing has been created or not.

  • Puts the GPS in commissioning mode.

    Parameters

    • options: number
    • gpmAddrForSecurity: number
    • gpmAddrForPairing: number
    • sinkEndpoint: number

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Finds or allocates a sink entry

    Parameters

    • addr: EmberGpAddress

      EmberGpAddress * An EmberGpAddress struct containing a copy of the gpd address to be found.

    Returns Promise<number>

    uint8_t An index of found or allocated sink or 0xFF if failed.

  • Return number of active entries in sink table.

    Returns Promise<number>

    uint8_t Number of active entries in sink table. 0 if error.

  • Finds the index of the passed address in the gp table.

    Parameters

    Returns Promise<number>

    uint8_t The index, or 0xFF for not found

  • Removes the sink table entry stored at the passed index.

    Parameters

    • sinkIndex: number

    Returns Promise<void>

  • Retrieves the sink table entry stored at the passed index.

    Parameters

    • sinkIndex: number

      uint8_t The index of the requested sink table entry.

    • entry: EmberGpSinkTableEntry

      EmberGpSinkTableEntry * An EmberGpSinkTableEntry struct containing a copy of the sink entry to be updated.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Sets security framecounter in the sink table

    Parameters

    • index: number

      uint8_t Index to the Sink table

    • sfc: number

      uint32_t Security Frame Counter

    Returns Promise<void>

  • Callback A callback invoked by the EmberZNet stack when an id conflict is discovered, that is, two different nodes in the network were found to be using the same short id. The stack automatically removes the conflicting short id from its internal tables (address, binding, route, neighbor, and child tables). The application should discontinue any other use of the id.

    Parameters

    • id: number

      The short id for which a conflict was detected

    Returns void

  • Imports a key into security manager based on passed context.

    Parameters

    • context: SecManContext

      sl_zb_sec_man_context_t * Metadata to identify where the imported key should be stored.

    • key: EmberKeyData

      sl_zb_sec_man_key_t * The key to be imported.

    Returns Promise<SLStatus>

    The success or failure code of the operation.

  • Import an application link key into the key table.

    Parameters

    • index: number

      uint8_t Index where this key is to be imported to.

    • address: `0x${string}`

      EUI64 this key is associated with.

    • plaintextKey: EmberKeyData

      sl_zb_sec_man_key_t * The key data to be imported.

    Returns Promise<SLStatus>

    Status of key import operation.

  • Import a transient link key.

    Parameters

    • eui64: `0x${string}`

      EUI64 associated with this transient key.

    • plaintextKey: EmberKeyData

      sl_zb_sec_man_key_t * The key to import.

    • flags: SecManFlag = SecManFlag.NONE

      sl_zigbee_sec_man_flags_t (unused in v14+) Flags associated with this transient key.

    Returns Promise<SLStatus>

    Status of key import operation.

  • Callback A callback invoked by the EmberZNet stack when a bootload message is received.

    Parameters

    • longId: `0x${string}`

      The EUI64 of the sending node.

    • packetInfo: EmberRxPacketInfo

      Information about the incoming packet.

    • messageContents: Buffer

      uint8_t *The bootload message that was sent.

    Returns void

  • Callback A callback indicating that a many-to-one route to the concentrator with the given short and long id is available for use.

    Parameters

    • source: number
    • longId: `0x${string}`

      The EUI64 of the concentrator.

    • cost: number

      uint8_t The path cost to the concentrator. The cost may decrease as additional route request packets for this discovery arrive, but the callback is made only once.

    Returns void

  • Callback A callback indicating a message has been received.

    Parameters

    • type: EmberIncomingMessageType

      The type of the incoming message. One of the following: EMBER_INCOMING_UNICAST, EMBER_INCOMING_UNICAST_REPLY, EMBER_INCOMING_MULTICAST, EMBER_INCOMING_MULTICAST_LOOPBACK, EMBER_INCOMING_BROADCAST, EMBER_INCOMING_BROADCAST_LOOPBACK

    • apsFrame: EmberApsFrame

      EmberApsFrame * The APS frame from the incoming message.

    • packetInfo: EmberRxPacketInfo

      Miscellanous message information.

    • messageContents: Buffer

      uint8_t * The incoming message.

    Returns void

  • Callback A callback to be implemented on the Golden Node to process acknowledgements. If you supply a custom version of this handler, you must define SL_ZIGBEE_APPLICATION_HAS_INCOMING_MFG_TEST_MESSAGE_HANDLER in your application's CONFIGURATION_HEADER

    Parameters

    • messageType: number

      uint8_t The type of the incoming message. Currently, the only possibility is MFG_TEST_TYPE_ACK.

    • messageContents: Buffer

    Returns void

  • Callback A callback invoked when a network status/route error message is received. The error indicates that there was a problem sending/receiving messages from the target node.

    Note: Network analyzer may flag this message as "route error" which is the old name for the "network status" command.

    This handler is a superset of ezspIncomingRouteErrorHandler. The old API was only invoking the handler for a couple of the possible error codes and these were being translated into EmberStatus.

    Parameters

    • errorCode: EmberStackError

      uint8_t One byte over-the-air error code from network status message

    • target: number

      The short ID of the remote node

    Returns void

  • Callback A callback invoked when a route error message is received. The error indicates that a problem routing to or from the target node was encountered.

    A status of ::EMBER_SOURCE_ROUTE_FAILURE indicates that a source-routed unicast sent from this node encountered a broken link. Note that this case occurs only if this node is a concentrator using many-to-one routing for inbound messages and source-routing for outbound messages. The node prior to the broken link generated the route error message and returned it to us along the many-to-one route.

    A status of ::EMBER_MANY_TO_ONE_ROUTE_FAILURE also occurs only if the local device is a concentrator, and indicates that a unicast sent to the local device along a many-to-one route encountered a broken link. The node prior to the broken link generated the route error message and forwarded it to the local device via a randomly chosen neighbor, taking advantage of the many-to-one nature of the route.

    A status of ::EMBER_MAC_INDIRECT_TIMEOUT indicates that a message sent to the target end device could not be delivered by the parent because the indirect transaction timer expired. Upon receipt of the route error, the stack sets the extended timeout for the target node in the address table, if present. It then calls this handler to indicate receipt of the error.

    Note that if the original unicast data message is sent using the ::EMBER_APS_OPTION_RETRY option, a new route error message is generated for each failed retry. Therefore, it is not unusual to receive three route error messages in succession for a single failed retried APS unicast. On the other hand, it is also not guaranteed that any route error messages will be delivered successfully at all. The only sure way to detect a route failure is to use retried APS messages and to check the status of the ::emberMessageSentHandler().

    Parameters

    • status: SLStatus

      ::EMBER_SOURCE_ROUTE_FAILURE, ::EMBER_MANY_TO_ONE_ROUTE_FAILURE, ::EMBER_MAC_INDIRECT_TIMEOUT

    • target: number

      The short id of the remote node.

    Returns void

  • Callback Reports the arrival of a route record command frame.

    Parameters

    • source: number
    • sourceEui: `0x${string}`
    • lastHopLqi: number

      uint8_t The link quality from the node that last relayed the route record.

    • lastHopRssi: number

      int8_t The energy level (in units of dBm) observed during the reception.

    • relayCount: number
    • relayList: number[]

      uint8_t * The route record. Each relay in the list is an uint16_t node ID. The list is passed as uint8_t * to avoid alignment problems.

    Returns void

  • Check whether a rejoining neighbor will have its incoming frame counter reset based on the currently set policy.

    Returns Promise<boolean>

    Whether or not a rejoining neighbor's incoming FC gets reset (true or false).

  • Causes the stack to associate with the network using the specified network parameters. It can take several seconds for the stack to associate with the local network. Do not send messages until the stackStatusHandler callback informs you that the stack is up.

    Parameters

    • nodeType: EmberNodeType

      Specification of the role that this node will have in the network. This role must not be EMBER_COORDINATOR. To be a coordinator, use the formNetwork command.

    • parameters: EmberNetworkParameters

      EmberNetworkParameters * Specification of the network with which the node should associate.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Causes the stack to associate with the network using the specified network parameters in the beacon parameter. It can take several seconds for the stack to associate with the local network. Do not send messages until the stackStatusHandler callback informs you that the stack is up. Unlike ::emberJoinNetwork(), this function does not issue an active scan before joining. Instead, it will cause the local node to issue a MAC Association Request directly to the specified target node. It is assumed that the beacon parameter is an artifact after issuing an active scan. (For more information, see emberGetBestBeacon and emberGetNextBeacon.)

    Parameters

    • localNodeType: EmberNodeType

      Specifies the role that this node will have in the network. This role must not be EMBER_COORDINATOR. To be a coordinator, use the formNetwork command.

    • beacon: EmberBeaconData

      EmberBeaconData * Specifies the network with which the node should associate.

    • radioTxPower: number

      int8_t The radio transmit power to use, specified in dBm.

    • clearBeaconsAfterNetworkUp: boolean

      If true, clear beacons in cache upon join success. If join fail, do nothing.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Quits the current application and launches the standalone bootloader (if installed). The function returns an error if the standalone bootloader is not present.

    Parameters

    • enabled: boolean

      If true, launch the standalone bootloader. If false, do nothing.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Causes the stack to leave the current network. This generates a stackStatusHandler callback to indicate that the network is down. The radio will not be used until after sending a formNetwork or joinNetwork command.

    Parameters

    • options: EmberLeaveNetworkOption = EmberLeaveNetworkOption.WITH_NO_OPTION

      This parameter gives options when leave network

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Returns the EUI64 that corresponds to the specified node ID. The EUI64 is found by searching through all stack tables for the specified node ID.

    Parameters

    • nodeId: number

      The short ID of the node to look up.

    Returns Promise<[SLStatus, eui64: `0x${string}`]>

    • SLStatus.OK if the EUI64 was found,
    • SLStatus.FAIL if the EUI64 is not known.
  • Returns the node ID that corresponds to the specified EUI64. The node ID is found by searching through all stack tables for the specified EUI64.

    Parameters

    • eui64: `0x${string}`

      The EUI64 of the node to look up.

    Returns Promise<number>

    The short ID of the node or SL_ZIGBEE_NULL_NODE_ID if the short ID is not known.

  • Callback A callback invoked by the EmberZNet stack when a raw MAC message that has matched one of the application's configured MAC filters.

    Parameters

    • filterIndexMatch: number

      uint8_t The index of the filter that was matched.

    • legacyPassthroughType: EmberMacPassthroughType

      The type of MAC passthrough message received.

    • packetInfo: EmberRxPacketInfo

      Information about the incoming packet.

    • messageContents: Buffer

      uint8_t * The raw message that was received.

    Returns void

  • Callback A callback invoked by the EmberZNet stack when a MAC passthrough message is received.

    Parameters

    • messageType: EmberMacPassthroughType

      The type of MAC passthrough message received.

    • packetInfo: EmberRxPacketInfo

      Information about the incoming packet.

    • messageContents: Buffer

      uint8_t * The raw message that was received.

    Returns void

  • Return the maximum number of children for this node. The return value is undefined for nodes that are not joined to a network.

    Returns Promise<number>

    The maximum number of children.

  • Returns the maximum size of the payload. The size depends on the security level in use.

    Returns Promise<number>

    uint8_t The maximum APS payload length.

  • Return the maximum number of router children for this node. The return value is undefined for nodes that are not joined to a network.

    Returns Promise<number>

    The maximum number of router children.

  • Callback A callback indicating the stack has completed sending a message.

    Parameters

    • status: SLStatus

      SL_STATUS_OK if an ACK was received from the destination

      • SL_STATUS_ZIGBEE_DELIVERY_FAILED if no ACK was received.
    • type: EmberOutgoingMessageType

      The type of message sent.

    • indexOrDestination: number

      uint16_t The destination to which the message was sent, for direct unicasts, or the address table or binding index for other unicasts. The value is unspecified for multicasts and broadcasts.

    • apsFrame: EmberApsFrame

      EmberApsFrame * The APS frame for the message.

    • messageTag: number

      uint8_t The value supplied by the Host in the ezspSendUnicast, ezspSendBroadcast or ezspSendMulticast command.

    • OptionalmessageContents: Buffer

      uint8_t * The unicast message supplied by the Host. The message contents are only included here if the decision for the messageContentsInCallback policy is messageTagAndContentsInCallback.

    Returns void

  • Callback A callback indicating a packet with a valid CRC has been received.

    Parameters

    • linkQuality: number

      uint8_t The link quality observed during the reception

    • rssi: number

      int8_t The energy level (in units of dBm) observed during the reception.

    • packetContents: Buffer

      uint8_t * The received packet (last 2 bytes are not FCS / CRC and may be discarded) Length will be greater than 3 and less than 123.

    Returns void

  • A function used in each of the manufacturing configuration API calls. Most implementations will not need to call this function directly. See mfg-test.c for more detail. This function executes only during manufacturing configuration mode and returns an error otherwise.

    Parameters

    • command: number

      A pointer to the outgoing command string.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or failure of the command.

  • A function used during manufacturing configuration on the Golden Node to set the DUT's 8-byte EUI ID. This function executes only during manufacturing configuration mode and returns an error otherwise. If successful, the DUT acknowledges the new EUI ID within 150 milliseconds.

    Parameters

    • newId: `0x${string}`

      The 8-byte EUID for the DUT.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or failure of the command.

  • A function used during manufacturing configuration on the Golden Node to set the DUT's 16-byte configuration string. This function executes only during manufacturing configuration mode and will return an error otherwise. If successful, the DUT will acknowledge the new string within 150 milliseconds.

    Parameters

    • newString: number[]

      The 16-byte manufacturing string.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or failure of the command.

  • A function used during manufacturing configuration on the Golden Node to set the DUT's radio parameters. This function executes only during manufacturing configuration mode and returns an error otherwise. If successful, the DUT acknowledges the new parameters within 25 milliseconds.

    Parameters

    • supportedBands: number

      Sets the radio band for the DUT. See ember-common.h for possible values.

    • crystalOffset: number

      Sets the CC1020 crystal offset. This parameter has no effect on the EM2420, and it may safely be set to 0 for this RFIC.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or failure of the command.

  • A function used during manufacturing configuration on the Golden Node to send the DUT a reboot command. The usual practice is to execute this command at the end of manufacturing configuration, to place the DUT into normal network operation for testing. This function executes only during manufacturing configuration mode and returns an error otherwise. If successful, the DUT acknowledges the reboot command within 20 milliseconds and then reboots.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or failure of the command.

  • A function used on the Golden Node to switch between normal network operation (for testing) and manufacturing configuration. Like emberSleep(), it may not be possible to execute this command due to pending network activity. For the transition from normal network operation to manufacturing configuration, it is customary to loop, calling this function alternately with emberTick() until the mode change succeeds.

    Parameters

    • beginConfiguration: boolean

      Determines the new mode of operation. true causes the node to enter manufacturing configuration. false causes the node to return to normal network operation.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or failure of the command.

  • Sets the channel for desired phy interface to use for sending and receiving messages. For a list of available radio pages and channels, see the technical specification for the RF communication module in your Developer Kit. Note: Care should be taken when using this API, as all devices on a network must use the same page and channel.

    Parameters

    • phyIndex: number

      uint8_t Index of phy interface. The native phy index would be always zero hence valid phy index starts from one.

    • page: number

      uint8_t Desired radio channel page.

    • channel: number

      uint8_t Desired radio channel.

    Returns Promise<SLStatus>

    An SLStatus value indicating the success or failure of the command.

  • Sets the radio output power for desired phy interface at which a node is operating. Ember radios have discrete power settings. For a list of available power settings, see the technical specification for the RF communication module in your Developer Kit. Note: Care should be taken when using this api on a running network, as it will directly impact the established link qualities neighboring nodes have with the node on which it is called. This can lead to disruption of existing routes and erratic network behavior.

    Parameters

    • phyIndex: number

      uint8_t Index of phy interface. The native phy index would be always zero hence valid phy index starts from one.

    • power: number

      int8_t Desired radio output power, in dBm.

    Returns Promise<SLStatus>

    An SLStatus value indicating the success or failure of the command.

  • This causes to initialize the desired radio interface other than native and form a new network by becoming the coordinator with same panId as native radio network.

    Parameters

    • phyIndex: number

      uint8_t Index of phy interface. The native phy index would be always zero hence valid phy index starts from one.

    • page: number

      uint8_t Desired radio channel page.

    • channel: number

      uint8_t Desired radio channel.

    • power: number

      int8_t Desired radio output power, in dBm.

    • bitmask: EmberMultiPhyNwkConfig

      Network configuration bitmask.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • This causes to bring down the radio interface other than native.

    Parameters

    • phyIndex: number

      uint8_t Index of phy interface. The native phy index would be always zero hence valid phy index starts from one.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Returns the number of active entries in the neighbor table.

    Returns Promise<number>

    uint8_t The number of active entries in the neighbor table.

  • Callback Reports that a network was found as a result of a prior call to startScan. Gives the network parameters useful for deciding which network to join.

    Parameters

    • networkFound: EmberZigbeeNetwork

      EmberZigbeeNetwork * The parameters associated with the network found.

    • lastHopLqi: number

      uint8_t The link quality from the node that generated this beacon.

    • lastHopRssi: number

      int8_t The energy level (in units of dBm) observed during the reception.

    Returns void

  • Resume network operation after a reboot. The node retains its original type. This should be called on startup whether or not the node was previously part of a network. EMBER_NOT_JOINED is returned if the node is not part of a network. This command accepts options to control the network initialization.

    Parameters

    • networkInitStruct: EmberNetworkInitStruct

      EmberNetworkInitStruct * An EmberNetworkInitStruct containing the options for initialization.

    Returns Promise<SLStatus>

    • SLStatus.OK if successful initialization,
    • SLStatus.NOT_JOINED if the node is not part of a network
    • or the reason for failure.
  • A command which does nothing. The Host can use this to set the sleep mode or to check the status of the NCP.

    Returns Promise<void>

  • Indicate whether the stack currently has any tasks pending. If no tasks are pending, ::emberTick() does not need to be called until the next time a stack API function is called. This function can only be called when the node type is ::SL_ZIGBEE_SLEEPY_END_DEVICE.

    Returns Promise<boolean>

    True if the application may sleep for as long as it wishes.

  • Indicate whether the stack is currently in a state that does not require the application to periodically poll.

    Returns Promise<boolean>

    True if the device may poll less frequently.

  • Indicate whether the stack is currently in a state where there are no high-priority tasks, allowing the device to sleep. There may be tasks expecting incoming messages, in which case the device should periodically wake up and call ::emberPollForData() in order to receive messages. This function can only be called when the node type is ::SL_ZIGBEE_SLEEPY_END_DEVICE

    Returns Promise<boolean>

    True if the application may sleep but the stack may be expecting incoming messages.

  • Indicate whether the parent token has been set by association.

    Returns Promise<boolean>

    True if the parent token has been set.

  • Indicate whether there are pending messages in the APS retry queue.

    Returns Promise<boolean>

    True if there is a pending message for this network in the APS retry queue, false if not.

  • Tells the stack to allow other nodes to join the network with this node as their parent. Joining is initially disabled by default.

    Parameters

    • duration: number

      uint8_t A value of 0x00 disables joining. A value of 0xFF enables joining. Any other value enables joining for that number of seconds.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Callback Indicates the result of a data poll to the parent of the local node.

    Parameters

    • status: SLStatus

      An SLStatus value:

      • SLStatus.OK - Data was received in response to the poll.
      • SLStatus.MAC_NO_DATA - No data was pending.
      • SLStatus.ZIGBEE_DELIVERY_FAILED - The poll message could not be sent.
      • SLStatus.MAC_NO_ACK_RECEIVED - The poll message was sent but not acknowledged by the parent.

    Returns void

  • Periodically request any pending data from our parent. Setting interval to 0 or units to EMBER_EVENT_INACTIVE will generate a single poll.

    Parameters

    • interval: number

      uint16_t The time between polls. Note that the timer clock is free running and is not synchronized with this command. This means that the time will be between interval and (interval - 1). The maximum interval is 32767.

    • units: EmberEventUnits

      The units for interval.

    • failureLimit: number

      uint8_t The number of poll failures that will be tolerated before a pollCompleteHandler callback is generated. A value of zero will result in a callback for every poll. Any status value apart from EMBER_SUCCESS and EMBER_MAC_NO_DATA is counted as a failure.

    Returns Promise<SLStatus>

    The result of sending the first poll.

  • Callback Indicates that the local node received a data poll from a child.

    Parameters

    • childId: number

      The node ID of the child that is requesting data.

    • transmitExpected: boolean

      True if transmit is expected, false otherwise.

    Returns void

  • Sends proxied broadcast message for another node in conjunction with sl_zigbee_proxy_broadcast where a long source is also specified in the NWK frame control.

    Parameters

    • euiSource: `0x${string}`

      The long source from which to send the broadcast

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Get the current multiprotocol sliptime

    Returns Promise<number>

    Value of the current slip time.

  • Set the current multiprotocol sliptime

    Parameters

    • slipTime: number

      Value of the current slip time.

    Returns Promise<void>

  • Callback A callback invoked by the EmberZNet stack when the MAC has finished transmitting a raw message.

    Parameters

    • messageContents: Buffer

      (v14+)

    • status: SLStatus

      SLStatus.OK if the transmission was successful,

      • SLStatus.ZIGBEE_DELIVERY_FAILED if not

    Returns void

  • Retrieves and clears Ember counters. See the EmberCounterType enumeration for the counter types.

    Returns Promise<number[]>

    uint16_t * A list of all counter values ordered according to the EmberCounterType enumeration.

  • Read attribute data on NCP endpoints.

    Parameters

    • endpoint: number

      uint8_t Endpoint

    • cluster: number

      uint16_t Cluster.

    • attributeId: number

      uint16_t Attribute ID.

    • mask: number

      uint8_t Mask.

    • manufacturerCode: number

      uint16_t Manufacturer code.

    • readLength: number

    Returns Promise<[SLStatus, dataType: number, outReadLength: number, data: number[]]>

    An sl_zigbee_af_status_t value indicating success or the reason for failure, handled by the EZSP layer as a uint8_t.

  • Retrieves Ember counters. See the EmberCounterType enumeration for the counter types.

    Returns Promise<number[]>

    uint16_t * A list of all counter values ordered according to the EmberCounterType enumeration.

  • Callback The NCP used the external binding modification policy to decide how to handle a remote delete binding request. The Host cannot change the current decision, but it can change the policy for future decisions using the setPolicy command.

    Parameters

    • index: number

      uint8_t The index of the binding whose deletion was requested.

    • policyDecision: SLStatus

      SLStatus.OK if the binding was removed from the table and any other status if not.

    Returns void

  • Callback The NCP used the external binding modification policy to decide how to handle a remote set binding request. The Host cannot change the current decision, but it can change the policy for future decisions using the setPolicy command.

    Parameters

    • entry: EmberBindingTableEntry

      EmberBindingTableEntry * The requested binding.

    • index: number

      uint8_t The index at which the binding was added.

    • policyDecision: SLStatus

      SLStatus.OK if the binding was added to the table and any other status if not.

    Returns void

  • Remove a node from child/neighbor table only on SoC, allowing direct manipulation of these tables by the application. This can affect the network functionality, and needs to be used wisely.

    Parameters

    • childEui64: `0x${string}`

      The long ID of the node.

    Returns Promise<SLStatus>

    • SLStatus.OK - This node has been successfully removed.
    • SLStatus.FAIL - The node was not found in either of the child or neighbor tables.
  • This command sends an APS remove device using APS encryption to the destination indicating either to remove itself from the network, or one of its children.

    Parameters

    • destShort: number

      The node ID of the device that will receive the message

    • destLong: `0x${string}`

      The long address (EUI64) of the device that will receive the message.

    • targetLong: `0x${string}`

      The long address (EUI64) of the device to be removed.

    Returns Promise<SLStatus>

    An SLStatus value indicating success, or the reason for failure

  • Remove a neighbor from neighbor table only on SoC, allowing direct manipulation of neighbor table by the application. This can affect the network functionality, and needs to be used wisely.

    Parameters

    • shortId: number

      The short ID of the neighbor.

    • longId: `0x${string}`

      The long ID of the neighbor.

    Returns Promise<void>

  • Replaces the EUI64, short ID and extended timeout setting of an address table entry. The previous EUI64, short ID and extended timeout setting are returned.

    Parameters

    • addressTableIndex: number

      uint8_t The index of the address table entry that will be modified.

    • newEui64: `0x${string}`

      The EUI64 to be written to the address table entry.

    • newId: number

      One of the following: The short ID corresponding to the new EUI64. SL_ZIGBEE_UNKNOWN_NODE_ID if the new EUI64 is valid but the short ID is unknown and should be discovered by the stack. SL_ZIGBEE_TABLE_ENTRY_UNUSED_NODE_ID if the address table entry is now unused.

    • newExtendedTimeout: boolean

      true if the retry interval should be increased by SL_ZIGBEE_INDIRECT_TRANSMISSION_TIMEOUT. false if the normal retry interval should be used.

    Returns Promise<[SLStatus, oldEui64: `0x${string}`, oldId: number, oldExtendedTimeout: boolean]>

    • SLStatus.OK if the EUI64, short ID and extended timeout setting were successfully modified,
    • SLStatus.ZIGBEE_ADDRESS_TABLE_ENTRY_IS_ACTIVE otherwise.
  • A function to request a Link Key from the Trust Center with another device on the Network (which could be the Trust Center). A Link Key with the Trust Center is possible but the requesting device cannot be the Trust Center. Link Keys are optional in ZigBee Standard Security and thus the stack cannot know whether the other device supports them. If EMBER_REQUEST_KEY_TIMEOUT is non-zero on the Trust Center and the partner device is not the Trust Center, both devices must request keys with their partner device within the time period. The Trust Center only supports one outstanding key request at a time and therefore will ignore other requests. If the timeout is zero then the Trust Center will immediately respond and not wait for the second request. The Trust Center will always immediately respond to requests for a Link Key with it. Sleepy devices should poll at a higher rate until a response is received or the request times out. The success or failure of the request is returned via ezspZigbeeKeyEstablishmentHandler(...)

    Parameters

    • partner: `0x${string}`

      This is the IEEE address of the partner device that will share the link key.

    Returns Promise<SLStatus>

    The success or failure of sending the request. This is not the final result of the attempt. ezspZigbeeKeyEstablishmentHandler(...) will return that.

  • Indicate whether a rejoining neighbor should have its incoming frame counter reset.

    Parameters

    • reset: boolean

    Returns Promise<void>

  • Return the number of router children that the node currently has.

    Returns Promise<number>

    The number of router children.

  • Sets the device's 283k1 curve CA public key, local certificate, and static private key on the NCP associated with this node.

    Returns Promise<SLStatus>

    Status of operation

  • Callback

    Parameters

    • channel: number

      uint8_t The channel on which the current error occurred. Undefined for the case of EMBER_SUCCESS.

    • status: SLStatus

      The error condition that occurred on the current channel. Value will be SLStatus.OK when the scan has completed. Other error conditions signify a failure to scan on the channel specified.

    Returns void

  • Transmits the given bootload message to a neighboring node using a specific 802.15.4 header that allows the EmberZNet stack as well as the bootloader to recognize the message, but will not interfere with other ZigBee stacks.

    Parameters

    • broadcast: boolean

      If true, the destination address and pan id are both set to the broadcast address.

    • destEui64: `0x${string}`

      The EUI64 of the target node. Ignored if the broadcast field is set to true.

    • messageContents: Buffer

      uint8_t * The multicast message.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Sends a broadcast message as per the ZigBee specification.

    Parameters

    • alias: number

      uint16_t (unused in v13-) The aliased source from which we send the broadcast. This must be SL_ZIGBEE_NULL_NODE_ID if we do not need an aliased source

    • destination: number

      The destination to which to send the broadcast. This must be one of the three ZigBee broadcast addresses.

    • nwkSequence: number

      uint8_t (unused in v13-) The alias nwk sequence number. This won't be used if there is no aliased source.

    • apsFrame: EmberApsFrame

      EmberApsFrame * The APS frame for the message.

    • radius: number

      uint8_t The message will be delivered to all nodes within radius hops of the sender. A radius of zero is converted to EMBER_MAX_HOPS.

    • messageTag: number

      uint8_t (v14+: uint16_t) A value chosen by the Host. This value is used in the ezspMessageSentHandler response to refer to this message.

    • messageContents: Buffer

      uint8_t * The broadcast message.

    Returns Promise<[SLStatus, apsSequence: number]>

    An SLStatus value indicating success or the reason for failure.

  • Sends a route request packet that creates routes from every node in the network back to this node. This function should be called by an application that wishes to communicate with many nodes, for example, a gateway, central monitor, or controller. A device using this function was referred to as an 'aggregator' in EmberZNet 2.x and earlier, and is referred to as a 'concentrator' in the ZigBee specification and EmberZNet 3. This function enables large scale networks, because the other devices do not have to individually perform bandwidth-intensive route discoveries. Instead, when a remote node sends an APS unicast to a concentrator, its network layer automatically delivers a special route record packet first, which lists the network ids of all the intermediate relays. The concentrator can then use source routing to send outbound APS unicasts. (A source routed message is one in which the entire route is listed in the network layer header.) This allows the concentrator to communicate with thousands of devices without requiring large route tables on neighboring nodes. This function is only available in ZigBee Pro (stack profile 2), and cannot be called on end devices. Any router can be a concentrator (not just the coordinator), and there can be multiple concentrators on a network. Note that a concentrator does not automatically obtain routes to all network nodes after calling this function. Remote applications must first initiate an inbound APS unicast. Many-to-one routes are not repaired automatically. Instead, the concentrator application must call this function to rediscover the routes as necessary, for example, upon failure of a retried APS message. The reason for this is that there is no scalable one-size-fits-all route repair strategy. A common and recommended strategy is for the concentrator application to refresh the routes by calling this function periodically.

    Parameters

    • concentratorType: number

      uint16_t Must be either EMBER_HIGH_RAM_CONCENTRATOR or EMBER_LOW_RAM_CONCENTRATOR. The former is used when the caller has enough memory to store source routes for the whole network. In that case, remote nodes stop sending route records once the concentrator has successfully received one. The latter is used when the concentrator has insufficient RAM to store all outbound source routes. In that case, route records are sent to the concentrator prior to every inbound APS unicast.

    • radius: number

      uint8_t The maximum number of hops the route request will be relayed. A radius of zero is converted to EMBER_MAX_HOPS

    Returns Promise<SLStatus>

    • SLStatus.OK if the route request was successfully submitted to the transmit queue,
    • SLStatus.FAIL otherwise.
  • Sends a multicast message to all endpoints that share a specific multicast ID and are within a specified number of hops of the sender.

    Parameters

    • apsFrame: EmberApsFrame

      EmberApsFrame * The APS frame for the message. The multicast will be sent to the groupId in this frame.

    • hops: number

      uint8_t The message will be delivered to all nodes within this number of hops of the sender. A value of zero is converted to EMBER_MAX_HOPS.

    • broadcastAddr: number

      uint16_t (unused in v13-) The number of hops that the message will be forwarded by devices that are not members of the group. A value of 7 or greater is treated as infinite.

    • alias: number

      uint16_t (unused in v13-) The alias source address. This must be SL_ZIGBEE_NULL_NODE_ID if we do not need an aliased source

    • nwkSequence: number

      uint8_t (unused in v13-) The alias sequence number. This won't be used if there is no aliased source.

    • messageTag: number

      uint8_t (v14+: uint16_t) A value chosen by the Host. This value is used in the ezspMessageSentHandler response to refer to this message.

    • messageContents: Buffer

      uint8_t * The multicast message.

    Returns Promise<[SLStatus, apsSequence: number]>

    An SLStatus value. For any result other than SLStatus.OK, the message will not be sent.

    • SLStatus.OK - The message has been submitted for transmission.
    • SLStatus.INVALID_INDEX - The bindingTableIndex refers to a non-multicast binding.
    • SLStatus.NETWORK_DOWN - The node is not part of a network.
    • SLStatus.MESSAGE_TOO_LONG - The message is too large to fit in a MAC layer frame.
    • SLStatus.ALLOCATION_FAILED - The free packet buffer pool is empty.
    • SLStatus.BUSY - Insufficient resources available in Network or MAC layers to send message.
  • Triggers a pan id update message.

    Parameters

    • newPan: number

    Returns Promise<boolean>

    true if the request was successfully handed to the stack, false otherwise

  • Transmits the given message without modification. The MAC header is assumed to be configured in the message at the time this function is called.

    Parameters

    • messageContents: Buffer

      uint8_t * The raw message.

    • priority: EmberTransmitPriority

      uint8_t transmit priority.

    • useCca: boolean

      Should we enable CCA or not.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Sends a reply to a received unicast message. The incomingMessageHandler callback for the unicast being replied to supplies the values for all the parameters except the reply itself.

    Parameters

    • sender: number

      Value supplied by incoming unicast.

    • apsFrame: EmberApsFrame

      EmberApsFrame * Value supplied by incoming unicast.

    • messageContents: Buffer

    Returns Promise<SLStatus>

    • SLStatus.INVALID_STATE - The SL_ZIGBEE_EZSP_UNICAST_REPLIES_POLICY is set to SL_ZIGBEE_EZSP_HOST_WILL_NOT_SUPPLY_REPLY. This means the NCP will automatically send an empty reply. The Host must change the policy to SL_ZIGBEE_EZSP_HOST_WILL_SUPPLY_REPLY before it can supply the reply. There is one exception to this rule: In the case of responses to message fragments, the host must call sendReply when a message fragment is received. In this case, the policy set on the NCP does not matter. The NCP expects a sendReply call from the Host for message fragments regardless of the current policy settings.
    • SLStatus.ALLOCATION_FAILED - Not enough memory was available to send the reply.
    • SLStatus.BUSY - Either no route or insufficient resources available.
    • SLStatus.OK - The reply was successfully queued for transmission.
  • This function sends an APS TransportKey command containing the current trust center link key. The node to which the command is sent is specified via the short and long address arguments.

    Parameters

    • destinationNodeId: number

      The short address of the node to which this command will be sent

    • destinationEui64: `0x${string}`

      The long address of the node to which this command will be sent

    Returns Promise<SLStatus>

    An SLStatus value indicating success of failure of the operation

  • Sends a unicast message as per the ZigBee specification. The message will arrive at its destination only if there is a known route to the destination node. Setting the ENABLE_ROUTE_DISCOVERY option will cause a route to be discovered if none is known. Setting the FORCE_ROUTE_DISCOVERY option will force route discovery. Routes to end-device children of the local node are always known. Setting the APS_RETRY option will cause the message to be retransmitted until either a matching acknowledgement is received or three transmissions have been made. Note: Using the FORCE_ROUTE_DISCOVERY option will cause the first transmission to be consumed by a route request as part of discovery, so the application payload of this packet will not reach its destination on the first attempt. If you want the packet to reach its destination, the APS_RETRY option must be set so that another attempt is made to transmit the message with its application payload after the route has been constructed. Note: When sending fragmented messages, the stack will only assign a new APS sequence number for the first fragment of the message (i.e., SL_ZIGBEE_APS_OPTION_FRAGMENT is set and the low-order byte of the groupId field in the APS frame is zero). For all subsequent fragments of the same message, the application must set the sequence number field in the APS frame to the sequence number assigned by the stack to the first fragment.

    Parameters

    • type: EmberOutgoingMessageType

      Specifies the outgoing message type. Must be one of EMBER_OUTGOING_DIRECT, EMBER_OUTGOING_VIA_ADDRESS_TABLE, or EMBER_OUTGOING_VIA_BINDING.

    • indexOrDestination: number

      Depending on the type of addressing used, this is either the NodeId of the destination, an index into the address table, or an index into the binding table.

    • apsFrame: EmberApsFrame

      EmberApsFrame * The APS frame which is to be added to the message.

    • messageTag: number

      uint8_t (v14+: uint16_t) A value chosen by the Host. This value is used in the ezspMessageSentHandler response to refer to this message.

    • messageContents: Buffer

      uint8_t * Content of the message.

    Returns Promise<[SLStatus, apsSequence: number]>

    An SLStatus value indicating success or the reason for failure.

  • Send a Zigbee NWK Leave command to the destination.

    Parameters

    • destination: number

      Node ID of the device being told to leave.

    • flags: LeaveRequestFlags

      Bitmask indicating additional considerations for the leave request.

    Returns Promise<SLStatus>

    Status indicating success or a reason for failure. Call is invalid if destination is on network or is the local node.

  • Sets the EUI64 and short ID of an address table entry. Usually the application will not need to set the short ID in the address table. Once the remote EUI64 is set the stack is capable of figuring out the short ID on its own. However, in cases where the application does set the short ID, the application must set the remote EUI64 prior to setting the short ID. This function will also check other address table entries, the child table and the neighbor table to see if the node ID for the given EUI64 is already known. If known then this function will set node ID. If not known it will set the node ID to SL_ZIGBEE_UNKNOWN_NODE_ID.

    Parameters

    • addressTableIndex: number
    • eui64: `0x${string}`
    • id: number

    Returns Promise<SLStatus>

    • SLStatus.OK if the information was successfully set,
    • SLStatus.ZIGBEE_ADDRESS_TABLE_ENTRY_IS_ACTIVE otherwise.
  • Wrapper for ezspSetValue.

    Function to set APS layer outgoing frame counter for Trust Center Link Key (intended for device restoration purposes). Caveats:

    • Can only be called before NetworkInit / FormNetwork / JoinNetwork, when sl_zigbee_network_state()==SL_ZIGBEE_NO_NETWORK.
    • This function should be called before ::sl_zigbee_set_initial_security_state, and the SL_ZIGBEE_NO_FRAME_COUNTER_RESET bitmask should be added to the initial security bitmask when ::emberSetInitialSecurityState is called.
    • If used in multi-network context, be sure to call ::sl_zigbee_set_current_network() prior to calling this function.

    Parameters

    • frameCounter: number

    Returns Promise<SLStatus>

    • SL_STATUS_OK if calling context is valid (sl_zigbee_network_state() == SL_ZIGBEE_NO_NETWORK) and desiredValue < MAX_INT32U_VALUE.
    • SL_STATUS_INVALID_STATE.
  • Sets an entry in the binding table.

    Parameters

    • index: number

      uint8_t The index of a binding table entry.

    • value: EmberBindingTableEntry

      EmberBindingTableEntry * The contents of the binding entry.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Set the node ID for the binding's destination. See getBindingRemoteNodeId for a description.

    Parameters

    • index: number

      uint8_t The index of a binding table entry.

    • nodeId: number

    Returns Promise<void>

  • Sets the error code that is sent back from a router with a broken route.

    Parameters

    • errorCode: number

      uint8_t Desired error code.

    Returns Promise<SLStatus>

    An SLStatus value indicating the success or failure of the command.

  • Sets child data to the child table token.

    Parameters

    • index: number

      uint8_t The index of the child of interest in the child table. Possible indexes range from zero to (EMBER_CHILD_TABLE_SIZE - 1).

    • childData: EmberChildData

      EmberChildData * The data of the child.

    Returns Promise<SLStatus>

    • SLStatus.OK if the child data is set successfully at index.
    • SLStatus.INVALID_INDEX if provided index is out of range.
  • Set the radio power value for a given child index.

    Parameters

    • childIndex: number

      uint8_t

    • newPower: number

      int8_t

    Returns Promise<void>

  • Enable/disable concentrator support.

    Parameters

    • on: boolean

      If this bool is true the concentrator support is enabled. Otherwise is disabled. If this bool is false all the other arguments are ignored.

    • concentratorType: number

      uint16_t Must be either EMBER_HIGH_RAM_CONCENTRATOR or EMBER_LOW_RAM_CONCENTRATOR. The former is used when the caller has enough memory to store source routes for the whole network. In that case, remote nodes stop sending route records once the concentrator has successfully received one. The latter is used when the concentrator has insufficient RAM to store all outbound source routes. In that case, route records are sent to the concentrator prior to every inbound APS unicast.

    • minTime: number

      uint16_t The minimum amount of time that must pass between MTORR broadcasts.

    • maxTime: number

      uint16_t The maximum amount of time that can pass between MTORR broadcasts.

    • routeErrorThreshold: number

      uint8_t The number of route errors that will trigger a re-broadcast of the MTORR.

    • deliveryFailureThreshold: number

      uint8_t The number of APS delivery failures that will trigger a re-broadcast of the MTORR.

    • maxHops: number

      uint8_t The maximum number of hops that the MTORR broadcast will be allowed to have. A value of 0 will be converted to the EMBER_MAX_HOPS value set by the stack.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Writes a configuration value to the NCP. Configuration values can be modified by the Host after the NCP has reset. Once the status of the stack changes to EMBER_NETWORK_UP, configuration values can no longer be modified and this command will respond with EzspStatus.ERROR_INVALID_CALL.

    Parameters

    • configId: EzspConfigId

      Identifies which configuration value to change.

    • value: number

      uint16_t The new configuration value.

    Returns Promise<SLStatus>

    EzspStatus

    • SLStatus.OK if the configuration value was changed,
    • SLStatus.ZIGBEE_EZSP_ERROR if the new value exceeded the available memory, if the new value was out of bounds, if the NCP does not recognize configId, if configuration values can no longer be modified.
  • Set the current duty cycle limits configuration. The Default limits set by stack if this call is not made.

    Parameters

    Returns Promise<SLStatus>

    • SLStatus.OK if the duty cycle limit configurations set successfully,
    • SLStatus.INVALID_PARAMETER if set illegal value such as setting only one of the limits to default or violates constraints Susp > Crit > Limi,
    • SLStatus.INVALID_STATE if device is operating on 2.4Ghz
  • Tells the stack whether or not the normal interval between retransmissions of a retried unicast message should be increased by EMBER_INDIRECT_TRANSMISSION_TIMEOUT. The interval needs to be increased when sending to a sleepy node so that the message is not retransmitted until the destination has had time to wake up and poll its parent. The stack will automatically extend the timeout:

    • For our own sleepy children.
    • When an address response is received from a parent on behalf of its child.
    • When an indirect transaction expiry route error is received.
    • When an end device announcement is received from a sleepy node.

    Parameters

    • remoteEui64: `0x${string}`

      The address of the node for which the timeout is to be set.

    • extendedTimeout: boolean

      true if the retry interval should be increased by EMBER_INDIRECT_TRANSMISSION_TIMEOUT. false if the normal retry interval should be used.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure. Always OK in v13-.

  • Set the incoming TC link key frame counter to desired value.

    Parameters

    • frameCounter: number

      Value to set the frame counter to.

    Returns Promise<void>

  • Set initial outgoing link cost for neighbor.

    Parameters

    • cost: number

      The new default cost. Valid values are 0, 1, 3, 5, and 7.

    Returns Promise<SLStatus>

    Whether or not initial cost was successfully set.

  • Sets the security state that will be used by the device when it forms or joins the network. This call should not be used when restoring saved network state via networkInit as this will result in a loss of security data and will cause communication problems when the device re-enters the network.

    Parameters

    Returns Promise<SLStatus>

    The success or failure code of the operation.

  • This call sets the radio channel in the stack and propagates the information to the hardware.

    Parameters

    • radioChannel: number

      uint8_t The radio channel to be set.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • This function is useful to sleepy end devices. This function will set the retry interval (in milliseconds) for mac data poll. This interval is the time in milliseconds the device waits before retrying a data poll when a MAC level data poll fails for any reason.

    Parameters

    • waitBeforeRetryIntervalMs: number

      uint32_t Time in milliseconds the device waits before retrying a data poll when a MAC level data poll fails for any reason.

    Returns Promise<void>

  • Sets the manufacturer code to the specified value. The manufacturer code is one of the fields of the node descriptor.

    Parameters

    • code: number

      uint16_t The manufacturer code for the local node.

    Returns Promise<void>

  • Set a flag to indicate that a message is pending for a child. The next time that the child polls, it will be informed that it has a pending message. The message is sent from emberPollHandler, which is called when the child requests data.

    Parameters

    • childId: number

      The ID of the child that just polled for data.

    Returns Promise<SLStatus>

    • SLStatus.OK - The next time that the child polls, it will be informed that it has pending data.
    • SLStatus.NOT_JOINED - The child identified by childId is not our child.
  • Sets a manufacturing token in the Customer Information Block (CIB) area of the NCP if that token currently unset (fully erased). Cannot be used with EZSP_STACK_CAL_DATA, EZSP_STACK_CAL_FILTER, EZSP_MFG_ASH_CONFIG, or EZSP_MFG_CBKE_DATA token.

    Parameters

    • tokenId: EzspMfgTokenId

      Which manufacturing token to set.

    • tokenData: Buffer

      uint8_t * The manufacturing token data.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Sets the frame counter for the neighbour or child.

    Parameters

    • eui64: `0x${string}`

      eui64 of the node

    • frameCounter: number

      uint32_t Return the frame counter of the node from the neighbor or child table

    Returns Promise<SLStatus>

    • SLStatus.NOT_FOUND if the node is not found in the neighbor or child table.
    • SLStatus.OK otherwise
  • Configure the number of beacons to store when issuing active scans for networks.

    Parameters

    • numBeacons: number

      uint8_t The number of beacons to cache when scanning.

    Returns Promise<SLStatus>

    • SLStatus.INVALID_PARAMETER if numBeacons is greater than SL_ZIGBEE_MAX_BEACONS_TO_STORE
    • SLStatus.OK
  • Wrapper for ezspSetValue.

    Set NWK layer outgoing frame counter (intended for device restoration purposes). Caveats:

    • Can only be called before NetworkInit / FormNetwork / JoinNetwork, when sl_zigbee_network_state()==SL_ZIGBEE_NO_NETWORK.
    • This function should be called before ::sl_zigbee_set_initial_security_state, and the SL_ZIGBEE_NO_FRAME_COUNTER_RESET bitmask should be added to the initial security bitmask when ::emberSetInitialSecurityState is called.
    • If used in multi-network context, be sure to call ::sl_zigbee_set_current_network() prior to calling this function.

    Parameters

    • frameCounter: number

    Returns Promise<SLStatus>

    • SL_STATUS_OK if calling context is valid (sl_zigbee_network_state() == SL_ZIGBEE_NO_NETWORK) and desiredValue < MAX_INT32U_VALUE.
    • SL_STATUS_INVALID_STATE.
  • Set the network update ID to the desired value. Must be called before joining or forming the network.

    Parameters

    • nwkUpdateId: number

      uint8_t Desired value of the network update ID.

    • setWhenOnNetwork: boolean

      Set to true in case change should also apply when on network.

    Returns Promise<SLStatus>

    Status of set operation for the network update ID.

  • Allows the Host to control the broadcast behaviour of a routing device used by the NCP.

    Parameters

    • config: number

      uint8_t Passive ack config enum.

    • minAcksNeeded: number

      uint8_t The minimum number of acknowledgments (re-broadcasts) to wait for until deeming the broadcast transmission complete.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Set the PAN ID to be accepted by the device in a NLME Network Update command. If this is set to a different value than its default 0xFFFF, NLME network update messages will be ignored if they do not match this PAN ID.

    Parameters

    • panId: number

      uint16_t PAN ID to be accepted in a network update.

    Returns Promise<void>

  • Allows the Host to change the policies used by the NCP to make fast decisions.

    Parameters

    • policyId: EzspPolicyId

      Identifies which policy to modify.

    • decisionId: number

      The new decision for the specified policy.

    Returns Promise<SLStatus>

    • SLStatus.OK if the policy was changed,
    • SLStatus.ZIGBEE_EZSP_ERROR if the NCP does not recognize policyId.
  • Sets the power descriptor to the specified value. The power descriptor is a dynamic value. Therefore, you should call this function whenever the value changes.

    Parameters

    • descriptor: number

      uint16_t The new power descriptor for the local node.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure. Always OK in v13-.

  • Sets the channel to use for sending and receiving messages. For a list of available radio channels, see the technical specification for the RF communication module in your Developer Kit. Note: Care should be taken when using this API, as all devices on a network must use the same channel.

    Parameters

    • channel: number

      uint8_t Desired radio channel.

    Returns Promise<SLStatus>

    An SLStatus value indicating the success or failure of the command.

  • Sets the radio output power at which a node is operating. Ember radios have discrete power settings. For a list of available power settings, see the technical specification for the RF communication module in your Developer Kit. Note: Care should be taken when using this API on a running network, as it will directly impact the established link qualities neighboring nodes have with the node on which it is called. This can lead to disruption of existing routes and erratic network behavior.

    Parameters

    • power: number

      int8_t Desired radio output power, in dBm.

    Returns Promise<SLStatus>

    An SLStatus value indicating the success or failure of the command.

  • Sets the routing shortcut threshold to directly use a neighbor instead of performing routing.

    Parameters

    • costThresh: number

      uint8_t The routing shortcut threshold to configure.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Sets source route discovery(MTORR) mode to on, off, reschedule

    Parameters

    Returns Promise<number>

    uint32_t Remaining time(ms) until next MTORR broadcast if the mode is on, MAX_INT32U_VALUE if the mode is off

  • Sets a timer on the NCP. There are 2 independent timers available for use by the Host. A timer can be cancelled by setting time to 0 or units to EMBER_EVENT_INACTIVE.

    Parameters

    • timerId: number

      uint8_t Which timer to set (0 or 1).

    • time: number

      uint16_t The delay before the timerHandler callback will be generated. Note that the timer clock is free running and is not synchronized with this command. This means that the actual delay will be between time and (time - 1). The maximum delay is 32767.

    • units: EmberEventUnits

      The units for time.

    • repeat: boolean

      If true, a timerHandler callback will be generated repeatedly. If false, only a single timerHandler callback will be generated.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Sets a token (8 bytes of non-volatile storage) in the Simulated EEPROM of the NCP.

    Parameters

    • tokenId: number

      uint8_t Which token to set

    • tokenData: number[]

      uint8_t * The data to write to the token.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Sets the token data for a single token with provided key

    Parameters

    • token: number

      uint32_t Key of the token in the token table for which data is to be set.

    • index: number

      uint32_t Index in case of the indexed token.

    • tokenData: EmberTokenData

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Extend a joiner's timeout to wait for the network key on the joiner default key timeout is 3 sec, and only values greater equal to 3 sec are accepted.

    Parameters

    • networkKeyTimeoutS: number

      Network key timeout

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Writes a value to the NCP.

    Parameters

    • valueId: EzspValueId

      Identifies which value to change.

    • valueLength: number

      uint8_t The length of the value parameter in bytes.

    • value: number[]

      uint8_t * The new value.

    Returns Promise<SLStatus>

    • SLStatus.OK if the value was changed,
    • SLStatus.ZIGBEE_EZSP_ERROR if the new value was out of bounds, if the NCP does not recognize valueId, if the value could not be modified.
  • This call sets additional capability bits in the ZLL state.

    Parameters

    • state: number

    Returns Promise<void>

  • Set the primary ZLL (touchlink) channel mask

    Parameters

    • zllPrimaryChannelMask: number

    Returns Promise<void>

  • Set the secondary ZLL (touchlink) channel mask.

    Parameters

    • zllSecondaryChannelMask: number

    Returns Promise<void>

  • Form a new sleepy-to-sleepy network. If the network is using security, the device must call sli_zigbee_stack_set_initial_security_state() first.

    Parameters

    • parameters: EmberNetworkParameters

      Specification of the new network.

    • initiator: boolean

      Whether this device is initiating or joining the network.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or a reason for failure.

  • Calling this function will render all other stack functions except ezspStackPowerUp() non-functional until the radio is powered back on.

    Returns Promise<void>

  • Initialize the radio. Typically called coming out of deep sleep. For non-sleepy devices, also turns the radio on and leaves it in RX mode.

    Returns Promise<void>

  • Callback A callback invoked when the status of the stack changes. If the status parameter equals EMBER_NETWORK_UP, then the getNetworkParameters command can be called to obtain the new network parameters. If any of the parameters are being stored in nonvolatile memory by the Host, the stored values should be updated.

    Parameters

    Returns void

  • Callback A callback invoked to inform the application that a stack token has changed.

    Parameters

    • tokenAddress: number

      uint16_t The address of the stack token that has changed.

    Returns void

  • This function will start a scan.

    Parameters

    • scanType: EzspNetworkScanType

      Indicates the type of scan to be performed. Possible values are: EZSP_ENERGY_SCAN and EZSP_ACTIVE_SCAN. For each type, the respective callback for reporting results is: energyScanResultHandler and networkFoundHandler. The energy scan and active scan report errors and completion via the scanCompleteHandler.

    • channelMask: number

      uint32_t Bits set as 1 indicate that this particular channel should be scanned. Bits set to 0 indicate that this particular channel should not be scanned. For example, a channelMask value of 0x00000001 would indicate that only channel 0 should be scanned. Valid channels range from 11 to 26 inclusive. This translates to a channel mask value of 0x07FFF800. As a convenience, a value of 0 is reinterpreted as the mask for the current channel.

    • duration: number

      uint8_t Sets the exponent of the number of scan periods, where a scan period is 960 symbols. The scan will occur for ((2^duration) + 1) scan periods.

    Returns Promise<SLStatus>

    • SLStatus.OK signals that the scan successfully started. Possible error responses and their meanings:
    • SLStatus.MAC_SCANNING, we are already scanning;
    • SLStatus.BAD_SCAN_DURATION, we have set a duration value that is not 0..14 inclusive;
    • SLStatus.MAC_INCORRECT_SCAN_TYPE, we have requested an undefined scanning type;
    • SLStatus.INVALID_CHANNEL_MASK, our channel mask did not specify any valid channels.
  • Callback A callback to inform the application that the Network Key has been updated and the node has been switched over to use the new key. The actual key being used is not passed up, but the sequence number is.

    Parameters

    • sequenceNumber: number

      uint8_t The sequence number of the new network key.

    Returns void

  • Callback A callback from the timer.

    Parameters

    • timerId: number

      uint8_t Which timer generated the callback (0 or 1).

    Returns void

  • Factory reset all configured zigbee tokens

    Parameters

    • excludeOutgoingFC: boolean

      Exclude network and APS outgoing frame counter tokens.

    • excludeBootCounter: boolean

      Exclude stack boot counter token.

    Returns Promise<void>

  • Callback The NCP used the trust center behavior policy to decide whether to allow a new node to join the network. The Host cannot change the current decision, but it can change the policy for future decisions using the setPolicy command.

    Parameters

    • newNodeId: number

      The Node Id of the node whose status changed

    • newNodeEui64: `0x${string}`

      The EUI64 of the node whose status changed.

    • status: EmberDeviceUpdate

      The status of the node: Secure Join/Rejoin, Unsecure Join/Rejoin, Device left.

    • policyDecision: EmberJoinDecision

      An EmberJoinDecision reflecting the decision made.

    • parentOfNewNodeId: number

      The parent of the node whose status has changed.

    Returns void

  • Send the network key to a destination.

    Parameters

    • targetShort: number

      The destination node of the key.

    • targetLong: `0x${string}`

      The long address of the destination node.

    • parentShortId: number

      The parent node of the destination node.

    Returns Promise<SLStatus>

    SLStatus.OK if send was successful

  • This command will send a unicast transport key message with a new NWK key to the specified device. APS encryption using the device's existing link key will be used.

    Parameters

    • destShort: number

      The node ID of the device that will receive the message

    • destLong: `0x${string}`

      The long address (EUI64) of the device that will receive the message.

    • key: EmberKeyData

      EmberKeyData * The NWK key to send to the new device.

    Returns Promise<SLStatus>

    An SLStatus value indicating success, or the reason for failure

  • Callback This function returns an unused panID and channel pair found via the find unused panId scan procedure.

    Parameters

    • panId: number

      The unused panID which has been found.

    • channel: number

      uint8_t The channel that the unused panID was found on.

    Returns void

  • Requests a new link key from the Trust Center. This function starts by sending a Node Descriptor request to the Trust Center to verify its R21+ stack version compliance. A Request Key message will then be sent, followed by a Verify Key Confirm message.

    Parameters

    • maxAttempts: number

      uint8_t The maximum number of attempts a node should make when sending the Node Descriptor, Request Key, and Verify Key Confirm messages. The number of attempts resets for each message type sent (e.g., if maxAttempts is 3, up to 3 Node Descriptors are sent, up to 3 Request Keys, and up to 3 Verify Key Confirm messages are sent).

    Returns Promise<SLStatus>

    The success or failure of sending the request. If the Node Descriptor is successfully transmitted, ezspZigbeeKeyEstablishmentHandler(...) will be called at a later time with a final status result.

  • The command allows the Host to specify the desired EZSP version and must be sent before any other command. The response provides information about the firmware running on the NCP.

    Parameters

    • desiredProtocolVersion: number

      uint8_t The EZSP version the Host wishes to use. To successfully set the version and allow other commands, this must be same as EZSP_PROTOCOL_VERSION.

    Returns Promise<[protocolVersion: number, stackType: number, stackVersion: number]>

    uint8_t The EZSP version the NCP is using.

  • Write attribute data on NCP endpoints.

    Parameters

    • endpoint: number

      uint8_t Endpoint

    • cluster: number

      uint16_t Cluster.

    • attributeId: number

      uint16_t Attribute ID.

    • mask: number

      uint8_t Mask.

    • manufacturerCode: number

      uint16_t Manufacturer code.

    • overrideReadOnlyAndDataType: boolean

      Override read only and data type.

    • justTest: boolean

      Override read only and data type.

    • dataType: number

      uint8_t Attribute data type.

    • data: Buffer

      uint8_t * Attribute data.

    Returns Promise<SLStatus>

    An sl_zigbee_af_status_t value indicating success or the reason for failure.

  • Write the current node Id, PAN ID, or Node type to the tokens

    Parameters

    • erase: boolean

      Erase the node type or not

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Callback This is a callback that indicates the success or failure of an attempt to establish a key with a partner device.

    Parameters

    • partner: `0x${string}`

      This is the IEEE address of the partner that the device successfully established a key with. This value is all zeros on a failure.

    • status: EmberKeyStatus

      This is the status indicating what was established or why the key establishment failed.

    Returns void

  • Callback This call is fired when network and group addresses are assigned to a remote mode in a network start or network join request.

    Parameters

    Returns void

  • This call gets the radio's default idle power mode.

    Returns Promise<number>

    uint8_t The current power mode.

  • Callback This call is fired when a ZLL network scan finds a ZLL network.

    Parameters

    • networkInfo: EmberZllNetwork

      EmberZllNetwork * Information about the network.

    • isDeviceInfoNull: boolean

      Used to interpret deviceInfo field.

    • deviceInfo: EmberZllDeviceInfoRecord

      EmberZllDeviceInfoRecord * Device specific information.

    • packetInfo: EmberRxPacketInfo

      Information about the incoming packet received from this network.

    Returns void

  • A consolidation of ZLL network operations with similar signatures; specifically, forming and joining networks or touch-linking.

    Parameters

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Is there a ZLL (Touchlink) operation in progress?

    Returns Promise<boolean>

    ZLL operation in progress? false on error

  • Is the ZLL radio on when idle mode is active?

    Returns Promise<boolean>

    ZLL radio on when idle mode is active? false on error

  • This call will cause the device to setup the security information used in its network. It must be called prior to forming, starting, or joining a network.

    Parameters

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • This call sets the radio's default idle power mode.

    Parameters

    • mode: number

      The power mode to be set.

    Returns Promise<void>

  • This call will change the mode of the radio so that the receiver is on for a specified amount of time when the device is idle.

    Parameters

    • durationMs: number

      uint32_t The duration in milliseconds to leave the radio on.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • This call will update ZLL security token information. Unlike emberZllSetInitialSecurityState, this can be called while a network is already established.

    Parameters

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • This call will initiate a ZLL network scan on all the specified channels.

    Parameters

    • channelMask: number

      uint32_t The range of channels to scan.

    • radioPowerForScan: number

      int8_t The radio output power used for the scan requests.

    • nodeType: EmberNodeType

      The node type of the local device.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Callback This call is fired when the device is a target of a touch link.

    Parameters

    • networkInfo: EmberZllNetwork

      EmberZllNetwork * Information about the network.

    Returns void

  • Deactivate use of mfglib test routines; restores the hardware to the state it was in prior to mfglibStart() and stops receiving packets started by mfglibStart() at the same time.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Returns the current radio channel, as previously set via mfglibSetChannel().

    Returns Promise<number>

    uint8_t The current channel.

  • Returns the current radio power setting, as previously set via mfglibSetPower().

    Returns Promise<number>

    int8_t Power in units of dBm. Refer to radio data sheet for valid range.

  • Sends a single packet consisting of the following bytes: packetLength, packetContents[0], ... , packetContents[packetLength - 3], CRC[0], CRC[1]. The total number of bytes sent is packetLength + 1. The radio replaces the last two bytes of packetContents[] with the 16-bit CRC for the packet.

    Parameters

    • packetContents: Buffer

      uint8_t * The packet to send. The last two bytes will be replaced with the 16-bit CRC.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Sets the radio channel. Calibration occurs if this is the first time the channel has been used.

    Parameters

    • channel: number

      uint8_t The channel to switch to. Valid values are 11 - 26.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • First select the transmit power mode, and then include a method for selecting the radio transmit power. The valid power settings depend upon the specific radio in use. Ember radios have discrete power settings, and then requested power is rounded to a valid power setting; the actual power output is available to the caller via mfglibGetPower().

    Parameters

    • txPowerMode: EmberTXPowerMode

      uint16_t Power mode. Refer to txPowerModes in stack/include/ember-types.h for possible values.

    • power: number

      int8_t Power in units of dBm. Refer to radio data sheet for valid range.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Activate use of mfglib test routines and enables the radio receiver to report packets it receives to the mfgLibRxHandler() callback. These packets will not be passed up with a CRC failure. All other mfglib functions will return an error until the mfglibStart() has been called

    Parameters

    • rxCallback: boolean

      true to generate a mfglibRxHandler callback when a packet is received.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Starts transmitting a random stream of characters. This is so that the radio modulation can be measured.

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Starts transmitting an unmodulated tone on the currently set channel and power level. Upon successful return, the tone will be transmitting. To stop transmitting tone, application must call mfglibStopTone(), allowing it the flexibility to determine its own criteria for tone duration (time, event, etc.)

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Stops transmitting a random stream of characters started by mfglibStartStream().

    Returns Promise<SLStatus>

    An SLStatus value indicating success or the reason for failure.

  • Calls ezspSend${x} based on type and takes care of tagging message.

    Alias types expect alias & sequence params, along with apsFrame.radius.

    Parameters

    • type: EmberOutgoingMessageType

      Specifies the outgoing message type.

    • indexOrDestination: number

      uint16_t Depending on the type of addressing used, this is either the NodeId of the destination, an index into the address table, or an index into the binding table. Unused for multicast types. This must be one of the three ZigBee broadcast addresses for broadcast.

    • apsFrame: EmberApsFrame

      [IN/OUT] EmberApsFrame * The APS frame which is to be added to the message. Sequence set in OUT as returned by ezspSend${x} command

    • message: Buffer

      uint8_t * Content of the message.

    • alias: number

      The alias source address

    • sequence: number

      uint8_t The alias sequence number

    Returns Promise<[SLStatus, messageTag: number]>

    Result of the ezspSend${x} call or EmberStatus.INVALID_PARAMETER if type not supported.

  • Must be called immediately after ezspVersion to sync the Host protocol version.

    Parameters

    • version: number

      Version for the Host to use.

    Returns void

  • Cleanly close down the serial protocol (UART). After this function has been called, init() must be called to resume communication with the NCP.

    Returns Promise<void>