
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... | |
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_T * | zbd_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 | |
| #define | ZBD_APS_LINK_KEY_FLAGS_MASK_UNIQUE 0b00000001U |
| #define | ZBD_APS_LINK_KEY_FLAGS_MASK_PROVISIONAL 0b00000010U |
| #define MAX_NWK_CHANNEL_LIST_PAGES 20 |
| #define ZBD_APS_LINK_KEY_FLAGS_MASK_PROVISIONAL 0b00000010U |
| #define ZBD_APS_LINK_KEY_FLAGS_MASK_UNIQUE 0b00000001U |
| #define ZBD_BLE_CONN_ID_INVALID (zb_ble_conn_id_t)(-1) |
| #define ZIGBEE_DIRECT_DEFAULT_PROXY_NAME "DSR ZDD" |
Name of device. Will be included in the advertising data.
| typedef enum joined_status_e joined_status_t |
| typedef struct zb_peripheral_zdd_t ZB_PERIPHERAL_ZDD_T |
This struct represents a remote Zigbee Direct Device to the ZVD API.
ZVD API
Type for ZBD APS Link Key Flags Mask.
zbd_aps_link_key_flags_mask_t were declared previously as enum
| typedef enum zbd_characteristic_tag_e zbd_characteristic_tag_t |
| typedef zb_uint16_t zbd_data_len_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 struct zbd_network_status_s zbd_network_status_t |
| typedef struct zbd_nwk_channel_list_s zbd_nwk_channel_list_t |
| typedef struct zbd_status_code_s zbd_status_code_t |
| typedef enum zbd_status_code_value_e zbd_status_code_value_t |
| typedef enum zbd_status_domain_e zbd_status_domain_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.
| [in] | conn_id | Connection ID |
| [in] | charact_handle | Characteristic handle returned on creation |
| [out] | data | Pointer to the buffer where the result will be stored |
| [in] | len |
|
| typedef enum zbd_zdd_recv_callback_ret_e zbd_zdd_recv_callback_ret_t |
Return codes for callback functions.
| 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.
| 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.
| typedef void(* zbd_zdd_simple_callback_t) (zb_ble_conn_id_t conn_id) |
All other callback types like new BLE device connected, etc.
| 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.
Commissioning Service parameter masks.
| typedef struct zbd_zvd_comm_service_params_t ZBD_ZVD_COMM_SERVICE_PARAMS_T |
Commissioning Service request parameters.
| 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.
| [in] | conn_id | Connection ID |
| [in] | params | ZVD Commissioning Service parameters |
| typedef enum zbd_zvd_operation_error_t ZBD_ZVD_OPERATION_ERROR_T |
Operation error codes.
| 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.
| [in] | conn_id | Connection ID |
| [in] | operation_error | Operation error code |
| 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.
| 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.
| [in] | conn_id | Connection ID |
| [in] | success | true if the secure session was successfully established; false otherwise |
| [in] | zdd_ieee_addr | zdd ieee address |
| typedef void(* zbd_zvd_simple_callback_t) (zb_ble_conn_id_t conn_id) |
All other callback types.
| [in] | conn_id | Connection ID |
| enum joined_status_e |
| enum zbd_device_type_e |
| enum zbd_joining_method_e |
| enum zbd_status_domain_e |
Commissioning Service parameter masks.
| const char* str_comm_device_type | ( | zbd_device_type_t | device_type | ) |
| 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_manage_joiners_cmd | ( | zbd_manage_joiners_cmd_t | cmd | ) |
| ZB_ASSERT_COMPILE_DECL | ( | sizeof(zbd_network_status_t) | = =sizeof(zb_uint8_t) | ) |
| zb_ret_t zbd_ble_addr_get | ( | zb_uint8_t * | ble_address | ) |
Retrieves the BLE device address.
| ble_address | Pointer to the buffer where the address will be stored (6-bytes array), MSB at position 0, LSB at position 5 |
| 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.
| uuid128 | Pointer to 16-bytes array contatining desired UUID | |
| [out] | service_handle | pointer to variable to store handle of created service in |
| 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.
| uuid16 | Desired 16-bit UUID |
| service_handle | pointer to variable to store handle of created service in |
| zb_uint8_t zbd_ble_get_curr_mtu | ( | zb_ble_conn_id_t | connection_id | ) |
Get current MTU size for particular BLE connection.
| connection_id | Connection ID |
| 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.
| conn_id | ID of a connection where to send the indication to |
| charact_handle | Characteristic handle returned on creation |
| data | Pointer to a data block to be sent |
| len | Size of the data |
| 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.
| conn_id | ID of a connection where to send the notification to |
| charact_handle | Characteristic handle returned on creation |
| data | Pointer to a data block to be sent |
| len | Size of the data |
| void zbd_ble_set_user_data_request_callback | ( | zbd_zdd_data_request_callback_t | callback | ) |
Set data request callback for user defined characteristics.
| callback | A callback |
| void zbd_ble_set_user_recv_callback | ( | zbd_zdd_recv_callback_t | callback | ) |
Set receiving callback for user defined characteristics.
| callback | A callback |
| void zbd_ble_set_user_send_callback | ( | zbd_zdd_send_callback_t | callback | ) |
Set sending callback for user defined characteristics.
| callback | A callback |
| 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.
| [in] | mac_address | MAC address, byte array of length 6, position 0 is the MSB and position 5 is the LSB |
| [out] | eui_64 | Generated EUI-64 address, byte array of length 8, position 0 is the LSB and position 7 is the MSB |
| zb_ret_t zbd_proxy_ble_addr_get | ( | zb_uint8_t * | ble_address | ) |
Retrieves ZDD's 6-bytes bluetooth address.
| ble_address | [OUT] pointer to 6-bytes array to store the address |
Disable BLE interface of the device, saves state to NVRAM.
| disconnect_from_peers | whether or not shall ZDD perform a disconnection from every ZVD before disabling BLE interface |
| zb_ret_t zbd_proxy_enable_ble_interface | ( | void | ) |
Enable BLE interface of the device, saves state to NVRAM.
| zb_ret_t zbd_proxy_init | ( | const zb_char_t * | device_name, |
| zb_uint8_t | identification_ep | ||
| ) |
Initialize ZigBee Direct functionality.
| device_name | BLE device name |
| identification_ep | endpoint number to to perform ZBD identifiation on |
| zb_bool_t zbd_proxy_is_ble_interface_enabled | ( | void | ) |
Check if BLE interface is enabled or not.
| void zbd_zdd_uninit | ( | void | ) |
| 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.
| callback | A callback |
| void zbd_zvd_ble_set_disconnect_callback | ( | zbd_zvd_simple_callback_t | callback | ) |
Set a callback to be called when a peer is disconnected.
| callback | A callback |
| 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.
| callback | A callback |
| 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.
| callback | A callback |
| 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)
| [in] | conn_id | Connection ID |
| [in] | request | Commissioning service request parameters
|
| 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.
| [in] | conn_id | Connection ID |
| [in] | request | Commissioning service request parameters
|
| 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.
| [in] | conn_id | Connection ID |
| [in] | request | Commissioning service request parameters
|
| [in] | centralized | Indicates if the requested Zigbee network should have centralized or distributed security |
| 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.
| [out] | prov_link_key | Generated joiner's provisional link key, a 16-byte array |
| [in] | length | Length of the output buffer pointed by prov_link_key |
| const ZBD_ZVD_COMM_SERVICE_PARAMS_T* zbd_zvd_comm_get_params | ( | zb_ble_conn_id_t | conn_id | ) |
Get currently cached commissioning service parameters corresponding to ZDD at specified connection ID.
| [in] | conn_id | Connection ID |
| 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.
| [in] | conn_id | Connection ID |
| [in] | time | Time to identify. If equal to zero then identification stops |
| 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.
| [in] | conn_id | Connection ID |
| [in] | request | Commissioning service request parameters
|
| 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.
| [in] | conn_id | Connection ID |
| [in] | request | Commissioning service request parameters
|
| 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.
| [in] | conn_id | Connection ID |
| [in] | request | Commissioning service request parameters
|
| 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.
| [in] | conn_id | Connection ID |
| [in] | remove_children | Set this to TRUE to ask ZDD to also remove its child devices, if any. Otherwise, set to FALSE |
| [in] | rejoin | Set this parameter to TRUE to ask ZDD to rejoin the network. Otherwise, set to FALSE |
| 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.
| [in] | conn_id | Connection ID |
| [in] | permit_duration | Time, in seconds, during which ZigBee router or coordinator will allow associations.
|
| 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.
| [in] | conn_id | Connection ID |
| 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)
| [in] | conn_id | Connection ID |
| [in] | request | Commissioning service request parameters
|
| 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.
| [in] | callback | A callback |
| 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.
| [in] | conn_id | Connection ID |
| [in] | endpoint | Initiator/Target endpoint number |
| [in] | initiator | Set this parameter to TRUE to request ZDD to start Finding & Binding as the initiator endpoint; or FALSE to start as the target endpoint |
| zb_ret_t zbd_zvd_connect | ( | const zb_uint8_t * | ble_address | ) |
Connects to a designated ZDD in range using its BLE address.
| ble_address | Pointer to 6-bytes array of the ZDD BLE address |
| zb_ret_t zbd_zvd_disconnect | ( | zb_ble_conn_id_t | conn_id | ) |
Disconnects from ZDD, if it is already connected to one.
| [in] | conn_id | Connection ID |
| zb_ret_t zbd_zvd_discover_zdd | ( | void | ) |
Starts discovering ZDD devices in range.
| zb_ret_t zbd_zvd_establish_secure_session | ( | zb_ble_conn_id_t | conn_id | ) |
Starts a secure session with the connected ZDD.
| [in] | conn_id | Connection ID |
| 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)
| buffer | buffer id to establish trusted link |
| conn_id | connection id between ZVD and ZDD |
| 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.
| list | Updated list of discovered peripherals |
| max_count |
|
Initialize ZVD, initializing BLE stack as a Central and ZigBee stack.
| device_name | Zero-terminated ASCII string representing device's name |
| 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)
| tclk | ZDD's trust center link key |
| admin_key | a buffer of 16 bytes to store admin key in |
| 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)
| nwk_key | ZDD's trust center link key |
| basic_key | a buffer of 16 bytes to store admin key in |
| 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.
| conn_id | zdd connection to set the key for |
| psk_type | type of preshared key used |
| key_neg_method | key negotiation method used |
| psk | the psk to be used during next session establishment (if NULL is passed, ZigBeeAlliance18 key is being used) |
| length | length of the psk in bytes |
| 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.
| conn_id | zdd connection to set the key for |
| nwk_key_seq_num | network key sequence number |
| 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.
| [in] | callback | A callback |
| void zbd_zvd_set_connect_callback | ( | zbd_zvd_simple_callback_t | callback | ) |
Set a callback to be called when ZVD connects to a ZDD.
| [in] | callback | A callback |
| void zbd_zvd_set_disconnect_callback | ( | zbd_zvd_simple_callback_t | callback | ) |
Set a callback to be called when ZVD disconnects from a ZDD.
| [in] | callback | A callback |
| 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.
| [in] | callback | A callback |
| 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.
| [in] | callback | A callback |
| 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.
| [in] | callback | A callback |
| zb_ret_t zbd_zvd_stop_discovery | ( | void | ) |
Stops discovering ZDD devices in range.
| 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.
| [in] | conn_id | Connection ID |
| [in] | payload | Tunnel 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_length | Tunnel service payload length. |
| void zbd_zvd_uninit | ( | void | ) |