Logo
Developing with ZBOSS for Zigbee

Data Structures

struct  zb_channel_panid_change_preparation_s
 Callback parameters for zb_prepare_network_for_channel_change() and zb_prepare_network_for_panid_change() Stack sends set_configuration_req to the all devices and count responses with incorrect status. More...
 
struct  zb_channel_change_parameters_s
 Parameters for zb_prepare_network_for_channel_change() and zb_start_channel_change() More...
 
struct  zb_panid_change_parameters_s
 Parameters for zb_prepare_network_for_panid_change() and zb_start_panid_change() More...
 

Typedefs

typedef struct zb_channel_panid_change_preparation_s zb_channel_panid_change_preparation_t
 Callback parameters for zb_prepare_network_for_channel_change() and zb_prepare_network_for_panid_change() Stack sends set_configuration_req to the all devices and count responses with incorrect status. More...
 
typedef struct zb_channel_change_parameters_s zb_channel_change_parameters_t
 Parameters for zb_prepare_network_for_channel_change() and zb_start_channel_change() More...
 
typedef struct zb_panid_change_parameters_s zb_panid_change_parameters_t
 Parameters for zb_prepare_network_for_panid_change() and zb_start_panid_change() More...
 

Functions

zb_ret_t zb_prepare_network_for_channel_change (zb_uint8_t param, zb_callback_t cb)
 
zb_ret_t zb_prepare_network_for_panid_change (zb_uint8_t param, zb_callback_t cb)
 
zb_ret_t zb_start_channel_change (zb_uint8_t param)
 
zb_ret_t zb_start_panid_change (zb_uint8_t param)
 
void zb_enable_panid_conflict_resolution (zb_bool_t status)
 
void zb_enable_auto_pan_id_conflict_resolution (zb_bool_t status)
 

Detailed Description

Typedef Documentation

§ zb_channel_change_parameters_t

§ zb_channel_panid_change_preparation_t

§ zb_panid_change_parameters_t

Function Documentation

§ zb_enable_auto_pan_id_conflict_resolution()

void zb_enable_auto_pan_id_conflict_resolution ( zb_bool_t  status)

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

Toggles automatic panid conflict resolution.

Deprecated:
Enabling/disabling of automatic panid conflict resolution is deprecated in r23 codebase and does nothing.

Call of that function allows switching on/off automatic panid conflict resolution.

Parameters
status- if ZB_TRUE, enable conflict resolution, else disable

§ zb_enable_panid_conflict_resolution()

void zb_enable_panid_conflict_resolution ( zb_bool_t  status)

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

Toggles panid conflict resolution.

Deprecated:
Enabling/disabling of panid conflict resolution is deprecated in r23 codebase snd does nothing.

Call of that function allows switching on/off panid conflict resolution and detection logic.

Deprecated:
Kept only for backward compatibility. PANID conflict detection is always enabled at R23 and can not be disabled. Application is responsible for starting of conflict resolution.
Parameters
status- if ZB_TRUE, enable conflict resolution, else disable

§ zb_prepare_network_for_channel_change()

zb_ret_t zb_prepare_network_for_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_nwk.h>

This function set nwkNextChannelChange and sends set_configuration_req for all remote devices. Parameters zb_channel_change_parameters_t will be using for zb_start_channel_change()

Parameters
param- buffer with parameters zb_channel_change_parameters_t
cb- callback function, zb_channel_panid_change_preparation_t
/*
* Functions for demonstrate active channel change
*/
static void app_nwk_mgmt_change_channel_cb(zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1, ">> app_nwk_mgmt_change_channel_cb, param, error cnt = %d", (FMT__D, params->error_cnt));
if (params->error_cnt == 0)
{
TRACE_MSG(TRACE_APP1, "Preparation for channel change is successful, let's send channel change command", (FMT__0));
{
TRACE_MSG(TRACE_APP1, "Change channel procedure started successful", (FMT__0));
ZB_SCHEDULE_APP_ALARM(app_do_next_test_step, 0, ZB_TIME_ONE_SECOND * 10u);
}
}
TRACE_MSG(TRACE_APP1, "<< app_nwk_mgmt_change_channel_cb", (FMT__0));
}
static void app_nwk_mgmt_change_channel(zb_uint8_t param, zb_channel_page_t channel_mask)
{
params->next_channel_change = channel_mask;
/* Send set_configuration_req to all devices for allow channel change */
if (RET_OK == zb_prepare_network_for_channel_change(param, app_nwk_mgmt_change_channel_cb))
{
TRACE_MSG(TRACE_APP1, "Prepare network for channel change, next channel mask: 0x%x", (FMT__D, channel_mask));
}
}

§ zb_prepare_network_for_panid_change()

zb_ret_t zb_prepare_network_for_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_nwk.h>

This function set nwkNextPanId and sends set_configuration_req for all remote devices Parameters zb_panid_change_parameters_t will be using for zb_start_panid_change()

