Logo
Developing with ZBOSS for Zigbee

Data Structures

struct  zb_peripheral_zdd_t
 This struct represents a remote Zigbee Direct Device to the ZVD API. More...
 
struct  zbd_network_status_s
 
struct  zbd_status_code_s
 
struct  zbd_nwk_channel_list_s
 
struct  zbd_zvd_comm_service_params_t
 Commissioning Service request parameters. More...
 

Macros

#define ZIGBEE_DIRECT_DEFAULT_PROXY_NAME   "DSR ZDD"
 
#define ZBD_BLE_CONN_ID_INVALID   (zb_ble_conn_id_t)(-1)
 
#define MAX_NWK_CHANNEL_LIST_PAGES   20
 

Typedefs

typedef zb_uint16_t zbd_data_len_t
 
typedef enum zbd_zdd_recv_callback_ret_e zbd_zdd_recv_callback_ret_t
 Return codes for callback functions. More...
 
typedef zbd_zdd_recv_callback_ret_t(* zbd_zdd_recv_callback_t) (zb_ble_conn_id_t conn_id, zb_ble_characteristic_handle_t charact_handle, const zb_uint8_t *data, zbd_data_len_t len)
 Callback type that is being used on new data receiving. More...
 
typedef void(* zbd_zdd_send_callback_t) (zb_ble_conn_id_t conn_id, zb_ble_characteristic_handle_t charact_handle, zb_bool_t success)
 Callback type that is being called after data sending. More...
 
typedef void(* zbd_zdd_simple_callback_t) (zb_ble_conn_id_t conn_id)
 All other callback types like new BLE device connected, etc. More...
 
typedef void(* zbd_zdd_subscribe_callback_t) (zb_ble_conn_id_t conn_id, zb_ble_characteristic_handle_t charact_handle, zb_bool_t is_subscribed)
 Callback type that is being used on peer subscribing or unsubscribing. More...
 
typedef enum zbd_zdd_data_request_callback_ret_e zbd_zdd_data_request_callback_ret_t
 
typedef zbd_zdd_data_request_callback_ret_t(* zbd_zdd_data_request_callback_t) (zb_ble_conn_id_t conn_id, zb_ble_characteristic_handle_t charact_handle, zb_uint8_t *data, zbd_data_len_t *len)
 Callback used to write to the value of a characteristic right before sending data to the peer that executed a read operation. More...
 
typedef enum zbd_characteristic_properties_e zbd_characteristic_properties_t
 
typedef struct zb_peripheral_zdd_t ZB_PERIPHERAL_ZDD_T
 This struct represents a remote Zigbee Direct Device to the ZVD API. More...
 
typedef struct zbd_network_status_s zbd_network_status_t
 
typedef enum zbd_status_domain_e zbd_status_domain_t
 
typedef enum zbd_status_code_value_e zbd_status_code_value_t
 
typedef struct zbd_status_code_s zbd_status_code_t
 
typedef struct zbd_nwk_channel_list_s zbd_nwk_channel_list_t
 
typedef struct zbd_zvd_comm_service_params_t ZBD_ZVD_COMM_SERVICE_PARAMS_T
 Commissioning Service request parameters. More...
 
typedef enum zbd_zvd_operation_error_t ZBD_ZVD_OPERATION_ERROR_T
 Operation error codes. More...
 
typedef enum zbd_zvd_comm_service_param_bitmasks_t ZBD_ZVD_COMM_SERVICE_PARAM_BITMASKS_T
 Commissioning Service parameter masks. More...
 
typedef enum joined_status_e joined_status_t
 
typedef enum zbd_characteristic_tag_e zbd_characteristic_tag_t
 
typedef enum zbd_device_type_e zbd_device_type_t
 
typedef enum zbd_joining_method_e zbd_joining_method_t
 
typedef enum zbd_manage_joiners_cmd_e zbd_manage_joiners_cmd_t
 
typedef void(* zbd_zvd_comm_status_update_callback_t) (zb_ble_conn_id_t conn_id, const ZBD_ZVD_COMM_SERVICE_PARAMS_T *params)
 Callback type used when ZDD notifies a commissioning service status update. More...
 
typedef void(* zbd_zvd_operation_return_callback_t) (zb_ble_conn_id_t conn_id, ZBD_ZVD_OPERATION_ERROR_T operation_error)
 Callback type used when a ZDD operation (characteristic read or write) returns with an error code. More...
 
typedef void(* zbd_zvd_security_establish_secure_session_callback_t) (zb_ble_conn_id_t conn_id, zb_bool_t success, const zb_uint8_t *zdd_ieee_addr)
 Callback type used when the secure session establishment between ZVD and ZDD is done. More...
 
typedef void(* zbd_zvd_periph_list_updated_callback_t) (void)
 Callback type that is being used when there is an update to the discovered peripheral list. More...
 
typedef void(* zbd_zvd_simple_callback_t) (zb_ble_conn_id_t conn_id)
 All other callback types. More...
 
typedef zb_uint8_t zbd_aps_link_key_flags_mask_t
 Type for ZBD APS Link Key Flags Mask. More...
 

Enumerations

enum  zbd_zdd_recv_callback_ret_e {
  ZBD_ZDD_RECV_RET_OK = 0, ZBD_ZDD_RECV_RET_ERROR, ZBD_ZDD_RECV_RET_DECRYPTION_FAIL, ZBD_ZDD_RECV_RET_UNAUTHORIZED,
  ZBD_ZDD_RECV_RET_PROCEDURE_ALREADY_IN_PROGRESS
}
 Return codes for callback functions. More...
 
enum  zbd_zdd_data_request_callback_ret_e {
  ZBD_ZDD_DATA_REQUEST_RET_OK = 0, ZBD_ZDD_DATA_REQUEST_RET_ERROR_INVALID_PARAM, ZBD_ZDD_DATA_REQUEST_RET_ERROR_ENCRYPTION_FAIL, ZBD_ZDD_DATA_REQUEST_RET_ERROR_UNAUTHORIZED,
  ZBD_ZDD_DATA_REQUEST_RET_ERROR_PROCEDURE_ALREADY_IN_PROGRESS
}
 
enum  zbd_characteristic_properties_e { ZBD_CHAR_PROP_READ = 1 << 0, ZBD_CHAR_PROP_WRITE = 1 << 1, ZBD_CHAR_PROP_INDICATE = 1 << 2, ZBD_CHAR_PROP_NOTIFY = 1 << 3 }
 
enum  zbd_status_domain_e {
  ZBD_STATUS_DOMAIN_GENERAL = 0x00, ZBD_STATUS_DOMAIN_FORM = 0x01, ZBD_STATUS_DOMAIN_JOIN = 0x02, ZBD_STATUS_DOMAIN_PERMIT_JOIN = 0x03,
  ZBD_STATUS_DOMAIN_LEAVE = 0x04, ZBD_STATUS_DOMAIN_MANAGE_JOINERS = 0x05, ZBD_STATUS_DOMAIN_IDENTIFY = 0x06, ZBD_STATUS_DOMAIN_FINDING_BINDING = 0x07,
  ZBD_STATUS_DOMAIN_MAX = 0x08
}
 
