Logo
Developing with ZBOSS for Zigbee

Data Structures

struct  zb_zdo_common_req_param_s
 
struct  zb_zdo_get_configuration_req_param_s
 ZDO Get Configuration Request parameters. More...
 
struct  zb_zdo_get_configuration_resp_param_s
 ZDO Get Configuration Response parameters. More...
 
struct  zb_zdo_configuration_parameters_s
 Configuration parameters Stack sends set_configuration_req to the device with set values. More...
 
struct  zb_zdo_next_panid_change_parameters_s
 Next PAN ID change parameters Stack sends set_configuration_req to the device with set values. More...
 
struct  zb_zdo_next_channel_change_parameters_s
 Next channel change parameters Stack sends set_configuration_req to the device with set values. More...
 
struct  zb_zdo_clear_all_bind_req_param_s
 Parameters for zdo_clear_all_bind_req. More...
 
struct  zb_zdo_mgmt_beacon_survey_param_s
 Parameters for beacon_survey_req command. More...
 
struct  zb_zcl_wwah_beacon_survey_s
 
struct  zb_zdo_beacon_survey_results_t
 R23, I.3.3 Beacon Survey Configuration TLV. More...
 
struct  zb_zdo_beacon_survey_potential_parents_t
 R23, I.3.5 Potential Parents TLV. More...
 
struct  zb_zdo_beacon_survey_resp_params_s
 Structure to store information when 'Beacon Survey' procedure is executing. More...
 

Macros

#define ZB_ZDO_CLEAR_ALL_BIND_EUI64_LIST_SIZE   (5u)
 
#define ZB_SURVEY_BEACON_MAX_CHANNEL_PAGE_CNT   10U
 
#define ZDO_WWAH_MAX_BEACON_SURVEY   5U
 
#define ZDO_WWAH_MAX_BEACON_SURVEY_BYTES
 

Typedefs

typedef struct zb_zdo_common_req_param_s zb_zdo_common_req_param_t
 
typedef struct zb_zdo_get_configuration_req_param_s zb_zdo_get_configuration_req_param_t
 ZDO Get Configuration Request parameters. More...
 
typedef struct zb_zdo_get_configuration_resp_param_s zb_zdo_get_configuration_resp_param_t
 ZDO Get Configuration Response parameters. More...
 
typedef struct zb_zdo_configuration_parameters_s zb_zdo_configuration_parameters_t
 Configuration parameters Stack sends set_configuration_req to the device with set values. More...
 
typedef struct zb_zdo_next_panid_change_parameters_s zb_zdo_next_panid_change_parameters_t
 Next PAN ID change parameters Stack sends set_configuration_req to the device with set values. More...
 
typedef struct zb_zdo_next_channel_change_parameters_s zb_zdo_next_channel_change_parameters_t
 Next channel change parameters Stack sends set_configuration_req to the device with set values. More...
 
typedef struct zb_zdo_clear_all_bind_req_param_s zb_zdo_clear_all_bind_req_param_t
 Parameters for zdo_clear_all_bind_req. More...
 
typedef zb_zdo_clear_all_bind_req_param_t zb_zdo_decommission_req_param_t
 
typedef struct zb_zdo_mgmt_beacon_survey_param_s zb_zdo_mgmt_beacon_survey_param_t
 Parameters for beacon_survey_req command. More...
 
typedef struct zb_zcl_wwah_beacon_survey_s zb_zcl_wwah_beacon_survey_t
 
typedef zb_zcl_wwah_beacon_survey_t zb_zdo_beacon_survey_parent_info_t
 
typedef struct zb_zdo_beacon_survey_results_t zb_zdo_beacon_survey_results_t
 R23, I.3.3 Beacon Survey Configuration TLV. More...
 
typedef struct zb_zdo_beacon_survey_potential_parents_t zb_zdo_beacon_survey_potential_parents_t
 R23, I.3.5 Potential Parents TLV. More...
 
typedef struct zb_zdo_beacon_survey_resp_params_s zb_zdo_beacon_survey_resp_params_t
 Structure to store information when 'Beacon Survey' procedure is executing. More...
 

Functions

void zb_set_tc_connectivity (zb_bool_t val)
 
