Macros | |
#define | ZB_BDB_COMM_ACTIVE_ENDP_LIST_LEN 4 |
#define | BDB_MAX_IDENTIFY_QUERY_RESP_NUMBER 4 |
Typedefs | |
typedef enum zb_bdb_commissioning_mode_mask_e | zb_bdb_commissioning_mode_mask_t |
BDB commissioning mode mask bits. | |
typedef enum zb_bdb_comm_binding_cb_state_e | zb_bdb_comm_binding_cb_state_t |
typedef zb_bool_t(* | zb_bdb_comm_binding_callback_t )(zb_int16_t status, zb_ieee_addr_t addr, zb_uint8_t ep, zb_uint16_t cluster) |
BDB finding & binding callback template. More... | |
typedef enum zb_bdb_comm_state_e | zb_bdb_comm_state_t |
Enumerations | |
enum | zb_bdb_commissioning_mode_mask_e { ZB_BDB_INITIALIZATION = 0, ZB_BDB_TOUCHLINK_COMMISSIONING = 1, ZB_BDB_NETWORK_STEERING = 2, ZB_BDB_NETWORK_FORMATION = 4, ZB_BDB_FINDING_N_BINDING = 8, ZB_BDB_LAST_COMMISSIONING_STEP = 0x10, ZB_BDB_COMMISSIONING_STOP = 0x20, ZB_BDB_TOUCHLINK_TARGET = 0x40 } |
BDB commissioning mode mask bits. More... | |
enum | zb_bdb_comm_binding_cb_state_e { ZB_BDB_COMM_BIND_SUCCESS = 0, ZB_BDB_COMM_BIND_FAIL = 1, ZB_BDB_COMM_BIND_ASK_USER = 2 } |
enum | zb_bdb_comm_state_e { ZB_BDB_COMM_IDLE = 0, ZB_BDB_COMM_FACTORY_RESET = 1, ZB_BDB_COMM_NWK_STEERING = 2, ZB_BDB_COMM_NWK_STEERING_JOINED = 3, ZB_BDB_COMM_FINDING_AND_BINDING = 4, ZB_BDB_COMM_FINDING_AND_BINDING_TARGET = 5 } |
Functions | |
zb_bool_t | bdb_start_top_level_commissioning (zb_uint8_t mode_mask) |
Start top level commissioning procedure with specified mode mask. More... | |
zb_ret_t | zb_bdb_finding_binding_target (zb_uint8_t endpoint) |
Starts EZ-Mode Finding and binding mechanism at the target's endpoint. More... | |
zb_ret_t | zb_bdb_finding_binding_initiator (zb_uint8_t endpoint, zb_bdb_comm_binding_callback_t user_binding_cb) |
Start BDB finding & binding procedure on initiator. More... | |
void | zb_bdb_finding_binding_target_cancel () |
zb_void_t | zb_set_bdb_primary_channel_set (zb_uint32_t channel_mask) |
zb_uint32_t | zb_get_bdb_primary_channel_set () |
zb_void_t | zb_set_bdb_secondary_channel_set (zb_uint32_t channel_mask) |
zb_uint32_t | zb_get_bdb_secondary_channel_set () |
zb_void_t | zb_bdb_set_legacy_device_support (zb_uint8_t state) |
zb_void_t | zb_set_bdb_commissioning_mode (zb_uint8_t commissioning_mode) |
#define BDB_MAX_IDENTIFY_QUERY_RESP_NUMBER 4 |
Identify query responses queue size
#define ZB_BDB_COMM_ACTIVE_ENDP_LIST_LEN 4 |
Maximum endpoints of the "respondent" that can be served
typedef zb_bool_t( * zb_bdb_comm_binding_callback_t)(zb_int16_t status, zb_ieee_addr_t addr, zb_uint8_t ep, zb_uint16_t cluster) |
BDB finding & binding callback template.
Function is used both to interact with user application, get decision if new binding is needed or not, and to report the binding result
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 |
Example:
List of EZ-Mode binding callback states
typedef enum zb_bdb_comm_state_e zb_bdb_comm_state_t |
List of EZ-Mode commissioning states
enum zb_bdb_comm_state_e |
List of EZ-Mode commissioning states
BDB commissioning mode mask bits.
Enumerator | |
---|---|
ZB_BDB_TOUCHLINK_COMMISSIONING |
Touchlink: 0 = Do not attempt Touchlink commissioning; 1 = Attempt Touchlink commissioning |
ZB_BDB_NETWORK_STEERING |
Network steering: 0 = Do not attempt network steering; 1 = Attempt network steering |
ZB_BDB_NETWORK_FORMATION |
Network formation: 0 = Do not attempt to form a network; 1 = Attempt to form a network, according to device type2 |
ZB_BDB_FINDING_N_BINDING |
Finding & binding: 0 = Do not attempt finding & binding; 1 = Attempt finding & binding
|
zb_bool_t bdb_start_top_level_commissioning | ( | zb_uint8_t | mode_mask | ) |
Start top level commissioning procedure with specified mode mask.
mode_mask | - commissioning modes, see zb_bdb_commissioning_mode_mask_e |
Example:
zb_ret_t zb_bdb_finding_binding_initiator | ( | zb_uint8_t | endpoint, |
zb_bdb_comm_binding_callback_t | user_binding_cb | ||
) |
Start BDB finding & binding procedure on initiator.
Summary: Finding and binding as initiator zb_bdb_finding_binding_initiator() returns RET_OK if procedure was started successfully, error code otherwise. To report procedure status, user callback is called. It may be called several times with Success status and only once with error status. If any error appears, finding and binding stops.
endpoint | - initiator endpoint |
user_binding_cb | - user callback, see zb_bdb_comm_binding_callback_t |
Example:
zb_ret_t zb_bdb_finding_binding_target | ( | zb_uint8_t | endpoint | ) |
Starts EZ-Mode Finding and binding mechanism at the target's endpoint.
Put device into identifying mode; default duration is 3 minutes.
endpoint | - target endpoint |
Example
void zb_bdb_finding_binding_target_cancel | ( | ) |
Cancel previously started Finding & Binding procedure on target
zb_void_t zb_bdb_set_legacy_device_support | ( | zb_uint8_t | state | ) |
Enable Zigbee PRO complaint commissioning support
state | - 1 to enable trust center require key exchange; 0 - disable. |
zb_uint32_t zb_get_bdb_primary_channel_set | ( | ) |
Get the primary channel set for the BDB energy scan.
zb_uint32_t zb_get_bdb_secondary_channel_set | ( | ) |
Get the secondary channel set for the BDB energy scan.
zb_void_t zb_set_bdb_commissioning_mode | ( | zb_uint8_t | commissioning_mode | ) |
Set commissioning mode.
commissioning_mode | - bitfield with the bdbCommissioningMode attribute. Set 1 to the corresponding bit to enable, 0 to disable: Bit number Description 0 Enables/disables Touchlink commissioning 1 Attempt network steering 2 Attempt to form a network 3 Attempt finding & binding |
zb_void_t zb_set_bdb_primary_channel_set | ( | zb_uint32_t | channel_mask | ) |
Set the primary channel set for the BDB energy scan. Beacon request will be send on these channels
channel_mask | - Channel mask. |
zb_void_t zb_set_bdb_secondary_channel_set | ( | zb_uint32_t | channel_mask | ) |
Set the secondary channel set for the BDB energy scan. Beacon request will be send on these channels if no network found after energy scan on the primary channels.
channel_mask | - Channel mask. |