Parameters
param- buffer with parameters zb_panid_change_parameters_t
cb- callback function, zb_channel_panid_change_preparation_t
static void app_nwk_mgmt_change_panid_cb(zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1, ">> app_nwk_mgmt_change_panid_cb, param, error cnt = %d", (FMT__D, params->error_cnt));
if (params->error_cnt == 0)
{
TRACE_MSG(TRACE_APP1, "Preparation for channel change is successful, let's send channel change command", (FMT__0));
{
TRACE_MSG(TRACE_APP1, "Change panid procedure started successful", (FMT__0));
/* Broadcast network key to decode packets in Wireshark after PAN ID change. Only for debugging */
ZB_SCHEDULE_APP_ALARM(app_broadcast_network_key, 0, 10 * ZB_TIME_ONE_SECOND);
}
}
TRACE_MSG(TRACE_APP1, "<< app_nwk_mgmt_change_panid_cb", (FMT__0));
}
static void app_nwk_mgmt_change_panid(zb_uint8_t param)
{
if (param == 0u)
{
zb_buf_get_out_delayed(app_nwk_mgmt_change_panid);
}
else
{
params->next_panid_change = 0xffffu; /* The next panid value will be randomly generated */
/* Send set_configuration_req to all devices for allow PAN ID change */
if (RET_OK == zb_prepare_network_for_panid_change(param, app_nwk_mgmt_change_panid_cb))
{
TRACE_MSG(TRACE_APP1, "Prepare network for panid change", (FMT__0));
}
}
}

§ zb_start_channel_change()

zb_ret_t zb_start_channel_change ( zb_uint8_t  param)

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

Broadcast mgmt_nwk_update_req and change active channel for all devices in network. In centralized network the parameter zb_channel_change_parameters_t will be discarded

See also
zb_prepare_network_for_channel_change()
Parameters
param- buffer with parameters zb_channel_change_parameters_t
/*
* Functions for demonstrate active channel change
*/
static void app_nwk_mgmt_change_channel_cb(zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1, ">> app_nwk_mgmt_change_channel_cb, param, error cnt = %d", (FMT__D, params->error_cnt));
if (params->error_cnt == 0)
{
TRACE_MSG(TRACE_APP1, "Preparation for channel change is successful, let's send channel change command", (FMT__0));
{
TRACE_MSG(TRACE_APP1, "Change channel procedure started successful", (FMT__0));
ZB_SCHEDULE_APP_ALARM(app_do_next_test_step, 0, ZB_TIME_ONE_SECOND * 10u);
}
}
TRACE_MSG(TRACE_APP1, "<< app_nwk_mgmt_change_channel_cb", (FMT__0));
}
static void app_nwk_mgmt_change_channel(zb_uint8_t param, zb_channel_page_t channel_mask)
{
params->next_channel_change = channel_mask;
/* Send set_configuration_req to all devices for allow channel change */
if (RET_OK == zb_prepare_network_for_channel_change(param, app_nwk_mgmt_change_channel_cb))
{
TRACE_MSG(TRACE_APP1, "Prepare network for channel change, next channel mask: 0x%x", (FMT__D, channel_mask));
}
}

§ zb_start_panid_change()

zb_ret_t zb_start_panid_change ( zb_uint8_t  param)

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

Broadcast mgmt_nwk_update_req and change PAN ID for all devices in network. In centralized network the parameter zb_channel_change_parameters_t will be discarded

See also
zb_prepare_network_for_panid_change() This function can be used during pan id conflict resolutions, but R23 specification recommends to ignore the pan id conflicts
Parameters
param- buffer with parameters zb_panid_change_parameters_t
static void app_nwk_mgmt_change_panid_cb(zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1, ">> app_nwk_mgmt_change_panid_cb, param, error cnt = %d", (FMT__D, params->error_cnt));
if (params->error_cnt == 0)
{
TRACE_MSG(TRACE_APP1, "Preparation for channel change is successful, let's send channel change command", (FMT__0));
{
TRACE_MSG(TRACE_APP1, "Change panid procedure started successful", (FMT__0));
/* Broadcast network key to decode packets in Wireshark after PAN ID change. Only for debugging */
ZB_SCHEDULE_APP_ALARM(app_broadcast_network_key, 0, 10 * ZB_TIME_ONE_SECOND);
}
}
TRACE_MSG(TRACE_APP1, "<< app_nwk_mgmt_change_panid_cb", (FMT__0));
}
static void app_nwk_mgmt_change_panid(zb_uint8_t param)
{
if (param == 0u)
{
zb_buf_get_out_delayed(app_nwk_mgmt_change_panid);
}
else
{
params->next_panid_change = 0xffffu; /* The next panid value will be randomly generated */
/* Send set_configuration_req to all devices for allow PAN ID change */
if (RET_OK == zb_prepare_network_for_panid_change(param, app_nwk_mgmt_change_panid_cb))
{
TRACE_MSG(TRACE_APP1, "Prepare network for panid change", (FMT__0));
}
}
}