enum  zbd_status_code_value_e { ZBD_STATUS_CODE_SUCCESS = 0, ZBD_STATUS_CODE_FAIL = 1, ZBD_STATUS_CODE_MAX = 2 }
 
enum  zbd_zvd_operation_error_t { ZBD_ZVD_OPERATION_OK = 0, ZBD_ZVD_OPERATION_ERROR_READ = -1, ZBD_ZVD_OPERATION_ERROR_WRITE = -2, ZBD_ZVD_OPERATION_ERROR_UNKNOWN = -3 }
 Operation error codes. More...
 
enum  zbd_zvd_comm_service_param_bitmasks_t {
  ZBD_ZVD_COMM_SERVICE_PARAM_EXT_PAN_ID = (1 << 0), ZBD_ZVD_COMM_SERVICE_PARAM_SHORT_PAN_ID = (1 << 1), ZBD_ZVD_COMM_SERVICE_PARAM_NWK_CHANNEL = (1 << 2), ZBD_ZVD_COMM_SERVICE_PARAM_NWK_KEY = (1 << 3),
  ZBD_ZVD_COMM_SERVICE_PARAM_LINK_KEY = (1 << 4), ZBD_ZVD_COMM_SERVICE_PARAM_DEVICE_TYPE = (1 << 5), ZBD_ZVD_COMM_SERVICE_PARAM_NWK_ADDR = (1 << 6), ZBD_ZVD_COMM_SERVICE_PARAM_JOINING_METHOD = (1 << 7),
  ZBD_ZVD_COMM_SERVICE_PARAM_IEEE_ADDR = (1 << 8), ZBD_ZVD_COMM_SERVICE_PARAM_TC_ADDR = (1 << 9), ZBD_ZVD_COMM_SERVICE_PARAM_NWK_STATUS_MAP = (1 << 10), ZBD_ZVD_COMM_SERVICE_PARAM_NWK_UPDATE_ID = (1 << 11),
  ZBD_ZVD_COMM_SERVICE_PARAM_NWK_ACTIVE_KEY_SEQ_NUM = (1 << 12), ZBD_ZVD_COMM_SERVICE_PARAM_ADMIN_KEY = (1 << 13), ZBD_ZVD_COMM_SERVICE_PARAM_STATUS_CODE = (1 << 14), ZBD_ZVD_COMM_SERVICE_PARAM_MANAGE_JOINERS_CMD = (1 << 15),
  ZBD_ZVD_COMM_SERVICE_PARAM_MANAGE_JOINERS_IEEE = (1 << 16), ZBD_ZVD_COMM_SERVICE_PARAM_MANAGE_JOINERS_LNK_KEY = (1 << 17)
}
 Commissioning Service parameter masks. More...
 
enum  joined_status_e { JOINED_STATUS_NOT_COMMISSIONED = 0, JOINED_STATUS_COMMISSIONING_IN_PROGRESS = 1, JOINED_STATUS_COMMISSIONED = 2 }
 
enum  zbd_characteristic_tag_e {
  ZBD_SECURITY_P256_CHAR, ZBD_SECURITY_C25519_CHAR, ZBD_COMM_NWK_FORM_CHAR, ZBD_COMM_NWK_JOIN_CHAR,
  ZBD_COMM_NWK_PERMIT_JOIN_CHAR, ZBD_COMM_NWK_LEAVE_CHAR, ZBD_COMM_NWK_STATUS_CHAR, ZBD_COMM_MANAGE_JOINERS_CHAR,
  ZBD_COMM_IDENTIFICATION_CHAR, ZBD_COMM_FINDING_BINDING_CHAR, ZBD_TUNNEL_CHAR, ZBD_DUMP_CHAR,
  ZBD_USER_CHAR, ZBD_CHAR_LAST
}
 
enum  zbd_device_type_e { ZBD_DEVICE_TYPE_COORDINATOR = 0, ZBD_DEVICE_TYPE_ROUTER, ZBD_DEVICE_TYPE_ED }
 
enum  zbd_joining_method_e { ZBD_JOINING_METHOD_MAC_ASSOCIATION = 0, ZBD_JOINING_METHOD_REJOIN = 1, ZBD_JOINING_METHOD_OUT_OF_BAND = 2, ZBD_JOINING_METHOD_RESERVED_MAX = 3 }
 
enum  zbd_manage_joiners_cmd_e { ZBD_MANAGE_JOINERS_CMD_DROP_ALL_JOINERS = 0x00, ZBD_MANAGE_JOINERS_CMD_ADD_JOINER = 0x01, ZBD_MANAGE_JOINERS_CMD_REMOVE_JOINER = 0x02 }
 

Functions

zb_ret_t zbd_ble_create_service (const zb_uint8_t *uuid128, zb_ble_service_handle_t *service_handle)
 Create a BLE service with a custom 128-bit UUID. More...
 
zb_ret_t zbd_ble_create_service_short_uuid (zb_uint16_t uuid16, zb_ble_service_handle_t *service_handle)
 Create a BLE service with a short 16-bit UUID. More...
 
zb_uint8_t zbd_ble_get_curr_mtu (zb_ble_conn_id_t connection_id)
 Get current MTU size for particular BLE connection. More...
 
zb_ret_t zbd_ble_indicate (zb_ble_conn_id_t conn_id, zb_ble_characteristic_handle_t charact_handle, const zb_uint8_t *data, zbd_data_len_t len)
 Request an indication sending to one peer. More...
 
zb_ret_t zbd_ble_notify_peer (zb_ble_conn_id_t conn_id, zb_ble_characteristic_handle_t charact_handle, const zb_uint8_t *data, zbd_data_len_t len)
 Request a notification for a specific subscribed peer. More...
 
void zbd_ble_set_user_recv_callback (zbd_zdd_recv_callback_t callback)
 Set receiving callback for user defined characteristics. More...
 
void zbd_ble_set_user_data_request_callback (zbd_zdd_data_request_callback_t callback)
 Set data request callback for user defined characteristics. More...
 
void zbd_ble_set_user_send_callback (zbd_zdd_send_callback_t callback)
 Set sending callback for user defined characteristics. More...
 
zb_ret_t zbd_proxy_init (const zb_char_t *device_name, zb_uint8_t identification_ep)
 Initialize ZigBee Direct functionality. More...
 
void zbd_zdd_uninit (void)
 Uninitialize ZDD. More...
 
zb_ret_t zbd_proxy_enable_ble_interface (void)
 Enable BLE interface of the device, saves state to NVRAM. More...
 
zb_ret_t zbd_proxy_disable_ble_interface (zb_bool_t disconnect_from_peers)
 Disable BLE interface of the device, saves state to NVRAM. More...
 
zb_bool_t zbd_proxy_is_ble_interface_enabled (void)
 Check if BLE interface is enabled or not. More...
 
zb_ret_t zbd_proxy_ble_addr_get (zb_uint8_t *ble_address)
 Retrieves ZDD's 6-bytes bluetooth address. More...
 
zb_ret_t zbd_generate_eui64_from_mac_address (const zb_uint8_t *mac_address, zb_ieee_addr_t eui_64)
 Generates EUI-64 address from MAC address. More...
 
