nRF5 SDK for Thread and Zigbee v3.2.0
Data Structures | Macros | Typedefs | Enumerations | Functions
EZ-Mode comissioning (HA legacy conflicting with BDB)

Data Structures

struct  zb_ha_ez_mode_ctx_s
 

Macros

#define ZB_HA_EZ_MODE_TIME   ((zb_time_t)(180))
 
#define ZB_HA_EZ_MODE_QUERY_TIME   4
 
#define ZB_HA_EZ_MODE_ACTIVE_ENDP_LIST_LEN   4
 
#define ZB_HA_PREFERRED_CHANNEL_MASK   0x0318C800
 

Typedefs

typedef enum zb_ha_ez_mode_state_e zb_ha_ez_mode_state_t
 
typedef enum
zb_ha_ez_mode_binding_cb_state_e 
zb_ha_ez_mode_binding_cb_state_t
 
typedef zb_bool_t(* zb_ha_ez_mode_binding_callback_t )(zb_int16_t status, zb_ieee_addr_t addr, zb_uint8_t ep, zb_uint16_t cluster)
 
typedef struct zb_ha_ez_mode_ctx_s zb_ha_ez_mode_ctx_t
 

Enumerations

enum  zb_ha_ez_mode_state_e {
  ZB_HA_EZ_MODE_IDLE = 0, ZB_HA_EZ_MODE_FACTORY_RESET = 1, ZB_HA_EZ_MODE_NWK_STEERING = 2, ZB_HA_EZ_MODE_NWK_STEERING_JOINED = 3,
  ZB_HA_EZ_MODE_FINDING_AND_BINDING = 4, ZB_HA_EZ_MODE_FINDING_AND_BINDING_TARGET = 5
}
 
enum  zb_ha_ez_mode_binding_cb_state_e { ZB_HA_EZ_MODE_BIND_SUCCESS = 0, ZB_HA_EZ_MODE_BIND_FAIL = 1, ZB_HA_EZ_MODE_BIND_ASK_USER = 2 }
 

Functions

zb_ret_t zb_ha_ez_mode_factory_reset (zb_callback_t user_cb)
 Invoke EZ-Mode factory reset operation. More...
 
zb_ret_t zb_ha_ez_mode_nwk_steering (zb_uint16_t permit_duration, zb_callback_t user_cb)
 Invoke EZ-Mode network steering operation. More...
 
zb_ret_t zb_ha_ez_mode_finding_binding_initiator (zb_uint8_t endpoint, zb_ha_ez_mode_binding_callback_t user_binding_cb, zb_callback_t user_cb)
 Invoke EZ-Mode finding and binding operation. More...
 
zb_ret_t zb_ha_ez_mode_finding_binding_target (zb_uint8_t endpoint, zb_uint16_t identify_time)
 Invoke EZ-Mode finding and binding operation. More...
 
void zb_ha_ez_mode_finding_binding_target_cancel (zb_uint8_t endpoint)
 Cancel ongoing finding and binding procedure on target. More...
 
zb_void_t zb_ha_ez_mode_unbind (zb_uint8_t param)
 
void zb_ha_ez_mode_timeout (zb_uint8_t param)
 EZ-Mode cancel. More...
 
void zb_ha_ez_mode_cancel (void)
 EZ-Mode cancel. More...
 
zb_bool_t zb_ha_ez_mode_steering_in_progress (void)
 Check whether EZ-Mode steering is in progress. More...
 

Detailed Description

Macro Definition Documentation

#define ZB_HA_EZ_MODE_ACTIVE_ENDP_LIST_LEN   4

Maximum endpoints of the "respondent" that EZ-Mode can serve

#define ZB_HA_EZ_MODE_TIME   ((zb_time_t)(180))

Minimum time for PermitJoining and identifying (second)

#define ZB_HA_PREFERRED_CHANNEL_MASK   0x0318C800

Channels that should be scanned before others during EZ-Mode Nwk steering 0000.0011 0001.1000 1100.1000 0000.0000

Typedef Documentation

typedef zb_bool_t( * zb_ha_ez_mode_binding_callback_t)(zb_int16_t status, zb_ieee_addr_t addr, zb_uint8_t ep, zb_uint16_t cluster)