zb_bool_t zb_get_tc_connectivity (void)
 
void zb_set_nwk_preferred_parent (zb_bool_t val)
 
zb_uint8_t zb_zdo_send_configuration_parameters (zb_uint8_t param, zb_callback_t cb)
 Sends secur_set_configuration_req command with configuration parameters. More...
 
zb_uint8_t zb_zdo_send_next_panid_change (zb_uint8_t param, zb_callback_t cb)
 Sends secur_set_configuration_req command with next pan id change information. More...
 
zb_uint8_t zb_zdo_send_next_channel_change (zb_uint8_t param, zb_callback_t cb)
 Sends secur_set_configuration_req command with next channel change information. More...
 
zb_uint8_t zb_zdo_get_configuration_req (zb_uint8_t param, zb_callback_t cb)
 Sends Secur_Get_Configuration_req command. More...
 
zb_uint8_tzdo_fill_get_configuration_req (zb_uint8_t param, zb_uint16_t dst, zb_uint8_t tlv_count, zb_uint8_t first_tlv_id)
 Start filling of body of ZDO Secur Get Configuration Req. More...
 
zb_uint8_t zb_zdo_decommission_req (zb_uint8_t param, zb_callback_t cb)
 Sends Secur_Decommission_req command. More...
 
zb_uint8_t zdo_mgmt_beacon_survey_req (zb_uint8_t param, zb_callback_t cb)
 Sends Mgmt beacon survey request. More...
 

Detailed Description

Macro Definition Documentation

§ ZB_SURVEY_BEACON_MAX_CHANNEL_PAGE_CNT

#define ZB_SURVEY_BEACON_MAX_CHANNEL_PAGE_CNT   10U

§ ZB_ZDO_CLEAR_ALL_BIND_EUI64_LIST_SIZE

#define ZB_ZDO_CLEAR_ALL_BIND_EUI64_LIST_SIZE   (5u)

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

Max size of eui64_list. No more than 5 entry are placed in the ZB packet

§ ZDO_WWAH_MAX_BEACON_SURVEY

§ ZDO_WWAH_MAX_BEACON_SURVEY_BYTES

#define ZDO_WWAH_MAX_BEACON_SURVEY_BYTES

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

Value:
#define ZDO_WWAH_MAX_BEACON_SURVEY
Definition: zboss_api_zdo.h:4143
zb_zcl_wwah_beacon_survey_t zb_zdo_beacon_survey_parent_info_t
Definition: zboss_api_zdo.h:4132

Typedef Documentation

§ zb_zcl_wwah_beacon_survey_t

§ zb_zdo_beacon_survey_parent_info_t

§ zb_zdo_beacon_survey_potential_parents_t

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

R23, I.3.5 Potential Parents TLV.

This TLV is 3 to 13 bytes in length and indicates the number of available parents in radio range. A maximum number of 5 parents is supported for this TLV. The list of potential parents SHALL be ordered as described in 3.6.1.3.2.

§ zb_zdo_beacon_survey_resp_params_t

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

Structure to store information when 'Beacon Survey' procedure is executing.

We reuse a buffer which contain 'Beacon Survey Request' command and store all necessary information into it. Format of the 'Beacon Survey Response' command is different between ZCL WWAH and r23, so we need to use two functions to parse results and send response

§ zb_zdo_beacon_survey_results_t

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

R23, I.3.3 Beacon Survey Configuration TLV.

This TLV is 5-bytes in length and contains information about the channels and scan configuration that is used when performing a beacon survey. R23, I.3.4 Beacon Survey Results TLV

This TLV is 4-bytes in length and contains information about the channels, scan configuration, and counted devices or beacons.

§ zb_zdo_clear_all_bind_req_param_t

§ zb_zdo_common_req_param_t

§ zb_zdo_configuration_parameters_t

§ zb_zdo_decommission_req_param_t

§ zb_zdo_get_configuration_req_param_t

§ zb_zdo_get_configuration_resp_param_t

§ zb_zdo_mgmt_beacon_survey_param_t

§ zb_zdo_next_channel_change_parameters_t

§ zb_zdo_next_panid_change_parameters_t