void zbd_zvd_establish_trusted_link (zb_uint8_t buffer, zb_uint16_t conn_id)
 Establishes Trusted Link between ZVD and connected ZDD The function is intended to initiate ZVD TC and ZDD commissioning process (ZVD TC sends Network Commissioning Request and waits for Network Commissioning Response) More...
 
zb_ret_t zbd_ble_addr_get (zb_uint8_t *ble_address)
 Retrieves the BLE device address. More...
 
 ZB_ASSERT_COMPILE_DECL (sizeof(zbd_network_status_t)==sizeof(zb_uint8_t))
 
void zbd_zvd_ble_set_periph_list_updated_callback (zbd_zvd_periph_list_updated_callback_t callback)
 Set a callback to be called when the discovered peripheral list is updated. More...
 
void zbd_zvd_ble_set_connect_callback (zbd_zvd_simple_callback_t callback)
 Set a callback to be called when a new connection to a peer must be handled. More...
 
void zbd_zvd_ble_set_disconnect_callback (zbd_zvd_simple_callback_t callback)
 Set a callback to be called when a peer is disconnected. More...
 
void zbd_zvd_ble_set_services_resolved_callback (zbd_zvd_simple_callback_t callback)
 Set a callback to be called when a ZDD services have been resolved and can be used by ZVD. More...
 
zb_ret_t zbd_zvd_init (const zb_char_t *device_name)
 Initialize ZVD, initializing BLE stack as a Central and ZigBee stack. More...
 
zb_ret_t zbd_zvd_discover_zdd (void)
 Starts discovering ZDD devices in range. More...
 
zb_ret_t zbd_zvd_stop_discovery (void)
 Stops discovering ZDD devices in range. More...
 
zb_uint32_t zbd_zvd_get_discovered_peripherals_list (ZB_PERIPHERAL_ZDD_T *list, zb_uint32_t max_count)
 Get the updated list of discovered peripherals. More...
 
zb_ret_t zbd_zvd_connect (const zb_uint8_t *ble_address)
 Connects to a designated ZDD in range using its BLE address. More...
 
zb_ret_t zbd_zvd_disconnect (zb_ble_conn_id_t conn_id)
 Disconnects from ZDD, if it is already connected to one. More...
 
void zbd_zvd_set_connect_callback (zbd_zvd_simple_callback_t callback)
 Set a callback to be called when ZVD connects to a ZDD. More...
 
void zbd_zvd_set_services_resolved_callback (zbd_zvd_simple_callback_t callback)
 Set a callback to be called when ZDD's services are resolved. More...
 
void zbd_zvd_set_disconnect_callback (zbd_zvd_simple_callback_t callback)
 Set a callback to be called when ZVD disconnects from a ZDD. More...
 
void zbd_zvd_set_zdd_list_updated_callback (zbd_zvd_periph_list_updated_callback_t callback)
 Set a callback to be called when the list of ZDD peripherals in range has been updated. More...
 
void zbd_zvd_uninit (void)
 Uninitialize ZVD. More...
 
const ZBD_ZVD_COMM_SERVICE_PARAMS_Tzbd_zvd_comm_get_params (zb_ble_conn_id_t conn_id)
 Get currently cached commissioning service parameters corresponding to ZDD at specified connection ID. More...
 
zb_ret_t zbd_zvd_comm_form_network (zb_ble_conn_id_t conn_id, const ZBD_ZVD_COMM_SERVICE_PARAMS_T *request, zb_bool_t centralized)
 Request ZDD to form a Zigbee network. More...
 
zb_ret_t zbd_zvd_comm_permit_joining (zb_ble_conn_id_t conn_id, zb_uint8_t permit_duration)
 Request ZDD to permit/prohibit joining of other devices in the ZigBee network. More...
 
zb_ret_t zbd_zvd_comm_join_network_mac_association (zb_ble_conn_id_t conn_id, const ZBD_ZVD_COMM_SERVICE_PARAMS_T *request)
 Request ZDD to join a ZigBee network via MAC association. More...
 
zb_ret_t zbd_zvd_comm_join_network_nwk_rejoin_with_key (zb_ble_conn_id_t conn_id, const ZBD_ZVD_COMM_SERVICE_PARAMS_T *request)
 Request ZDD to join a ZigBee network via NWK rejoin with key. More...
 
zb_ret_t zbd_zvd_comm_join_network_out_of_band_comm (zb_ble_conn_id_t conn_id, const ZBD_ZVD_COMM_SERVICE_PARAMS_T *request)
 Request ZDD to join a ZigBee network via out-of-band commissioning. More...
 
zb_ret_t zbd_zvd_comm_leave_network (zb_ble_conn_id_t conn_id, zb_bool_t remove_children, zb_bool_t rejoin)
 Request ZDD to leave the network it is currently connected to. More...
 
zb_ret_t zbd_zvd_comm_read_commissioning_status (zb_ble_conn_id_t conn_id)
 Reads Commissioning Status value. The result will be returned via callback that was registered with zbd_zvd_comm_set_status_update_callback. More...
 
void zbd_zvd_comm_set_status_update_callback (zbd_zvd_comm_status_update_callback_t callback)
 Set a callback to be called when ZDD notifies a commissioning service status update. More...
 
void zbd_zvd_set_operation_return_callback (zbd_zvd_operation_return_callback_t callback)
 Set a callback to be called when an operation (characteristic read/write) returns. More...
 
zb_ret_t zbd_zvd_comm_drop_all_joiners (zb_ble_conn_id_t conn_id, const ZBD_ZVD_COMM_SERVICE_PARAMS_T *request)
 Request ZDD to drop all joiners provisional link keys from its database. More...
 
zb_ret_t zbd_zvd_comm_add_joiner (zb_ble_conn_id_t conn_id, const ZBD_ZVD_COMM_SERVICE_PARAMS_T *request)
 Request ZDD to add a joiner provisional link key to its database (indexed by IEEE address) More...
 
zb_ret_t zbd_zvd_comm_remove_joiner (zb_ble_conn_id_t conn_id, const ZBD_ZVD_COMM_SERVICE_PARAMS_T *request)
 Request ZDD to remove a joiner provisional link key from its database (indexed by IEEE address) More...
 
zb_ret_t zbd_zvd_comm_generate_joiner_prov_link_key (zb_uint8_t *prov_link_key, zb_uint32_t length)
 Generates a 16-byte provisional link key for a joiner ZDD. More...
 
zb_ret_t zbd_zvd_comm_identify (zb_ble_conn_id_t conn_id, zb_uint16_t time)
 Sends ZDD a signal to start/stop identifying itself. More...
 
zb_ret_t zbd_zvd_comm_start_finding_and_binding (zb_ble_conn_id_t conn_id, zb_uint8_t endpoint, zb_bool_t initiator)
 Request ZDD to start finding & binding procedure. More...
 
zb_ret_t zbd_zvd_tunnel_send_npdu (zb_ble_conn_id_t conn_id, zb_uint8_t *payload, zb_uint8_t payload_length)
 Transport ZigBee Network Packet Data Units (NPDUs) over BLE from ZVD to ZDD. More...
 
zb_ret_t zbd_zvd_establish_secure_session (zb_ble_conn_id_t conn_id)
 Starts a secure session with the connected ZDD. More...
 
