Modules#

Zll Commissioning Common

ZLL Commissioning Common#

API and Callbacks for the ZLL Commissioning Common Component.

Common code for the ZigBee 3.0 touchlink commissioning mechanism. This component is required for both server and client side implementations.

API#

Generate a random network key and initializes the security state of the device.

bool

Indicate whether a touch link procedure is currently in progress.

void

Reset the local device to a factory new state.

Disable touchlink processing.

Enable touchlink processing.

Enumerations#

enum
INITIAL = 0x0000
SCAN_FOR_TOUCH_LINK = 0x0001
SCAN_FOR_DEVICE_INFORMATION = 0x0002
SCAN_FOR_IDENTIFY = 0x0004
SCAN_FOR_RESET = 0x0008
TARGET_NETWORK_FOUND = 0x0010
ABORTING_TOUCH_LINK = 0x0020
SCAN_COMPLETE = 0x0040
TOUCH_LINK_TARGET = 0x0080
FORMING_NETWORK = 0x0100
RESETTING_TO_FACTORY_NEW = 0x0200
}
enum
EMBER_RADIO_POWER_MODE_RX_ON
EMBER_RADIO_POWER_MODE_OFF
}

Macros#

#define
touchLinkInProgress ()
#define
scanForTouchLink ()
#define
scanForDeviceInformation ()
#define
scanForIdentify ()
#define
scanForReset ()
#define
targetNetworkFound ()
#define
abortingTouchLink ()
#define
scanComplete ()
#define
touchLinkTarget ()
#define
formingNetwork ()
#define
resettingToFactoryNew ()
#define
ZLL_FRAME_CONTROL_LEGACY 0x00
#define
ZLL_FRAME_CONTROL_CLIENT_TO_SERVER 0x11
#define
ZLL_FRAME_CONTROL_SERVER_TO_CLIENT 0x19
#define
ZLL_HEADER_FRAME_CONTROL_OFFSET 0
#define
ZLL_HEADER_SEQUENCE_NUMBER_OFFSET 1
#define
ZLL_HEADER_COMMAND_ID_OFFSET 2
#define
ZLL_HEADER_TRANSACTION_ID_OFFSET 3
#define
ZLL_HEADER_OVERHEAD 7
#define
debugPrintln (...)
#define
debugPrint (...)
#define
debugExec (x)
#define
emberAfPluginZllCommissioningInitialSecurityStateCallback emberAfPluginZllCommissioningCommonInitialSecurityStateCallback
#define
emberAfPluginZllCommissioningTouchLinkCompleteCallback emberAfPluginZllCommissioningCommonTouchLinkCompleteCallback
#define
emberAfPluginZllCommissioningResetToFactoryNewCallback emberAfPluginZllCommissioningCommonResetToFactoryNewCallback

API Documentation#

emberAfZllSetInitialSecurityState#

EmberStatus emberAfZllSetInitialSecurityState (void )

Generate a random network key and initializes the security state of the device.

Parameters
TypeDirectionArgument NameDescription
voidN/A

This function is a convenience wrapper for emberZllSetInitialSecurityState, which must be called before starting or joining a network. The plugin initializes the security state for the initiator during touch linking. The target must initialize its own security state prior to forming a network either by using this function or by calling emberZllSetInitialSecurityState directly.

Returns

  • An EmberStatus value that indicates the success or failure of the command.


emberAfZllTouchLinkInProgress#

bool emberAfZllTouchLinkInProgress (void )

Indicate whether a touch link procedure is currently in progress.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • True if a touch link is in progress or false otherwise.


emberAfZllResetToFactoryNew#

void emberAfZllResetToFactoryNew (void )

Reset the local device to a factory new state.

Parameters
TypeDirectionArgument NameDescription
voidN/A

This function causes the device to leave the network and clear its network parameters, resets its attributes to their default values, and clears the group and scene tables.


emberAfZllDisable#

EmberStatus emberAfZllDisable (void )

Disable touchlink processing.

Parameters
TypeDirectionArgument NameDescription
voidN/A

This function will cause the device to refuse network start/join requests if it receives them and will not allow touchlinking. Note that this will have the effect of overriding the emberAfZllNoTouchlinkForNFN function.


emberAfZllEnable#

EmberStatus emberAfZllEnable (void )

Enable touchlink processing.

Parameters
TypeDirectionArgument NameDescription
voidN/A

This function will cause the device to accept network start/join requests if it receives them and will not allow touchlinking. Note that this will have the effect of overriding the emberAfZllNoTouchlinkForNFN function.


Enumeration Documentation#

StateEnum#

StateEnum
Enumerator
INITIAL
SCAN_FOR_TOUCH_LINK
SCAN_FOR_DEVICE_INFORMATION
SCAN_FOR_IDENTIFY
SCAN_FOR_RESET
TARGET_NETWORK_FOUND
ABORTING_TOUCH_LINK
SCAN_COMPLETE
TOUCH_LINK_TARGET
FORMING_NETWORK
RESETTING_TO_FACTORY_NEW

EmberRadioPowerModeEnum#

EmberRadioPowerModeEnum
Enumerator
EMBER_RADIO_POWER_MODE_RX_ON
EMBER_RADIO_POWER_MODE_OFF

Variable Documentation#

emAfZllNetwork#

EmberZllNetwork emAfZllNetwork

emAfZllFlags#

uint16_t emAfZllFlags

emAfInitiatorRejoinRetryCount#

uint8_t emAfInitiatorRejoinRetryCount