Function Documentation

§ zb_get_tc_connectivity()

zb_bool_t zb_get_tc_connectivity ( void  )

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

Get current value of the TC connectivity flag.

Returns
if ZB_TRUE, that ZR has TC connectivity

§ zb_set_nwk_preferred_parent()

void zb_set_nwk_preferred_parent ( zb_bool_t  val)

§ zb_set_tc_connectivity()

void zb_set_tc_connectivity ( zb_bool_t  val)

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

Overwrite the auto-detected TC connectivity flag.

That flag is related to All Hubs feature and WWAH. Note: applicable for ZRs only.

Parameters
val- if ZB_TRUE, that ZR has TC connectivity

§ zb_zdo_decommission_req()

zb_uint8_t zb_zdo_decommission_req ( zb_uint8_t  param,
zb_callback_t  cb 
)

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

Sends Secur_Decommission_req command.

Parameters
param- index of buffer with request zb_zdo_decommission_req_param_t
cb- user's function to call when got response from the remote.
Returns
ZDP transaction sequence number or
0xFF if operation cannot be performed now (nor enough memory, resources, etc.)
static void app_send_decommission_req(zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1, "app_send_decommission_req, param %hd", (FMT__H, param));
/* clear buffer */
(void)zb_buf_initial_alloc(param, 0);
req_param->dst_addr = zb_address_short_by_ieee(g_r23_zr_ieee_addr);
req_param->eui64_count = 1;
ZB_IEEE_ADDR_COPY(req_param->eui64_list[0], g_r22_zr_ieee_addr);
/* zb_zdo_clear_all_bind_req() can be used instead of zb_zdo_decommission_req().
* Both of these requests clear the bindings, but the ZDO Decommission request
* also clears partner link keys for selected devices */
if (zb_zdo_decommission_req(param, app_send_mgmt_bind_req2) == 0xffu)
{
zb_buf_free(param);
TRACE_MSG(TRACE_ERROR, "unexpected error", (FMT__0));
}
}

§ zb_zdo_get_configuration_req()

zb_uint8_t zb_zdo_get_configuration_req ( zb_uint8_t  param,
zb_callback_t  cb 
)

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

Sends Secur_Get_Configuration_req command.

Parameters
param- index of buffer with request
cb- user's function to call when got response from the remote.
Returns
ZDP transaction sequence number or
0xFF if operation cannot be performed now (nor enough memory, resources, etc.)

§ zb_zdo_send_configuration_parameters()

zb_uint8_t zb_zdo_send_configuration_parameters ( zb_uint8_t  param,
zb_callback_t  cb 
)

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

Sends secur_set_configuration_req command with configuration parameters.

That API can be called in centralized network only at TC; in distributed network - at any device.

Parameters
param- index of buffer with request zb_zdo_configuration_parameters_s
cb- user's function to call when got response from the remote
Returns
ZDP transaction sequence number or
0xFF if operation cannot be performed now (nor enough memory, resources, etc.)
/* Functions for demonstrate the set configuration request API */
static void app_send_configuration_req_cb(zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1, "app_send_configuration_req_cb, param %hd, tsn %hd, status %hd",
(FMT__H_H_H, param, resp->tsn, resp->status));
ZB_SCHEDULE_APP_CALLBACK(app_do_next_test_step, param);
}
static void app_send_configuration_req(zb_uint8_t param, zb_uint16_t short_addr)
{
TRACE_MSG(TRACE_APP1, "app_send_configuration_req, param %hd, short_addr 0x%x",
(FMT__H_D, param, short_addr));
req_param->dst_addr = short_addr;
req_param->restricted_mode_enabled = 1u; /* Certain ZDO commands will not be accepted unless sent
by Trust Center with APS encryption */
req_param->require_link_key_encr_for_tk = 1u; /* Device will require that the APS Transport key command
shall be APS encrypted with the device's unique Trust Center Link Key */
req_param->leave_req_allowed = 1u;
req_param->disable_channel_change = 1u; /* Forbid channel change for device */
req_param->disable_panid_change = 1u; /* Forbid pan id change for device */
(void)zb_zdo_send_configuration_parameters(param, app_send_configuration_req_cb);
}