void zbd_zvd_security_set_secure_session_established_callback (zbd_zvd_security_establish_secure_session_callback_t callback)
 Set a callback to be called when the secure session establishment between ZVD and ZDD is done. More...
 
zb_ret_t zbd_zvd_security_set_negotiation_method (zb_ble_conn_id_t conn_id, zb_tlv_psk_secrets_t psk_type, zb_tlv_key_negotiation_methods_t key_neg_method, const zb_uint8_t *psk, zb_uint8_t length)
 Set a preshared key to be used during session establishment with zdd. More...
 
zb_ret_t zbd_zvd_security_set_nwk_key_seq_num (zb_ble_conn_id_t conn_id, zb_uint8_t nwk_key_seq_num)
 Set a Network Key Sequence Number, which will be included in the SE1 in case of basic authorization. More...
 
zb_ret_t zbd_zvd_security_generate_admin_key (const zb_uint8_t tclk[ZB_CCM_KEY_SIZE], zb_uint8_t admin_key[16])
 Generate administrative access key (does not apply as current PSK method) More...
 
zb_ret_t zbd_zvd_security_generate_basic_key (const zb_uint8_t nwk_key[ZB_CCM_KEY_SIZE], zb_uint8_t basic_key[16])
 Generate basic access key (does not apply as current PSK method) More...
 
const char * str_comm_joined_status (joined_status_t joined_status)
 
const char * str_comm_joining_method (zbd_joining_method_t joining_method)
 
const char * str_comm_device_type (zbd_device_type_t device_type)
 
const char * str_comm_manage_joiners_cmd (zbd_manage_joiners_cmd_t cmd)
 

ZBD APS Link Key Flags Mask

ZBD APS Link Key Flags Mask

#define ZBD_APS_LINK_KEY_FLAGS_MASK_UNIQUE   0b00000001U
 
#define ZBD_APS_LINK_KEY_FLAGS_MASK_PROVISIONAL   0b00000010U
 

Detailed Description

Macro Definition Documentation

§ MAX_NWK_CHANNEL_LIST_PAGES

§ ZBD_APS_LINK_KEY_FLAGS_MASK_PROVISIONAL

§ ZBD_APS_LINK_KEY_FLAGS_MASK_UNIQUE

§ ZBD_BLE_CONN_ID_INVALID

§ ZIGBEE_DIRECT_DEFAULT_PROXY_NAME

#define ZIGBEE_DIRECT_DEFAULT_PROXY_NAME   "DSR ZDD"

Typedef Documentation

§ joined_status_t

§ ZB_PERIPHERAL_ZDD_T

§ zbd_aps_link_key_flags_mask_t

§ zbd_characteristic_properties_t

§ zbd_characteristic_tag_t

§ zbd_data_len_t

§ zbd_device_type_t

§ zbd_joining_method_t

§ zbd_manage_joiners_cmd_t

§ zbd_network_status_t

§ zbd_nwk_channel_list_t

§ zbd_status_code_t

§ zbd_status_code_value_t

§ zbd_status_domain_t

§ zbd_zdd_data_request_callback_ret_t

§ zbd_zdd_data_request_callback_t

typedef zbd_zdd_data_request_callback_ret_t(* zbd_zdd_data_request_callback_t) (zb_ble_conn_id_t conn_id, zb_ble_characteristic_handle_t charact_handle, zb_uint8_t *data, zbd_data_len_t *len)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Callback used to write to the value of a characteristic right before sending data to the peer that executed a read operation.

Parameters
[in]conn_idConnection ID
[in]charact_handleCharacteristic handle returned on creation
[out]dataPointer to the buffer where the result will be stored
[in]len
  • [in] Size of the data buffer in bytes
  • [out] Length of the byte array written to the data buffer
Returns
zbd_zdd_data_request_callback_ret_t Return code from data request callback

§ zbd_zdd_recv_callback_ret_t

§ zbd_zdd_recv_callback_t

typedef zbd_zdd_recv_callback_ret_t(* zbd_zdd_recv_callback_t) (zb_ble_conn_id_t conn_id, zb_ble_characteristic_handle_t charact_handle, const zb_uint8_t *data, zbd_data_len_t len)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Callback type that is being used on new data receiving.

Returns
BLE GATT Status code
Note
The callback is being called from user space (not from ISR)

§ zbd_zdd_send_callback_t

typedef void(* zbd_zdd_send_callback_t) (zb_ble_conn_id_t conn_id, zb_ble_characteristic_handle_t charact_handle, zb_bool_t success)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Callback type that is being called after data sending.

Note
The callback is being called from user space (not from ISR)

§ zbd_zdd_simple_callback_t

typedef void(* zbd_zdd_simple_callback_t) (zb_ble_conn_id_t conn_id)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

All other callback types like new BLE device connected, etc.

Note
The callback is being called from user space (not from ISR)

§ zbd_zdd_subscribe_callback_t

typedef void(* zbd_zdd_subscribe_callback_t) (zb_ble_conn_id_t conn_id, zb_ble_characteristic_handle_t charact_handle, zb_bool_t is_subscribed)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Callback type that is being used on peer subscribing or unsubscribing.

Note
The callback is being called from BLE thread/ISR

§ ZBD_ZVD_COMM_SERVICE_PARAM_BITMASKS_T

§ ZBD_ZVD_COMM_SERVICE_PARAMS_T

§ zbd_zvd_comm_status_update_callback_t

typedef void(* zbd_zvd_comm_status_update_callback_t) (zb_ble_conn_id_t conn_id, const ZBD_ZVD_COMM_SERVICE_PARAMS_T *params)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Callback type used when ZDD notifies a commissioning service status update.

Parameters
[in]conn_idConnection ID
[in]paramsZVD Commissioning Service parameters

§ ZBD_ZVD_OPERATION_ERROR_T

§ zbd_zvd_operation_return_callback_t

typedef void(* zbd_zvd_operation_return_callback_t) (zb_ble_conn_id_t conn_id, ZBD_ZVD_OPERATION_ERROR_T operation_error)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Callback type used when a ZDD operation (characteristic read or write) returns with an error code.

Parameters
[in]conn_idConnection ID
[in]operation_errorOperation error code

§ zbd_zvd_periph_list_updated_callback_t

typedef void(* zbd_zvd_periph_list_updated_callback_t) (void)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Callback type that is being used when there is an update to the discovered peripheral list.

§ zbd_zvd_security_establish_secure_session_callback_t

typedef void(* zbd_zvd_security_establish_secure_session_callback_t) (zb_ble_conn_id_t conn_id, zb_bool_t success, const zb_uint8_t *zdd_ieee_addr)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Callback type used when the secure session establishment between ZVD and ZDD is done.

Parameters
[in]conn_idConnection ID
[in]successtrue if the secure session was successfully established; false otherwise
[in]zdd_ieee_addrzdd ieee address

§ zbd_zvd_simple_callback_t

typedef void(* zbd_zvd_simple_callback_t) (zb_ble_conn_id_t conn_id)

Enumeration Type Documentation

§ joined_status_e

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Enumerator
JOINED_STATUS_NOT_COMMISSIONED 
JOINED_STATUS_COMMISSIONING_IN_PROGRESS 
JOINED_STATUS_COMMISSIONED 