EZ-Mode finding & binding binding in progress callback function typedef. Function is used both to interact with user application, get decision if new binding is needed or not, and to report the binding result

Parameters
status- status of the binding (ask user, success or fail)
addr- extended address of a device to bind
ep- endpoint of a device to bind
cluster- cluster id to bind
Returns
bool - agree or disagree

List of EZ-Mode binding callback states

EZ-Mode commissioning context

List of EZ-Mode commissioning states

Enumeration Type Documentation

List of EZ-Mode binding callback states

Enumerator
ZB_HA_EZ_MODE_BIND_SUCCESS 

Previously user applied bind finished successfully

ZB_HA_EZ_MODE_BIND_FAIL 

Previously user applied bind failed

ZB_HA_EZ_MODE_BIND_ASK_USER 

Ask user whether to perform binding

List of EZ-Mode commissioning states

Enumerator
ZB_HA_EZ_MODE_IDLE 

EZ-Mode isn't invoked

ZB_HA_EZ_MODE_FACTORY_RESET 

EZ-Mode factory reset in progress

ZB_HA_EZ_MODE_NWK_STEERING 

EZ-Mode network steering in progress (scanning or forming network)

ZB_HA_EZ_MODE_NWK_STEERING_JOINED 

EZ-Mode network steering in progress (scanning or forming network finished)

ZB_HA_EZ_MODE_FINDING_AND_BINDING 

EZ-Mode finding and binding in progress

Function Documentation

void zb_ha_ez_mode_cancel ( void  )

EZ-Mode cancel.

This function is called by user to stop EZ-Mode commissioning.

zb_ret_t zb_ha_ez_mode_factory_reset ( zb_callback_t  user_cb)

Invoke EZ-Mode factory reset operation.

This function is called by user to perform factory reset: leave network, clean binding and group table entries;

Note
If error occurs, user_cb won't be called.
Parameters
user_cb- callback function to be called after operation finishes
Returns
RET_OK, if invoking factory reset completes OK, or error code
zb_ret_t zb_ha_ez_mode_finding_binding_initiator ( zb_uint8_t  endpoint,
zb_ha_ez_mode_binding_callback_t  user_binding_cb,
zb_callback_t  user_cb 
)

Invoke EZ-Mode finding and binding operation.

This function is called by user to perform finding and binding operation on initiator endpoint: search for identifying devices and bind to target;

Note
If error occurs, user_cb won't be called
Parameters
endpoint- initiator endpoint
user_binding_cb- callback function to be called before operation finisher
user_cb- callback function to be called after operation finishes
Returns
RET_OK, if invoking finding & binding completes OK, or error code
zb_ret_t zb_ha_ez_mode_finding_binding_target ( zb_uint8_t  endpoint,
zb_uint16_t  identify_time 
)

Invoke EZ-Mode finding and binding operation.

This function is called by user to perform finding and binding operation on target endpoint: makes endpoint start identifying.

Parameters
endpoint- target endpoint
identify_time- time (in seconds) when endpoint is identifying
Returns
RET_OK on success or other error code on fail
See also
zb_ha_ez_mode_error_code_t
void zb_ha_ez_mode_finding_binding_target_cancel ( zb_uint8_t  endpoint)

Cancel ongoing finding and binding procedure on target.

Function is used to force stopping of finding and binding procedure on target before provided identify_time to zb_ha_ez_mode_finding_binding_target is passed.

Parameters
endpointtarget endpoint
zb_ret_t zb_ha_ez_mode_nwk_steering ( zb_uint16_t  permit_duration,
zb_callback_t  user_cb 
)

Invoke EZ-Mode network steering operation.

This function is called by user to perform network steering: set PermitJoining if device is already in network or scan and join / form network;

Note
If error occurs, user_cb won't be called
Parameters
permit_duration- time (in seconds) when join is permitted
user_cb- callback function to be called after operation finishes
Returns
RET_OK, if invoking network steering completes OK, or error code
zb_bool_t zb_ha_ez_mode_steering_in_progress ( void  )

Check whether EZ-Mode steering is in progress.

Use this function to check if EZ-Mode network steering is in progress.

void zb_ha_ez_mode_timeout ( zb_uint8_t  param)

EZ-Mode cancel.

This is a callback called after EZScanTime if no open networks found


Documentation feedback | Developer Zone | Subscribe | Updated