§ zb_zdo_send_next_channel_change()

zb_uint8_t zb_zdo_send_next_channel_change ( zb_uint8_t  param,
zb_callback_t  cb 
)

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

Sends secur_set_configuration_req command with next channel change information.

Parameters
param- index of buffer with request zb_zdo_next_channel_change_parameters_s
cb- user's function to call when got response from the remote.
Returns
ZDP transaction sequence number or
0xFF if operation cannot be performed now (nor enough memory, resources, etc.)

§ zb_zdo_send_next_panid_change()

zb_uint8_t zb_zdo_send_next_panid_change ( zb_uint8_t  param,
zb_callback_t  cb 
)

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

Sends secur_set_configuration_req command with next pan id change information.

Parameters
param- index of buffer with request zb_zdo_next_panid_change_parameters_s
cb- user's function to call when got response from the remote.
Returns
ZDP transaction sequence number or
0xFF if operation cannot be performed now (nor enough memory, resources, etc.)

§ zdo_fill_get_configuration_req()

zb_uint8_t* zdo_fill_get_configuration_req ( zb_uint8_t  param,
zb_uint16_t  dst,
zb_uint8_t  tlv_count,
zb_uint8_t  first_tlv_id 
)

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

Start filling of body of ZDO Secur Get Configuration Req.

If ZDO Secur Get Configuration Req queries about just one tlv, call to that function is enough. If it queries about > 1 tlv, continue filling using returned ptr.

Parameters
param- output buffer
dst- destination address
tlv_count- count of tlvs in the request
first_tlv_id- id of the first tlv id
Returns
pointer to the rest of tlv ids (to be filled by the caller).

§ zdo_mgmt_beacon_survey_req()

zb_uint8_t zdo_mgmt_beacon_survey_req ( zb_uint8_t  param,
zb_callback_t  cb 
)

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

Sends Mgmt beacon survey request.

Parameters
param- buffer holding in parameters section zb_zdo_mgmt_beacon_survey_param_t
cb- callback to be called on ZDO command complete. Survey result is in data section of param of type zb_zdo_beacon_survey_resp_params_t
/*
* Functions for demonstrate Beacon Survey
*/
static void app_beacon_survey_cb(zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1, ">> app_beacon_survey_cb param %hd status %hd panid_conflict_count %hd",
(FMT__H_H_H, param, resp->status, resp->panid_conflict_count));
TRACE_MSG(TRACE_APP1, "survey results: total_beacons_surveyed %hd num_cur_nwk_beacons %hd num_potential_parents_current_zbn %hd num_other_nwk_beacons %hd",
(FMT__H_H_H_H,
TRACE_MSG(TRACE_APP1, "current_parent 0x%x, lqa %hd parents_count %hd",
for (i = 0 ; i < resp->parents.count_potential_parents ; ++i)
{
TRACE_MSG(TRACE_APP1, "potential parent 0x%x, lqa %hd",
(FMT__D_H, resp->parents.parent_list[i].device_short, resp->parents.parent_list[i].lqi));
}
ZB_SCHEDULE_APP_CALLBACK(app_do_next_test_step, param);
TRACE_MSG(TRACE_APP1, "<< app_beacon_survey_cb", (FMT__0));
}
static void app_send_beacon_survey(zb_uint8_t param, zb_uint16_t short_addr)
{
TRACE_MSG(TRACE_APP1, ">> app_send_beacon_survey_req, param %hd, short_addr 0x%x",
(FMT__H_D, param, short_addr));
req_param->dst_addr = short_addr;
zb_channel_page_list_get_page_idx(APPLICATION_CHANNEL_PAGE, &idx);
ZB_CHANNEL_PAGE_SET_PAGE(req_param->channel_page_list[idx], APPLICATION_CHANNEL_PAGE);
ZB_CHANNEL_PAGE_SET_MASK(req_param->channel_page_list[idx], APPLICATION_CHANNEL_MASK);
req_param->config_mask = 0x00;
zdo_mgmt_beacon_survey_req(param, app_beacon_survey_cb);
TRACE_MSG(TRACE_APP1, "<< app_send_beacon_survey_req", (FMT__0));
}