§ zbd_characteristic_properties_e

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Enumerator
ZBD_CHAR_PROP_READ 
ZBD_CHAR_PROP_WRITE 
ZBD_CHAR_PROP_INDICATE 
ZBD_CHAR_PROP_NOTIFY 

§ zbd_characteristic_tag_e

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Enumerator
ZBD_SECURITY_P256_CHAR 
ZBD_SECURITY_C25519_CHAR 
ZBD_COMM_NWK_FORM_CHAR 
ZBD_COMM_NWK_JOIN_CHAR 
ZBD_COMM_NWK_PERMIT_JOIN_CHAR 
ZBD_COMM_NWK_LEAVE_CHAR 
ZBD_COMM_NWK_STATUS_CHAR 
ZBD_COMM_MANAGE_JOINERS_CHAR 
ZBD_COMM_IDENTIFICATION_CHAR 
ZBD_COMM_FINDING_BINDING_CHAR 
ZBD_TUNNEL_CHAR 
ZBD_DUMP_CHAR 
ZBD_USER_CHAR 
ZBD_CHAR_LAST 

§ zbd_device_type_e

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Enumerator
ZBD_DEVICE_TYPE_COORDINATOR 
ZBD_DEVICE_TYPE_ROUTER 
ZBD_DEVICE_TYPE_ED 

§ zbd_joining_method_e

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Enumerator
ZBD_JOINING_METHOD_MAC_ASSOCIATION 
ZBD_JOINING_METHOD_REJOIN 
ZBD_JOINING_METHOD_OUT_OF_BAND 
ZBD_JOINING_METHOD_RESERVED_MAX 

§ zbd_manage_joiners_cmd_e

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Enumerator
ZBD_MANAGE_JOINERS_CMD_DROP_ALL_JOINERS 
ZBD_MANAGE_JOINERS_CMD_ADD_JOINER 
ZBD_MANAGE_JOINERS_CMD_REMOVE_JOINER 

§ zbd_status_code_value_e

§ zbd_status_domain_e

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Enumerator
ZBD_STATUS_DOMAIN_GENERAL 
ZBD_STATUS_DOMAIN_FORM 
ZBD_STATUS_DOMAIN_JOIN 
ZBD_STATUS_DOMAIN_PERMIT_JOIN 
ZBD_STATUS_DOMAIN_LEAVE 
ZBD_STATUS_DOMAIN_MANAGE_JOINERS 
ZBD_STATUS_DOMAIN_IDENTIFY 
ZBD_STATUS_DOMAIN_FINDING_BINDING 
ZBD_STATUS_DOMAIN_MAX 

§ zbd_zdd_data_request_callback_ret_e

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Enumerator
ZBD_ZDD_DATA_REQUEST_RET_OK 
ZBD_ZDD_DATA_REQUEST_RET_ERROR_INVALID_PARAM 
ZBD_ZDD_DATA_REQUEST_RET_ERROR_ENCRYPTION_FAIL 
ZBD_ZDD_DATA_REQUEST_RET_ERROR_UNAUTHORIZED 
ZBD_ZDD_DATA_REQUEST_RET_ERROR_PROCEDURE_ALREADY_IN_PROGRESS 

§ zbd_zdd_recv_callback_ret_e

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Return codes for callback functions.

Enumerator
ZBD_ZDD_RECV_RET_OK 
ZBD_ZDD_RECV_RET_ERROR 
ZBD_ZDD_RECV_RET_DECRYPTION_FAIL 
ZBD_ZDD_RECV_RET_UNAUTHORIZED 
ZBD_ZDD_RECV_RET_PROCEDURE_ALREADY_IN_PROGRESS 

§ zbd_zvd_comm_service_param_bitmasks_t

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Commissioning Service parameter masks.

Enumerator
ZBD_ZVD_COMM_SERVICE_PARAM_EXT_PAN_ID 
ZBD_ZVD_COMM_SERVICE_PARAM_SHORT_PAN_ID 
ZBD_ZVD_COMM_SERVICE_PARAM_NWK_CHANNEL 
ZBD_ZVD_COMM_SERVICE_PARAM_NWK_KEY 
ZBD_ZVD_COMM_SERVICE_PARAM_LINK_KEY 
ZBD_ZVD_COMM_SERVICE_PARAM_DEVICE_TYPE 
ZBD_ZVD_COMM_SERVICE_PARAM_NWK_ADDR 
ZBD_ZVD_COMM_SERVICE_PARAM_JOINING_METHOD 
ZBD_ZVD_COMM_SERVICE_PARAM_IEEE_ADDR 
ZBD_ZVD_COMM_SERVICE_PARAM_TC_ADDR 
ZBD_ZVD_COMM_SERVICE_PARAM_NWK_STATUS_MAP 
ZBD_ZVD_COMM_SERVICE_PARAM_NWK_UPDATE_ID 
ZBD_ZVD_COMM_SERVICE_PARAM_NWK_ACTIVE_KEY_SEQ_NUM 
ZBD_ZVD_COMM_SERVICE_PARAM_ADMIN_KEY 
ZBD_ZVD_COMM_SERVICE_PARAM_STATUS_CODE 
ZBD_ZVD_COMM_SERVICE_PARAM_MANAGE_JOINERS_CMD 
ZBD_ZVD_COMM_SERVICE_PARAM_MANAGE_JOINERS_IEEE 
ZBD_ZVD_COMM_SERVICE_PARAM_MANAGE_JOINERS_LNK_KEY 

§ zbd_zvd_operation_error_t

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Operation error codes.

Enumerator
ZBD_ZVD_OPERATION_OK 
ZBD_ZVD_OPERATION_ERROR_READ 
ZBD_ZVD_OPERATION_ERROR_WRITE 
ZBD_ZVD_OPERATION_ERROR_UNKNOWN 

Function Documentation

§ str_comm_device_type()

§ str_comm_joined_status()

§ str_comm_joining_method()

§ str_comm_manage_joiners_cmd()

§ ZB_ASSERT_COMPILE_DECL()

§ zbd_ble_addr_get()

zb_ret_t zbd_ble_addr_get ( zb_uint8_t ble_address)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Retrieves the BLE device address.

Parameters
ble_addressPointer to the buffer where the address will be stored (6-bytes array), MSB at position 0, LSB at position 5
Returns
zb_ret_t
  • RET_OK on success
  • RET_UNINITIALIZED if BLE stack is not initialized yet
  • RET_ERROR on internal stack error

§ zbd_ble_create_service()

zb_ret_t zbd_ble_create_service ( const zb_uint8_t uuid128,
zb_ble_service_handle_t *  service_handle 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Create a BLE service with a custom 128-bit UUID.

Parameters
uuid128Pointer to 16-bytes array contatining desired UUID
[out]service_handlepointer to variable to store handle of created service in
Returns
RET_OK if service was successfully created, RET_ERROR otherwise

§ zbd_ble_create_service_short_uuid()

zb_ret_t zbd_ble_create_service_short_uuid ( zb_uint16_t  uuid16,
zb_ble_service_handle_t *  service_handle 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Create a BLE service with a short 16-bit UUID.

Parameters
uuid16Desired 16-bit UUID
service_handlepointer to variable to store handle of created service in
Returns
RET_OK if service was successfully created, RET_ERROR otherwise

§ zbd_ble_get_curr_mtu()

zb_uint8_t zbd_ble_get_curr_mtu ( zb_ble_conn_id_t  connection_id)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Get current MTU size for particular BLE connection.

Parameters
connection_idConnection ID
Returns
zb_uint8_t Negotiated BLE MTU size

§ zbd_ble_indicate()

zb_ret_t zbd_ble_indicate ( zb_ble_conn_id_t  conn_id,
zb_ble_characteristic_handle_t  charact_handle,
const zb_uint8_t data,
zbd_data_len_t  len 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request an indication sending to one peer.

Parameters
conn_idID of a connection where to send the indication to
charact_handleCharacteristic handle returned on creation
dataPointer to a data block to be sent
lenSize of the data
Returns
zb_ret_t
  • RET_OK on success
  • RET_BLOCKED if another indication is in progress now
  • RET_ERROR on internal stack error
Note
Keep in mind that the function doesn't actually send the data. It makes an indication request instead and a real sending will be handled by a BLE stack a bit later. This function doesn't copy the data to internal buffers. It stores the data pointer internally, so you shouldn't change the data in the buffer until send_callback will be called.

§ zbd_ble_notify_peer()

zb_ret_t zbd_ble_notify_peer ( zb_ble_conn_id_t  conn_id,
zb_ble_characteristic_handle_t  charact_handle,
const zb_uint8_t data,
zbd_data_len_t  len 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request a notification for a specific subscribed peer.

Parameters
conn_idID of a connection where to send the notification to
charact_handleCharacteristic handle returned on creation
dataPointer to a data block to be sent
lenSize of the data
Returns
zb_ret_t
  • RET_ON on success
  • RET_ERROR on internal stack error
Note
Keep in mind that the function doesn't actually send the data. It makes a notification request instead and a real sending will be handled by a BLE stack a bit later. This function doesn't copy the data to internal buffers. It stores the data pointer internally, so you shouldn't change the data in the buffer until notif_send_callback will be called.

§ zbd_ble_set_user_data_request_callback()

void zbd_ble_set_user_data_request_callback ( zbd_zdd_data_request_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set data request callback for user defined characteristics.

Parameters
callbackA callback

§ zbd_ble_set_user_recv_callback()

void zbd_ble_set_user_recv_callback ( zbd_zdd_recv_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set receiving callback for user defined characteristics.

Parameters
callbackA callback

§ zbd_ble_set_user_send_callback()

void zbd_ble_set_user_send_callback ( zbd_zdd_send_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set sending callback for user defined characteristics.

Parameters
callbackA callback

§ zbd_generate_eui64_from_mac_address()

zb_ret_t zbd_generate_eui64_from_mac_address ( const zb_uint8_t mac_address,
zb_ieee_addr_t  eui_64 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Generates EUI-64 address from MAC address.

Parameters
[in]mac_addressMAC address, byte array of length 6, position 0 is the MSB and position 5 is the LSB
[out]eui_64Generated EUI-64 address, byte array of length 8, position 0 is the LSB and position 7 is the MSB
Returns
zb_ret_t
  • RET_OK on success
  • RET_INVALID_PARAMETER if NULL pointers are used

§ zbd_proxy_ble_addr_get()

zb_ret_t zbd_proxy_ble_addr_get ( zb_uint8_t ble_address)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Retrieves ZDD's 6-bytes bluetooth address.

Parameters
ble_address[OUT] pointer to 6-bytes array to store the address
Returns
RET_OK address was successfully retrieved RET_ERROR failed to retrieve address RET_UNINITIALIZED BLE stack was not initialized yet

§ zbd_proxy_disable_ble_interface()

zb_ret_t zbd_proxy_disable_ble_interface ( zb_bool_t  disconnect_from_peers)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Disable BLE interface of the device, saves state to NVRAM.

Parameters
disconnect_from_peerswhether or not shall ZDD perform a disconnection from every ZVD before disabling BLE interface
Returns
RET_OK interface was successfully disabled RET_BUSY interface was already scheduled to disconnect, dismiss disabling RET_ERROR failed to stop advertising

§ zbd_proxy_enable_ble_interface()

zb_ret_t zbd_proxy_enable_ble_interface ( void  )

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Enable BLE interface of the device, saves state to NVRAM.

Returns
RET_OK interface was successfully enabled RET_BUSY interface was already scheduled to disconnect, dismiss enabling RET_ERROR failure during interface enabling

§ zbd_proxy_init()

zb_ret_t zbd_proxy_init ( const zb_char_t device_name,
zb_uint8_t  identification_ep 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Initialize ZigBee Direct functionality.

Parameters
device_nameBLE device name
identification_ependpoint number to to perform ZBD identifiation on
Returns
RET_OK if ZigBee Direct Proxy Device was initialized correctly, RET_ERROR otherwise

§ zbd_proxy_is_ble_interface_enabled()

zb_bool_t zbd_proxy_is_ble_interface_enabled ( void  )

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Check if BLE interface is enabled or not.

Returns
ZB_TRUE if BLE interface is enabled, otherwise ZB_FALSE

§ zbd_zdd_uninit()

§ zbd_zvd_ble_set_connect_callback()

void zbd_zvd_ble_set_connect_callback ( zbd_zvd_simple_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when a new connection to a peer must be handled.

Parameters
callbackA callback

§ zbd_zvd_ble_set_disconnect_callback()

void zbd_zvd_ble_set_disconnect_callback ( zbd_zvd_simple_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when a peer is disconnected.

Parameters
callbackA callback

§ zbd_zvd_ble_set_periph_list_updated_callback()

void zbd_zvd_ble_set_periph_list_updated_callback ( zbd_zvd_periph_list_updated_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when the discovered peripheral list is updated.

Parameters
callbackA callback

§ zbd_zvd_ble_set_services_resolved_callback()

void zbd_zvd_ble_set_services_resolved_callback ( zbd_zvd_simple_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when a ZDD services have been resolved and can be used by ZVD.

Parameters
callbackA callback

§ zbd_zvd_comm_add_joiner()

zb_ret_t zbd_zvd_comm_add_joiner ( zb_ble_conn_id_t  conn_id,
const ZBD_ZVD_COMM_SERVICE_PARAMS_T request 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request ZDD to add a joiner provisional link key to its database (indexed by IEEE address)

Parameters
[in]conn_idConnection ID
[in]requestCommissioning service request parameters
  • Required parameters:
    • manage_joiners_cmd
    • ieee_addr
    • link_key
  • Invalid parameters:
    • device_type
    • nwk_status_map
    • status_code
    • joining_method
    • ext_pan_id
    • short_pan_id
    • nwk_channel
    • nwk_key
    • admin_key
    • link_key
    • tc_addr
    • nwk_addr
    • nwk_update_id
    • nwk_active_key_seq_num
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_drop_all_joiners()

zb_ret_t zbd_zvd_comm_drop_all_joiners ( zb_ble_conn_id_t  conn_id,
const ZBD_ZVD_COMM_SERVICE_PARAMS_T request 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request ZDD to drop all joiners provisional link keys from its database.

Parameters
[in]conn_idConnection ID
[in]requestCommissioning service request parameters
  • Required parameters:
    • manage_joiners_cmd
  • Invalid parameters:
    • ieee_addr
    • link_key
    • device_type
    • nwk_status_map
    • status_code
    • joining_method
    • ext_pan_id
    • short_pan_id
    • nwk_channel
    • nwk_key
    • admin_key
    • link_key
    • tc_addr
    • nwk_addr
    • nwk_update_id
    • nwk_active_key_seq_num
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_form_network()

zb_ret_t zbd_zvd_comm_form_network ( zb_ble_conn_id_t  conn_id,
const ZBD_ZVD_COMM_SERVICE_PARAMS_T request,
zb_bool_t  centralized 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request ZDD to form a Zigbee network.

Parameters
[in]conn_idConnection ID
[in]requestCommissioning service request parameters
  • Required parameters:
    • admin_key (only for centralized == false)
    • tc_addr (only for centralized == false)
  • Optional parameters:
    • ext_pan_id
    • short_pan_id
    • nwk_channel
    • nwk_key
    • link_key
    • nwk_addr
    • nwk_update_id
    • nwk_active_key_seq_num
  • Invalid parameters:
    • device_type
    • joining_method
    • ieee_addr
    • nwk_status_map
    • status_code
[in]centralizedIndicates if the requested Zigbee network should have centralized or distributed security
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_generate_joiner_prov_link_key()

zb_ret_t zbd_zvd_comm_generate_joiner_prov_link_key ( zb_uint8_t prov_link_key,
zb_uint32_t  length 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Generates a 16-byte provisional link key for a joiner ZDD.

Parameters
[out]prov_link_keyGenerated joiner's provisional link key, a 16-byte array
[in]lengthLength of the output buffer pointed by prov_link_key
Returns
zb_ret_t
  • RET_OK on success
  • RET_INVALID_PARAMETER if prov_link_key is NULL or if length is not 16
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_get_params()

const ZBD_ZVD_COMM_SERVICE_PARAMS_T* zbd_zvd_comm_get_params ( zb_ble_conn_id_t  conn_id)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Get currently cached commissioning service parameters corresponding to ZDD at specified connection ID.

Parameters
[in]conn_idConnection ID
Returns
Pointer to a structure with commissioning service parameters or NULL, if conn_id is not valid

§ zbd_zvd_comm_identify()

zb_ret_t zbd_zvd_comm_identify ( zb_ble_conn_id_t  conn_id,
zb_uint16_t  time 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Sends ZDD a signal to start/stop identifying itself.

Parameters
[in]conn_idConnection ID
[in]timeTime to identify. If equal to zero then identification stops
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_join_network_mac_association()

zb_ret_t zbd_zvd_comm_join_network_mac_association ( zb_ble_conn_id_t  conn_id,
const ZBD_ZVD_COMM_SERVICE_PARAMS_T request 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request ZDD to join a ZigBee network via MAC association.

Parameters
[in]conn_idConnection ID
[in]requestCommissioning service request parameters
  • Required parameters:
    • joining_method
  • Optional parameters:
    • admin_key
    • nwk_channel
    • ext_pan_id
    • short_pan_id
    • link_key
    • tc_addr
    • nwk_addr
  • Invalid parameters:
    • nwk_key
    • nwk_update_id
    • nwk_active_key_seq_num
    • device_type
    • ieee_addr
    • nwk_status_map
    • status_code
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_join_network_nwk_rejoin_with_key()

zb_ret_t zbd_zvd_comm_join_network_nwk_rejoin_with_key ( zb_ble_conn_id_t  conn_id,
const ZBD_ZVD_COMM_SERVICE_PARAMS_T request 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request ZDD to join a ZigBee network via NWK rejoin with key.

Parameters
[in]conn_idConnection ID
[in]requestCommissioning service request parameters
  • Required parameters:
    • joining_method
  • Optional parameters:
    • admin_key
    • nwk_channel
    • short_pan_id
    • tc_addr
  • Invalid parameters:
    • ext_pan_id
    • link_key
    • nwk_addr
    • nwk_key
    • nwk_update_id
    • nwk_active_key_seq_num
    • device_type
    • ieee_addr
    • nwk_status_map
    • status_code
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_join_network_out_of_band_comm()

zb_ret_t zbd_zvd_comm_join_network_out_of_band_comm ( zb_ble_conn_id_t  conn_id,
const ZBD_ZVD_COMM_SERVICE_PARAMS_T request 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request ZDD to join a ZigBee network via out-of-band commissioning.

Parameters
[in]conn_idConnection ID
[in]requestCommissioning service request parameters
  • Required parameters:
    • joining_method
    • ext_pan_id
    • short_pan_id
    • nwk_channel
    • nwk_key
  • Optional parameters:
    • admin_key
    • link_key
    • tc_addr
    • nwk_addr
    • nwk_update_id
    • nwk_active_key_seq_num
  • Invalid parameters:
    • device_type
    • ieee_addr
    • nwk_status_map
    • status_code
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_leave_network()

zb_ret_t zbd_zvd_comm_leave_network ( zb_ble_conn_id_t  conn_id,
zb_bool_t  remove_children,
zb_bool_t  rejoin 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request ZDD to leave the network it is currently connected to.

Parameters
[in]conn_idConnection ID
[in]remove_childrenSet this to TRUE to ask ZDD to also remove its child devices, if any. Otherwise, set to FALSE
[in]rejoinSet this parameter to TRUE to ask ZDD to rejoin the network. Otherwise, set to FALSE
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_permit_joining()

zb_ret_t zbd_zvd_comm_permit_joining ( zb_ble_conn_id_t  conn_id,
zb_uint8_t  permit_duration 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request ZDD to permit/prohibit joining of other devices in the ZigBee network.

Parameters
[in]conn_idConnection ID
[in]permit_durationTime, in seconds, during which ZigBee router or coordinator will allow associations.
  • 0x00: closes the network
  • 0x01 to 0xFE: opens the network with the specified time limit (in seconds)
  • 0xFF: same value as 0xFE
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_read_commissioning_status()

zb_ret_t zbd_zvd_comm_read_commissioning_status ( zb_ble_conn_id_t  conn_id)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Reads Commissioning Status value. The result will be returned via callback that was registered with zbd_zvd_comm_set_status_update_callback.

Parameters
[in]conn_idConnection ID
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_remove_joiner()

zb_ret_t zbd_zvd_comm_remove_joiner ( zb_ble_conn_id_t  conn_id,
const ZBD_ZVD_COMM_SERVICE_PARAMS_T request 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request ZDD to remove a joiner provisional link key from its database (indexed by IEEE address)

Parameters
[in]conn_idConnection ID
[in]requestCommissioning service request parameters
  • Required parameters:
    • manage_joiners_cmd
    • ieee_addr
  • Invalid parameters:
    • link_key
    • device_type
    • nwk_status_map
    • status_code
    • joining_method
    • ext_pan_id
    • short_pan_id
    • nwk_channel
    • nwk_key
    • admin_key
    • link_key
    • tc_addr
    • nwk_addr
    • nwk_update_id
    • nwk_active_key_seq_num
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_comm_set_status_update_callback()

void zbd_zvd_comm_set_status_update_callback ( zbd_zvd_comm_status_update_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when ZDD notifies a commissioning service status update.

Parameters
[in]callbackA callback

§ zbd_zvd_comm_start_finding_and_binding()

zb_ret_t zbd_zvd_comm_start_finding_and_binding ( zb_ble_conn_id_t  conn_id,
zb_uint8_t  endpoint,
zb_bool_t  initiator 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Request ZDD to start finding & binding procedure.

Parameters
[in]conn_idConnection ID
[in]endpointInitiator/Target endpoint number
[in]initiatorSet this parameter to TRUE to request ZDD to start Finding & Binding as the initiator endpoint; or FALSE to start as the target endpoint
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_connect()

zb_ret_t zbd_zvd_connect ( const zb_uint8_t ble_address)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Connects to a designated ZDD in range using its BLE address.

Parameters
ble_addressPointer to 6-bytes array of the ZDD BLE address
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_disconnect()

zb_ret_t zbd_zvd_disconnect ( zb_ble_conn_id_t  conn_id)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Disconnects from ZDD, if it is already connected to one.

Parameters
[in]conn_idConnection ID
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_discover_zdd()

zb_ret_t zbd_zvd_discover_zdd ( void  )

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Starts discovering ZDD devices in range.

Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_establish_secure_session()

zb_ret_t zbd_zvd_establish_secure_session ( zb_ble_conn_id_t  conn_id)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Starts a secure session with the connected ZDD.

Parameters
[in]conn_idConnection ID
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error
Note
This function will be used to start a secure session with the connected ZDD. Basically it will send an SE1 message with the passed parameters. The expected SE2 message from ZDD should then be received via indication, then the SE3 should be sent, and the SE4 should be received by another indication

§ zbd_zvd_establish_trusted_link()

void zbd_zvd_establish_trusted_link ( zb_uint8_t  buffer,
zb_uint16_t  conn_id 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Establishes Trusted Link between ZVD and connected ZDD The function is intended to initiate ZVD TC and ZDD commissioning process (ZVD TC sends Network Commissioning Request and waits for Network Commissioning Response)

Parameters
bufferbuffer id to establish trusted link
conn_idconnection id between ZVD and ZDD

§ zbd_zvd_get_discovered_peripherals_list()

zb_uint32_t zbd_zvd_get_discovered_peripherals_list ( ZB_PERIPHERAL_ZDD_T list,
zb_uint32_t  max_count 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Get the updated list of discovered peripherals.

Parameters
listUpdated list of discovered peripherals
max_count
  • [in] Size of the list
  • [out] Length of the returned list

§ zbd_zvd_init()

zb_ret_t zbd_zvd_init ( const zb_char_t device_name)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Initialize ZVD, initializing BLE stack as a Central and ZigBee stack.

Parameters
device_nameZero-terminated ASCII string representing device's name
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_security_generate_admin_key()

zb_ret_t zbd_zvd_security_generate_admin_key ( const zb_uint8_t  tclk[ZB_CCM_KEY_SIZE],
zb_uint8_t  admin_key[16] 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Generate administrative access key (does not apply as current PSK method)

Parameters
tclkZDD's trust center link key
admin_keya buffer of 16 bytes to store admin key in

§ zbd_zvd_security_generate_basic_key()

zb_ret_t zbd_zvd_security_generate_basic_key ( const zb_uint8_t  nwk_key[ZB_CCM_KEY_SIZE],
zb_uint8_t  basic_key[16] 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Generate basic access key (does not apply as current PSK method)

Parameters
nwk_keyZDD's trust center link key
basic_keya buffer of 16 bytes to store admin key in

§ zbd_zvd_security_set_negotiation_method()

zb_ret_t zbd_zvd_security_set_negotiation_method ( zb_ble_conn_id_t  conn_id,
zb_tlv_psk_secrets_t  psk_type,
zb_tlv_key_negotiation_methods_t  key_neg_method,
const zb_uint8_t psk,
zb_uint8_t  length 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a preshared key to be used during session establishment with zdd.

Parameters
conn_idzdd connection to set the key for
psk_typetype of preshared key used
See also
zb_tlv_direct_psk_secrets_e
Parameters
key_neg_methodkey negotiation method used
See also
zb_tlv_direct_key_negotiation_methods_e
Parameters
pskthe psk to be used during next session establishment (if NULL is passed, ZigBeeAlliance18 key is being used)
lengthlength of the psk in bytes
Returns
RET_OK if PSK was set, RET_ERROR otherwise

§ zbd_zvd_security_set_nwk_key_seq_num()

zb_ret_t zbd_zvd_security_set_nwk_key_seq_num ( zb_ble_conn_id_t  conn_id,
zb_uint8_t  nwk_key_seq_num 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a Network Key Sequence Number, which will be included in the SE1 in case of basic authorization.

Parameters
conn_idzdd connection to set the key for
nwk_key_seq_numnetwork key sequence number
Returns
RET_OK if Network Key Sequence Number was set, RET_ERROR otherwise

§ zbd_zvd_security_set_secure_session_established_callback()

void zbd_zvd_security_set_secure_session_established_callback ( zbd_zvd_security_establish_secure_session_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when the secure session establishment between ZVD and ZDD is done.

Parameters
[in]callbackA callback

§ zbd_zvd_set_connect_callback()

void zbd_zvd_set_connect_callback ( zbd_zvd_simple_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when ZVD connects to a ZDD.

Parameters
[in]callbackA callback

§ zbd_zvd_set_disconnect_callback()

void zbd_zvd_set_disconnect_callback ( zbd_zvd_simple_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when ZVD disconnects from a ZDD.

Parameters
[in]callbackA callback

§ zbd_zvd_set_operation_return_callback()

void zbd_zvd_set_operation_return_callback ( zbd_zvd_operation_return_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when an operation (characteristic read/write) returns.

Parameters
[in]callbackA callback

§ zbd_zvd_set_services_resolved_callback()

void zbd_zvd_set_services_resolved_callback ( zbd_zvd_simple_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when ZDD's services are resolved.

Parameters
[in]callbackA callback

§ zbd_zvd_set_zdd_list_updated_callback()

void zbd_zvd_set_zdd_list_updated_callback ( zbd_zvd_periph_list_updated_callback_t  callback)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Set a callback to be called when the list of ZDD peripherals in range has been updated.

Parameters
[in]callbackA callback

§ zbd_zvd_stop_discovery()

zb_ret_t zbd_zvd_stop_discovery ( void  )

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Stops discovering ZDD devices in range.

Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error

§ zbd_zvd_tunnel_send_npdu()

zb_ret_t zbd_zvd_tunnel_send_npdu ( zb_ble_conn_id_t  conn_id,
zb_uint8_t payload,
zb_uint8_t  payload_length 
)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api_direct.h>

Transport ZigBee Network Packet Data Units (NPDUs) over BLE from ZVD to ZDD.

Parameters
[in]conn_idConnection ID
[in]payloadTunnel service payload. Formed by one or more NPDUs to be sent to the connected ZDD device. Each NPDU will be encoded in a separated TLV.
[in]payload_lengthTunnel service payload length.
Returns
zb_ret_t
  • RET_OK on success
  • RET_ERROR on internal stack error
Note
The length of the TLV must fit the BLE connection's negotiated MTU size

§ zbd_zvd_uninit()