Developing with ZBOSS for Zigbee
ZBOSS Zigbee 2023 (r23) features

Table of Contents

New features in ZBOSS r23 codebase

There are following big features in ZBOSS r23 codebase:

  • r23 (Zigbee 2023) Core specification support
  • Zigbee Direct (see a separate doc)
  • Multimac: more than one MAC entity inside ZBOSS kernel, like real radio + nsng (while partially exists in r22 codebase)
  • SuZi - SubGHz (NA, EU)
Note
Nordic's Zigbee R23 add-on (based on ZBOSS r23 stack) doesn't support Zigbee Direct, Multimac and SuZi - SubGhz.

There are also number of minor refactorings and improvements.

r23 stack certified Platform vs certified Product status

Zigbee r23 specification is officially released, Zigbee Platform certification program is started. ZBOSS is officially a r23 Golden Unit and r23 Zigbee Certified Platform. For now (06/2023) Zigbee Platform can be certified as r23, but BDB 3.1, which must describe usage of new r23 features, is not ready yet.

So it is only possible to certify Zigbee Product using BDB 3.0.1. It is confirmed by CSA officials that is is legal to use a certified r23 ZCP to certify a Zigbee Product. Zigbee stack must not use r23 features during Product certification.

So certified r23 ZBOSS CAN be used to develop a certified BDB 3.0.1 (Zigbee 3.0) Product.

r23 features which exist in the stack core is an uncertifieable behavior from the BDB 3.0.1 point of view.

Note
Current release of Zigbee R23 add-on (based on r23 ZBOSS) for nRF54L Series is not certified.

Short list of new r23 features

New r23 Security features

Key establishment and related features

  • TCLK establishment using DLK
  • Authentication token as a part of DLK procedure.
  • Passcode (an alternative form of the installcode)
  • Device interview
  • APS frame counter synchronization

ZB 3.0/SE coexistence: initial join & key update methods info

Storing initial join & key update methods in TCLK keypair. Ability to get initial join & key update methods - locally and via ZDO command.

Trust Center swapout

ZBOSS now implements SE-like (with TCLK hash) TC swapout.

All Hubs / WWAH

r23 specification does not define exactly which new r23 features are indeed included into "All Hubs iunitiative". Suppose that are all features got from WWAH specification:

  • hub connectivity
  • parent classification
  • ZDO decommission req
  • beacon survey
  • Restructed mode
  • Leave Request Allowed setting
  • Require Link Key Encryption setting
  • Secured PANID conflict resolution
  • Secured channel change

Closing holes in r22 security (r22.2 and beyond)

Following (already listed) settings close the holes in r22 security.

  • PANID conflict resolution
  • Updates in PANID and channel change via "security set configuration"

Restricted mode.

If device is in Restricted mode, some ZDO commands can be accepted only if received from TC and encrypted by TCLK.

APS fragmentation

  • Window size is fixed to be 1 in r23
  • Fragmentation support for some ZDO messages is Mandatory now
  • ZCL (application) messages fragmentation capability field in Node descriptor

APS ACK req in APS commands

ZBOSS now set APS ACK req bit in APS commands, except Tunnel with Transport key.

The application need not care about that change

Runtime switch of r23 ZBOSS into r22 mode

  • r22 GU behavior
  • avoiding using of nwk commissioning

Extension for group tx in apsde-data.req

New parameter nwk_broadcast_addr - broadcast address to be used for tx to a group. In r22 APS Group tx was possible only to rx-on-when-idle devices, in r23 broadcast address is configurable.

ZBOSS r23 Details and ZBOSS API description

DLK

r23 significantly improved Zigbee Centralized security.

Why DLK improves Zigbee security

DLK is the significant Zigbee security improvement which closes long-standing security hole in Zigbee known as a "well-known key" AKA "ZigBeeAlliance09" key.

DLK means "Dynamic Link Key" (while DSR has no ideas what is so "dynamic" in it). Indeed DLK means establishing a shared key between device and TC over an insecure radio channel utilizing an elliptic-curve Diffie-Hellman math (curve25519). In contrast to methods used in pervious Zigbee versions that procedure has no risk of obtaining or calculating the key by the attacker which can observe the radio exchange. DLK can be anonymous (in such case man-in-the-middle attack could be theoretically possible while unlikely) or use an installcode or passcode which preventing such kind of attack.

TCLK (Trust Center Link Key) is an unique APS key established between TC (Trust Center) and any every in the network. Starting from Zigbee r21 standard every joined device must establish a TCLK during or after joining. That is true for both Zigbee 3.0 and SE profile (while SE uses its own certificate-based protocol, it still establishes the same unique TCLK). TCLK can be used for securing any APS traffic between the device and TC.

TCLK has critical meaning in Zigbee security because it provides a secure way for a device to do Unsecured AKA Trust center Rejoin after it missed NWK key update.

Before introducing of DLK Zigbee first used a Provisional key to send NWK key to just joined device. Later Joiner updates Provisional key to the unique verified TCLK using either APS commands (in Zigbee 3.0) or CBKE protocol over ZCL (in SE).

Provisioning key was either derived from the Installcode, which is good enough, or the well-known key was used, which is quite weak.

When DLK is used, the produced TCLK is Verified and need not be changed.

DLK requires Joiner and TC to be r23 devices supporting DLK.

Note that DLK is Optional in r23. DSR recommends to always build ZBOSS r23 with DLK support compiled in.

Initial starting DLK

ZBOSS has no an explicit API to start DLK to establish a TCLK first time. That means, DLK starts automatically when it is possible. An application need not care about DLK start.

DLK can be done before or after Joiner authentication. DLK before Joiner authentication is called "off-network DLK". That is the most secure DLK form. In that case TCLK establishment is done without sending NWK key to the Joiner making device Interview possible.

"On-network DLK" is TCLK establishment after NWK key is sent to a Joiner.

If Joiner joins to the intermediate Parent Router, that Parent Router must be r23 device to make "off-network DLK" possible. If Parent Router is pre-r23 device, only "On-network DLK" is possible.

"Off-network DLK" is always possible when Joiner joins directly to TC.

Routers between Parent Router and TC, if exist, just route NWK traffic, so need not be r23 devices.

The new configurable memory setting ZB_CONFIG_ZDO_KEY_NEGOTIATIONS_NUM defines max number of parallel DLK sessions which TC can handle.

Since SE profile still uses r22, DLK is disabled if SE commissioning is in use.

Force TCLK update

TC can force updating TCLK of some device by calling zb_zdo_secur_update_device_tclk().

Device DLK capabilities

To have DLK working, Joined device and TC must support DLK and be agree about supported key negotiation methods and pre-shared secrets. Joiner presents methods and secrets it supports, TC matches them with methods/secrets TC supports and chooses the best combination. DLK then starts automatically at join.

ZBOSS provides an API to configure locally supported key negotiation methods and PSK secrets which then will be exposed to other side.

Key negotiation methods

Key negotiation method is a method/math used to generate TCLK.

There are following key negotiation methods in r23 (zb_tlv_key_negotiation_methods_t) :

  • ZB_TLV_KEY_ECDHE_KEY_REQUEST_ZB_30
  • ZB_TLV_KEY_ECDHE_CURVE_25519_HASH_AESMMO128
  • ZB_TLV_KEY_ECDHE_CURVE_25519_HASH_SHA256
  • ZB_TLV_KEY_ECDHE_CURVE_P256_HASH_SHA256 (ZB Direct only)

KEY_REQUEST_ZB_30 is old pre-r23 method based on APS commands Request Key, Verify Key and Confirm Key.

25519 curve can be used with AESMMO128 or SHA256 hash function. ZBOSS supports both of them. Both hash functions are Optional. DSR recommends to enable both of them for better interoperability.

P256 curve is used in Zigbee Direct only and never used in DLK between Zigbee devices.

By default, when ZBOSS is in r23 mode (which is the default for r23 ZBOSS), it has following negotiations methods enabled: KEY_REQUEST_ZB_30, 25519_HASH_AESMMO128, 25519_HASH_SHA256.

There are no reasons to change default settings for production using, but application may want to update key negotiation settings for debug or testing purposes.

ZBOSS provides following API:

That API must be called before zboss_start()/zboss_start_no_autostart() call.

/* The application can also change key negotiation methods and PSK secrets.
* For example, we disable ZB_TLV_KEY_ECDHE_KEY_REQUEST_ZB_30.
* It means that ZC will not accept r23+ devices without DLK support */
zb_disable_key_neg_method(ZB_TLV_KEY_ECDHE_KEY_REQUEST_ZB_30);
/* That call is just for a demo here. That method is already enabled by
* zboss_use_r23_behavior() call. */
zb_enable_key_neg_method(ZB_TLV_KEY_ECDHE_CURVE_25519_HASH_SHA256);

PSK secrets

Supported PSK secrets are (zb_tlv_psk_secrets_t) :

  • ZB_TLV_PSK_SECRET_AUTH_TOKEN
  • ZB_TLV_PSK_SECRET_INSTALL_CODE
  • ZB_TLV_PSK_SECRET_PAKE_PASSCODE

PSK secret (passphrase) can be either generated from pre-configures stuff (installcode/passcode) or set up after authentication (authentication token). PSK secret is stored in APS keypair. PSK secret created from installcode/passcode can be updated while established authentication token can not.

Authentication token

If AUTH_TOKEN secret is enabled, ZBOSS uses the authentication token established after DLK complete using ZDO Get Authentication Token command. Authentication Token is then used for subsequent DLK as a pre-shared secret to prevent man-in-the-middle attacks. It supposed to be more secure than an installcode or a passcode. Note that ZBOSS always establishes Authentication Token after DLK complete. Disabling AUTH_TOKEN secret can be meaningful only for testing or debug purposes. DSR recommends to have it ON in production.

Once authentication token is established, it is stored in APS keypair and used as a passphrase in next DLK procedures if any.

Updating of a passphrase which is the established authentication token is impossible. The only way to forget an authentication token at TC is removing an APS keypair. So, if Joiner clears its key storage by some internal action loosing its Authentication token, further DLK procedures will fail until TC cleared APS keypair for it forgetting the Authentication token.

Installcode and passcode PSK

Installcode and passcode are quite similar secrets to be used for initial key establishment.

Enabling installcodes/passcodes means globally enabling all installcodes. TC additionally checks that it has installcode/passcode for that particular device and supposes installcode/passcode capability if no PSK material for that device found. Joiner checks that it has installcode/passcode configured and does not expose that PSK capability of no appropriate PSK material is set using production configuration block of by in the application.

To add installcode/passcode at Joiner from the application, use zb_secur_ic_set() call. It is possible to add one passcode and one installcode. ZBOSS stores both of them. Note that ZBOSS does not persist it in NVRAM.

To add a passcode at Joiner, pass ZB_IC_TYPE_PASSCODE to zb_secur_ic_set() (ic_types):

/* Set passcode for joiner */
zb_secur_ic_set(ZB_IC_TYPE_PASSCODE, g_r23_zed_passcode);

In contrast to Installcode, the passcode is short (4 bytes length), does not contain CRC on its tail, used in DLK procedure "as is", without creating a B6 hash.

The passcode can be used for DLK only - means can't be used to create a Provisional key for Zigbee 3.0-like NWK key transport.

API to enable/disable PSK secrets

That API must be called before zboss_start()/zboss_start_no_autostart() call.

zb_enable_psk_secret(ZB_TLV_PSK_SECRET_INSTALL_CODE);
zb_disable_psk_secret(ZB_TLV_PSK_SECRET_INSTALL_CODE);
/* Rewrite supported PSK secrets bit mask. Just to demonstrate the API */
{
zb_uint8_t supported_secrets_mask = 0;
ZB_TLV_PSK_SECRET_ENABLE(supported_secrets_mask, ZB_TLV_PSK_SECRET_AUTH_TOKEN);
ZB_TLV_PSK_SECRET_ENABLE(supported_secrets_mask, ZB_TLV_PSK_SECRET_INSTALL_CODE);
ZB_TLV_PSK_SECRET_ENABLE(supported_secrets_mask, ZB_TLV_PSK_SECRET_PAKE_PASSCODE);
zb_set_supported_psk_secrets(supported_secrets_mask);
}

It is not recommended to use that API in production.

Device interview

After "off-network" DLK, when Joined and TC established TCLK but TC not yet authenticated Joiner by setting NWK key to it, TC can start the procedure called "Device interview".

Device interview is a dialog between Joined and TC via APS. That includes ZDO and ZCL communication. Device interview must be started and finished by TC. By default Device interview is disabled at TC.

TC API

TC has API to globally enable/disable Device interview by calling zb_tc_enable_device_interview() and check the current state using zb_tc_is_device_interview_enabled() call.

If Device Interview is enabled, when DLK completed, application on TC receives ZB_ZDO_SIGNAL_DEVICE_READY_FOR_INTERVIEW signal. Signal parameters holds Joiner addresses (short and long). The TC application then can proceed with Device interview procedure by exchanging APS data with Joiner (using ZDO calls or ZCL traffic). TC can keep data exchange during device interview forever. The only requirement is to send packets frequently enough to do not go out of APS Security timeout (10s in r23 by default).

TC completes Device Interview by either authenticating Joiner by calling zb_tc_auth_device_after_interview() or rejecting its authentication by calling zb_tc_reject_device_after_interview().

When Device Interview finished by either explicit call from TC or timeout, TC gets ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_FINISHED signal. Check status in the parameters section of the signal.

Tha call zb_tc_is_interview_active_for_device() can be used to check the state of Device Interview for particular Joiner.

/* Switch ON device interview. Now ZC app receives
* ZB_ZDO_SIGNAL_DEVICE_READY_FOR_INTERVIEW signal and must explicitly finish
* the interview by calling zb_tc_auth_device_after_interview() */
/* Initiate the stack start with starting the commissioning */
{
TRACE_MSG(TRACE_ERROR, "ERROR zboss_start failed", (FMT__0));
}
else
{
/* Call the main loop */
}
{
TRACE_MSG(TRACE_APP1, "ZB_ZDO_SIGNAL_DEVICE_READY_FOR_INTERVIEW, short_addr 0x%x, ieee_addr " TRACE_FORMAT_64,
(FMT__D_A, dev_interview_params->short_addr, TRACE_ARG_64(dev_interview_params->long_addr)));
if (ZB_IEEE_ADDR_CMP(dev_interview_params->long_addr, g_r23_zed_ieee_addr))
{
TRACE_MSG(TRACE_APP1, "Start device interview for 0x%x", (FMT__D, dev_interview_params->short_addr));
app_start_device_interview(param, dev_interview_params->short_addr);
param = ZB_UNDEFINED_BUFFER;
}
else
{
TRACE_MSG(TRACE_APP1, "Authenticate device 0x%x without interview", (FMT__D, dev_interview_params->short_addr));
param = ZB_UNDEFINED_BUFFER;
}
break;
} /* ZB_ZDO_SIGNAL_DEVICE_READY_FOR_INTERVIEW */
{
TRACE_MSG(TRACE_APP1, "ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_FINISHED, status %hd", (FMT__H, status));
break;
} /* ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_FINISHED */
/* To continue the device interview, the TC can send another requests.
* To close the device interview and reject the device do nothing - after apsSecurityTimeOutPeriod (10s by default)
* the device will be removed automatically.
* To close the device interview and authorize the device call zb_tc_auth_device_after_interview() .
*/
if (resp->hdr.status == ZB_ZDP_STATUS_SUCCESS)
{
zb_ieee_addr_t ieee_addr;
if (RET_OK == zb_address_ieee_by_short(resp->hdr.nwk_addr, ieee_addr))
{
{
TRACE_MSG(TRACE_APP1, "device authorized " TRACE_FORMAT_64, (FMT__A, TRACE_ARG_64(ieee_addr)));
}
}
}

Joiner API

The only special API for Joiner is ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_STARTED signal which it receives when Device Interview starts.

When Device Interview finishes, Joiner receives the usual ZB_BDB_SIGNAL_DEVICE_FIRST_START signal. Means, for Joiner the end of Device Interview is same as authentication complete.

{
if (status == RET_OK)
{
/* Device iterview now finished */
TRACE_MSG(TRACE_APP1, "Device STARTED OK", (FMT__0));
}
else
{
TRACE_MSG(TRACE_ERROR, "Device started FAILED status %d",
(FMT__D, status));
}
break;
}
{
TRACE_MSG(TRACE_APP1, "ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_STARTED, status %hd", (FMT__H, status));
break;
}

APS frame counter synchronization

That feature minimizes possibility of reply attack by using of special protocol for APS security counters synchronization. That r23 feature is backward compatible. ZBOSS switches it on automatically. It does not require any updates in applications using ZBOSS.

ZB 3.0/SE: get authentication level

The initial use case for that feature is using a mixed ZB 3.0 / SE network where SE devices can check the "trust level" of other devices in the net and make some decisions at the application level.

The difference between SE and BDB security in Zigbee before r23 is that SE device joins network strictly using Installcodes and establishes TCLK using CBKE. So SE device must be sure it communicates to the device which established it security in SE way. r23 now provides such functionality.

In r23 TC stores in APS keypair information about 2 facts: using PSK during initial join and TCLK establishment method. r23 defines a ZDO command to ask that information from TC ZDO Security Get Authentication Level Request.

ZBOSS API to get is zb_zdo_get_auth_level_req() call. From the application point of view it works the same way at ZC and any other device. Indeed, at ZC it works locally while at other devices it sends ZDO request and waits for the response.

/*
* Functions for demonstrate how to get authentication level
*/
static void app_sec_get_auth_lvl_cb (zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1, "app_send_get_auth_lvl_cb, param %hd:", (FMT__H, param));
TRACE_MSG(TRACE_APP1, "# tsn = %hd, status 0x%x", (FMT__H_H, ptr->tsn, ptr->status));
TRACE_MSG(TRACE_APP1, "# ieee_addr = "TRACE_FORMAT_64, (FMT__A, TRACE_ARG_64(ptr->target_ieee)));
TRACE_MSG(TRACE_APP1, "# initial_join_auth = %hd, key_upd_method = %hd", (FMT__H_H, ptr->initial_join_auth, ptr->key_upd_method));
ZB_SCHEDULE_APP_ALARM(app_do_next_test_step, param, ZB_TIME_ONE_SECOND);
}
static void app_sec_get_auth_lvl(zb_uint8_t param, zb_ieee_addr_t target_ieee_addr)
{
ZB_IEEE_ADDR_COPY(buf_params->target_ieee, target_ieee_addr);
zb_zdo_get_auth_level_req(param, app_sec_get_auth_lvl_cb);
}

Trust Center swapout

TC API

TC swapout requires from ZC to backup its TCLK database offline. It later can be restored to another device to be acting as a TC. TC DB format is in ZBOSS internal format. It is not documented.

When it is time to backup TCLK DB, ZBOSS sends ZB_TCSWAP_DB_BACKUP_REQUIRED_SIGNAL signal. It is up to TC application to do backup immediately or later.

Switch on/off backup of the established authentication token: zb_tcsw_enable_passkey_backup(). By default such backup is enabled.

Check whether TC DB backup is required: zb_tcsw_need_backup().

Start TC DB backup: zb_tcsw_start_backup_db().

Get TC DB porting into the buffer in RAM: zb_tcsw_get_portion(). TC application then need to take care on saving DB porting to some external storage. To check that TC backup is in progress may call zb_tcsw_is_busy() or check retcode of zb_tcsw_get_portion().

TRACE_MSG(TRACE_APP1, "Signal ZB_TCSWAP_DB_BACKUP_REQUIRED_SIGNAL, status %d", (FMT__D, status));
app_backup_tc_db();
break;
static void app_backup_tc_db(void)
{
zb_uint_t portion_len;
zb_uint_t nvram_buf_pos = 0U;
zb_ret_t ret = zb_tcsw_start_backup_db();
TRACE_MSG(TRACE_APP1, "app_backup_tc_db, ret %x, need_backup %hd",
(FMT__D_H, ret, zb_tcsw_need_backup()));
do
{
portion_len = zb_tcsw_get_portion((zb_uint8_t*)g_nvram_buf + nvram_buf_pos, TCSW_PORTION_SIZE);
nvram_buf_pos += portion_len;
}
while (portion_len != 0);
}

When new TC is started, it must know by some mean that it is restored after TC swapout. The backup method is out of ZBOSS API scope.

Swapped TC must initially start not doing Formation, using zb_zdo_start_no_autostart() call. When it got ZB_ZDO_SIGNAL_SKIP_STARTUP signal, it is time to start TC DB restore.

Start DB restore by calling zb_tcsw_start_restore_db(). Then feed ZBOSS by DB portions using zc_tcsw_restore_portion(). When feeding complete, call zc_tcsw_restore_finish().

After TC DB restore completed, continue ZBOSS start (do Formation) by calling zboss_start_continue().

static void app_restore_tc_db(void)
{
zb_ret_t ret;
zb_uint_t buf_offset = 0U;
ret = zb_tcsw_start_restore_db(ZB_FALSE);
TRACE_MSG(TRACE_APP1, ">> app_restore_tc_db", (FMT__0));
do
{
ret = zc_tcsw_restore_portion((zb_uint8_t*)g_nvram_buf + buf_offset, TCSW_PORTION_SIZE);
buf_offset += TCSW_PORTION_SIZE;
}
while (ret == RET_AGAIN);
ZB_ASSERT(ret == RET_OK);
ret = zc_tcsw_restore_finish();
TRACE_MSG(TRACE_APP1, "<< app_restore_tc_db, ret %hd", (FMT__H, ret));
}

API for ZR and ZED

The only API is ZB_TC_SWAPPED_SIGNAL which ZBOSS sends to inform the application that it successfully completed TC rejoin after ZC has been swapped.

TC rejoin initiation is usually done by BDB or SE ZBOSS commissioning layer, but can be initiated by the application as well. Related signals which are not a part of TC swapout API but might be useful for the application are ZB_BDB_SIGNAL_STEERING, ZB_BDB_SIGNAL_TC_REJOIN_DONE, ZB_TCLK_UPDATED_SIGNAL.

{
TRACE_MSG(TRACE_APP1, "ZB_TC_SWAPPED_SIGNAL, status %hd", (FMT__H, status));
s_tc_swapped = ZB_TRUE;
}
break;

PANID conflict resolution API

PANID conflict resolution API is simplified in r23 ZBOSS compared to r22 ZBOSS. PANID conflict detection can not now be disabled. zb_enable_panid_conflict_resolution() call is now empty.

Automatic panid conflict resolution is removed from r23, zb_enable_auto_pan_id_conflict_resolution() function is removed from ZBOSS API (note it was not recommended for use even in pervious versions).

In r23 ZBOSS PANID conflict resolution API can be used by ZC only.

Signal ZB_NWK_SIGNAL_PANID_CONFLICT_DETECTED informs the application about panid conflict detection.

If the application decides to start panid conflict resolution, it must schedule for execution zb_start_pan_id_conflict_resolution() passing there a valid buffer as a parameter.

All Hubs, WWAH and related r23 features

WWAH is a set of extended features initially required to work with Amazon Alexa. The features mainly provides fine-grained security control in hub-centric network: the network having the main application and еру security center - the Hub which is normally at TC.

ZBOSS r22 already has WWAH support accessed via WWAH ZCL cluster ZBOSS has full support for Server role only (which is all devices except the Alexa Hub itself).

WWAH has 2 groups of settings: related to Zigbee Core and to Application layer. Zigbee r23 штсщкзщкфеуы some Core-level WWAH settings, but uses ZDO commands instead of ZCL cluster. Not all WWAH features are included into r23 All Hubs. Some settings are a bit different.

ZBOSS supports both r23 ZDO and WWAH ZCL cluster interfaces at the same time. It is possible to build ZBOSS with r23 All Hubs support but without WWAH while the build with WWAH but without r23 All Hubs is not possible.

Most of common settings are transparrent. That mean, setting set via ZDO is visible via ZCL WWAH cluster and vice versa. Note that WWAH specification is sometimes a bit different from r23 All Hubs. If the application includes and enables WWAH Server cluster, WWAH specification has the priority, else ZBOSS uses r23 specification.

WWAH / All Hubs features related to security

All Hubs Restricted vs WWAH Configuration mode.

WWAH cluster has a mode called "Configuration mode". r23 specification defines a "Restricted mode". It has the reverse meaning. So Restricted mode == !(Configuration mode). ZBOSS uses both terms. The logic in WWAH and r23 is also a bit different.

In r23 if device is in Restricted mode, some ZDO commands can be accepted only from TC if encrypted by TCLK. Limit accepting of following ZDO commands in the r23 Restricted mode:

  • bind,
  • unbind,
  • clear all bindings
  • mgmt leave

WWAH defines the opposite: Configuration mode means all ZDO commands are allowed. WWAH defines the list of ZDO commands which can be accepted from non-TC devices when device is NOT in Configuration mode:

  • NWK Address Request
  • IEEE Address Request
  • Node Descriptor Request
  • Power Descriptor Request
  • Simple Descriptor Request
  • Active Endpoint Request
  • Match Descriptor Request
  • Complex Descriptor Request
  • User Descriptor Request
  • Discovery Cache Request
  • Device Announce
  • Parent Announce
  • System Server Discovery Request
  • Extended Simple Descriptor Request
  • Extended Active Endpoint Request
  • Mgmt_LQI_Req
  • Mgmt Routing Request
  • Mgmt NWK Update Request
  • Mgmt NWK Enhanced Update Request
  • Mgmt NWK IEEE Joining List Request
  • Mgmt MWK Permit Join Request

API to enable/disable Restricted mode is zb_zdo_send_configuration_parameters() call. Set or clear zb_zdo_configuration_parameters_t::restricted_mode_enabled bit in zb_zdo_configuration_parameters_t to switch Restricted mode.

/* 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);
}

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

nwkLeaveRequestAllowed setting

TC can switch on/off Mgmt Leave accepting by ZR - nwkLeaveRequestAllowed. It can be done using Security_Set_Configuration_req.

API to enable/disable Restricted mode is zb_zdo_send_configuration_parameters() call. Set or clear zb_zdo_configuration_parameters_t::leave_req_allowed bit in zb_zdo_configuration_parameters_t.

WWAH has similar setting, but it disables "MGMT Leave Without Rejoin" only while r23 disables any Leave.

For code example see All Hubs Restricted vs WWAH Configuration mode..

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

requireLinkKeyEncryptionForApsTransportKey

That flag indicates whether or not the device will require that the APS Transport Key command SHALL be APS encrypted with the device’s unique Trust Center Link Key. By default that setting is FALSE. The obvious usage of that setting is to disable accepting of the Transport Key sending NWK by broadcast.

API to enable/disable Link Key encrypetion for Transport Key is zb_zdo_send_configuration_parameters() call. Set or clear zb_zdo_configuration_parameters_t::require_link_key_encr_for_tk bit in zb_zdo_configuration_parameters_t.

For code example see All Hubs Restricted vs WWAH Configuration mode..

WWAH has similar setting called TCSecurityOnNwkKeyRotationEnabled. In WWAH that flag also disables reception of broadcast NWK Update command. So, that flag can be set either via WWAH cluster or via r23 ZDO command. If WWAH cluster is enabled in the application, reception of the broadcast NWK Update command is disabled according to WWAH specification. If application does not define WWAH cluster, ZBOSS works according to r23 specification ehere that command reception does not depend on requireLinkKeyEncryptionForApsTransportKey.

Disabling channel and/or pan id change

ZC can disable pan id and/or channel change by the device. Use zb_zdo_send_configuration_parameters() call setting zb_zdo_configuration_parameters_t::disable_channel_change and/or zb_zdo_configuration_parameters_t::disable_panid_change bits in zb_zdo_configuration_parameters_t.

That call asks sets nwkNextPanId and nwkNextChannelChange ate device to the current values, so device ignores channel/panid change by NWK Update command.

If zb_zdo_configuration_parameters_t::disable_channel_change and/or zb_zdo_configuration_parameters_t::disable_panid_change bits on a call to zb_zdo_send_configuration_parameters() are not set, ZC does not change nwkNextPanId and nwkNextChannelChange at the device. That means, zb_zdo_send_configuration_parameters() call can be used to disable panid/channel change but can't be used to enable pre-r23 change behavior where any channel change vis NWK Update command will be accepted.

For code example see All Hubs Restricted vs WWAH Configuration mode..

To enable pre-r23 behavior call zb_zdo_send_next_panid_change() providing the value of zb_zdo_next_panid_change_parameters_t::next_panid_change 0xffff in zb_zdo_next_panid_change_parameters_t as a parameter.

Similary, to enable pre-r23 behavior call zb_zdo_send_next_channel_change() providing the value of zb_zdo_next_channel_change_parameters_t::next_channel_change 0 in zb_zdo_next_channel_change_parameters_t as a parameter.

PANID and channel change by TC

ZBOSS provides an API to secure changing of panid/channel. That API works in Centralized security mode only, and can be called by TC only.

Note that normally panid change is required for panid conflict resolution, so it is started internally by ZBOSS. Still, user to change panid API extsts.

The calls sequence is same for both channel and panid change:

  • Prepare to the change (that unicasts ZDO Set Configuration Req to all the devices at the network)
  • ZBOSS calls user's callback providing number of devices not answered to ZDO Set Configuration Req or answered by a error, so the application may take the decision about panid/channel change.
  • Panid/channel change itself.

Panid change:

First call zb_prepare_network_for_panid_change() providing in zb_zdo_next_panid_change_parameters_t::next_panid_change field of zb_panid_change_parameters_t in parameters section the panid value, and callback to be called when the preparation phase done. When ZBOSS completed the preparation stage, it calls the callback passed to zb_prepare_network_for_panid_change(). The user application calls zb_start_panid_change() to complete the process of panid change.

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));
}
}
}

Channel change:

First call zb_prepare_network_for_channel_change() providing in zb_zdo_next_channel_change_parameters_t::next_channel_change field of zb_zdo_next_channel_change_parameters_t in parameters section the panid value, and callback to be called when the preparation phase done. When ZBOSS completed the preparation stage, it calls the callback passed to zb_prepare_network_for_channel_change(). The user application calls zb_start_channel_change() to complete the process of panid change.

/*
* 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));
}
}

Other All Hubs features

ZDO decommission req

zb_zdo_decommission_req() sends Secur_Decommission_req command. The command informs the device that 3-rd device has left, so it is high time to clear its keys and bindings.

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_ASSERT(0);
}
}

ZDO Clear All Bindings req

Call zb_zdo_clear_all_bind_req() to clear all bindings on a remote device.

Parent selection: hub connectivity, preferred parent, long uptime bits

Router Information Global TLV, included into beacon payload in r23, contains 3 bits which defines the priority of potential parent: hub connectivity, preferred parent, uptime (high to low priority).

ZBOSS also supports WWAH-like beacon payload extension where Hub connectivity and Long Uptime bits are set in 2 reserved bits of Zigbee beacon payload.

ZBOSS tracks hub connectivity automatically. It can also be overwritten by the call to zb_set_tc_connectivity(). Local value of hub connectivity can be checked by calling zb_get_tc_connectivity().

Locally preferred parent bit - zb_set_nwk_preferred_parent().

ZBOSS automatically tracks "long uptime" bit setting it 24h after ZR/ZC started. No API to change it.

Beacon survey

Call zdo_mgmt_beacon_survey_req() to ask the remote device to do active scan and fill the response according to the procedure defined in r23 2.4.3.3.12 Mgmt_NWK_Beacon_Survey_req and respond by 5 best potential parents.

That is like asking the question "if you join now, which parent will you choose"? DSR has no ideas how that result is to be used.

/*
* Functions for demonstrate Beacon Survey
*/
static void app_beacon_survey_cb(zb_uint8_t param)
{
zb_uindex_t i;
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,
resp->results.total_beacons_surveyed,
resp->results.num_cur_nwk_beacons,
resp->results.num_other_nwk_beacons));
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->channel_page_cnt = ZB_SURVEY_BEACON_MAX_CHANNEL_PAGE_CNT;
req_param->dst_addr = short_addr;
zb_channel_page_list_get_page_idx(APPLICATION_CHANNEL_PAGE, &idx);
ZB_BZERO(req_param->channel_page_list, sizeof(zb_uint32_t) * ZB_SURVEY_BEACON_MAX_CHANNEL_PAGE_CNT);
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));
}

WWAH features not covered by r23

There are WWAH features/settings not covered by the r23 specification. Some of them are at BDB or ZCL level. That functions are present only if ZBOSS is compiled with WWAH support.

  • accept WWAH cluster commands only from ZC
  • MAC TX retry count read via WWAH cluster ZB_ZCL_ATTR_WWAH_MAC_RETRY_COUNT_ID
  • poll interval control
  • APS ACK extempt - configurable if APS ACK needed for particular ZCL cluster. By default APS ACK is required for all but clusters from the ack extempt table. If APS ACK is required, it is enforced at TX at ZBOSS ZCL layer.
  • Decisions about TCLK requirement on per-zcl-cluster basis - APS link key authorization table use_trust_center_for_cluster_table - ?
  • setting whether OTA downgrade enabled
  • setting whether OTA must be from TC
  • setting for APS inter-pan accept configurable via cluster
  • rejoin recovery & rejoin backoff for IAS Zone device
  • configurable nwk_retry_count
  • control over poll retries
    • parent threshold
    • mac poll retry (const - 3)
    • mac poll failure wait time - configurable
    • poll cca retry count
  • periodic router check-in
  • bad parent recovery

Runtime switch of r23 ZBOSS into r22 mode

zb_nwk_use_r22_joining() - keep r23 features, but do not use NWK commissioning. That is a debug feature.

zboss_use_r22_behavior() - behave like r22 stack: switch off all r23 features.

/* Disable all R23 functions. The device will behave like r22 router.
* Just to demonstrate how legacy device join to R23 ZC */

zboss_use_r23_behavior() - behave like r23 stack. That is the default setting.

/* zboss_use_r23_behavior() sets all key negotiation methods and PSK secrets
* by default. That call is here just for a demo. ZBOSS in r23 mode by
* default. */

Group TX in apsde-data.req

New field zb_apsde_data_req_t.nwk_broadcast_addr - broadcast address to be used for tx to a group. Assign there 0 to use the default ZB_NWK_BROADCAST_RX_ON_WHEN_IDLE.

Other ZBOSS API introduced in r23 codebase

New signals

The signal ZB_TCLK_UPDATED_SIGNAL is sent when local device completed its TCLK update. That normally done at initial join or after rejoin and TC swapout detection.

{
TRACE_MSG(TRACE_APP1, "ZB_TCLK_UPDATED_SIGNAL, status %hd", (FMT__H, status));
if (s_tc_swapped)
{
TRACE_MSG(TRACE_APP1, "TCLK updated after TC swap", (FMT__0));
}
break;
}

The signal ZB_SIGNAL_JOIN_DONE is sent when that device is just just joined/rejoined (maybe not authenticated yet).

if (status == 0)
{
TRACE_MSG(TRACE_APP1, "Joined/rejoined ok", (FMT__0));
}
break;

The chain of signal handlers

That API is designed for ZB Direct. All ZBOSS samples still use the original single signal handler.

API:

zb_signal_handler_add_back() zb_signal_handler_add_front() zb_signal_handler_remove()

New debug API for key broadcastiung

r23 ZBOSS codebase now uses new API to issue a broadcast packet exposing the key in unencrypted form to be used by Wireshark. That is pure debug feature enabled in debug ZBOSS builds only. Note: broadcasting keys zeroeds you network security, so use it only at debug time and never keep it in production!

ZBOSS now provides the signal ZB_DEBUG_SIGNAL_TCLK_READY which the application receives when TCLK has been established. That means ant TCLK, so ZC can use that signal to be informad about generation of any TCLK in the network while all other devices get that signal only on their own TCLK establishment.

Application than may call zb_debug_broadcast_aps_key() function to broadcast the key

In release ZBOSS build zb_debug_broadcast_aps_key() exisis but does nothing.

#ifdef DEBUG
/* This signal is called when TC and Joiner established the TC link key*/
{
/* Broadcast APS key to decode packets in Wireshark. Only for debugging */
}
break;
#endif /* DEBUG */

Stack internals update

LQA instead of LQI

That feature is intended to improve routing. No additional API need to be used by the application. Some data structures has been changed. zb_neighbor_tbl_ent_t has been optimized to decrease RAM usage.

See also
zb_zdo_neighbor_table_record_t.
zb_neighbor_tbl_ent_t.

Discovery table instead of extended neighbor

In pre-r23 implementations ZBOSS has neighbor table which contained "normal" and "extended" entries. Extended entries were produced by Active scan result.

Now ZBOSS has a separate data structure - Discovery table which has the same meaning as Extended neighbor: it holds the result of Active scan.

See also
zb_neighbor_tbl_ent_t.
zb_nwk_disc_tbl_ent_t.

To simplify porting applications between ZBOSS r22 to r23, an alias zb_ext_neighbor_tbl_ent_t is created to zb_nwk_disc_tbl_ent_t.

Note that in ZED-only build neighbor table size is now 1 while discovery table size is > 1.

For ZBOSS compiled with the configurable memory feature ZB_CONFIG_NWK_DISC_TABLE_SIZE setting is introduced.

NVRAM structures change

That is pure internal change. Transparent NVRAM migration when updating FW from r22 to r23 ZBOSS is implemented, so it is possible to update FW via OTA between ZBOSS r22 and r23 without loosing an NVRAM contents.

Sniffer for r23

DSR provided dissectors for r23 commands to the Wireshark tream, so r23 support by DSR is already included into the official Wireshark nightly builds.

ZB_NVRAM_APP_DATA1
@ ZB_NVRAM_APP_DATA1
Definition: zboss_api.h:1424
zb_zdo_beacon_survey_potential_parents_t::current_parent_lqa
zb_uint8_t current_parent_lqa
Definition: zboss_api_zdo.h:4064
ZB_TCLK_UPDATED_SIGNAL
#define ZB_TCLK_UPDATED_SIGNAL
Definition: zboss_api_zdo.h:873
zb_zdo_beacon_survey_resp_params_s
Structure to store information when 'Beacon Survey' procedure is executing.
Definition: zboss_api_zdo.h:4081
zb_uint_t
unsigned int zb_uint_t
Unsigned int (at least 2 bytes).
Definition: zb_types.h:325
zb_channel_panid_change_preparation_s::error_cnt
zb_uint16_t error_cnt
Definition: zboss_api_nwk.h:643
zb_panid_change_parameters_s::next_panid_change
zb_uint16_t next_panid_change
Definition: zboss_api_nwk.h:662
zb_uint8_t
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:147
TRACE_MSG
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:369
zb_buf_initial_alloc
#define zb_buf_initial_alloc(buf, size)
Initial data space allocation in buffer.
Definition: zboss_api_buf.h:393
ZB_SIGNAL_JOIN_DONE
#define ZB_SIGNAL_JOIN_DONE
Definition: zboss_api_zdo.h:882
zb_zdo_beacon_survey_resp_params_s::status
zb_uint8_t status
Definition: zboss_api_zdo.h:4084
zb_buf_get_out_delayed
#define zb_buf_get_out_delayed(callback)
Allocate OUT buffer, call a callback when the buffer is available.
Definition: zboss_api_buf.h:275
zb_zdo_mgmt_beacon_survey_param_s::dst_addr
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:3972
zb_ret_t
zb_int32_t zb_ret_t
Return type for ZB functions returning execution status.
Definition: zb_errors.h:33
zb_zdo_clear_all_bind_req_param_s::eui64_list
zb_ieee_addr_t eui64_list[ZB_ZDO_CLEAR_ALL_BIND_EUI64_LIST_SIZE]
Definition: zboss_api_zdo.h:3858
ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_STARTED
#define ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_STARTED
Definition: zboss_api_zdo.h:828
zb_zdo_clear_all_bind_req_param_s::eui64_count
zb_uint8_t eui64_count
Definition: zboss_api_zdo.h:3857
zb_zdo_secur_get_auth_level_rsp_s
Definition: zboss_api_zdo.h:3092
zb_debug_signal_tclk_ready_params_s
TCLK Read debug signal parameters.
Definition: zboss_api_zdo.h:1480
ZB_TC_SWAPPED_SIGNAL
#define ZB_TC_SWAPPED_SIGNAL
Definition: zboss_api_zdo.h:863
zb_zdo_signal_device_ready_for_interview_params_s
Device Ready For Interview signal parameters.
Definition: zboss_api_zdo.h:1379
zb_channel_change_parameters_s::next_channel_change
zb_uint32_t next_channel_change
Definition: zboss_api_nwk.h:652
ZB_ZDO_SIGNAL_DEFAULT_START
#define ZB_ZDO_SIGNAL_DEFAULT_START
Definition: zboss_api_zdo.h:140
ZB_BDB_SIGNAL_DEVICE_FIRST_START
#define ZB_BDB_SIGNAL_DEVICE_FIRST_START
Definition: zboss_api_zdo.h:233
zboss_main_loop
void zboss_main_loop(void)
zb_zdo_set_configuration_resp_s::tsn
zb_uint8_t tsn
Definition: zboss_api_zdo.h:2790
zb_enable_psk_secret
void zb_enable_psk_secret(zb_uint8_t secret)
zb_uint32_t
unsigned int zb_uint32_t
Project-local 4-byte unsigned int type.
Definition: zb_types.h:176
zb_zdo_get_auth_level_req
zb_uint8_t zb_zdo_get_auth_level_req(zb_uint8_t param, zb_callback_t cb)
Get authentication level for target device.
ZB_SCHEDULE_APP_CALLBACK
#define ZB_SCHEDULE_APP_CALLBACK(func, param)
Definition: zboss_api_core.h:319
ZB_BUF_GET_PARAM
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:457
zb_zdo_configuration_parameters_s::leave_req_allowed
zb_bitfield_t leave_req_allowed
Definition: zboss_api_zdo.h:3807
ZB_TRUE
#define ZB_TRUE
Definition: zb_types.h:350
zboss_use_r23_behavior
void zboss_use_r23_behavior(void)
ZB_SCHEDULE_APP_ALARM
#define ZB_SCHEDULE_APP_ALARM(func, param, timeout_bi)
Definition: zboss_api_core.h:370
zb_zdo_set_configuration_resp_s
Response by ZDO Set Configuration req.
Definition: zboss_api_zdo.h:2788
zb_zdo_clear_all_bind_req_param_s::dst_addr
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:3856
zb_zdo_beacon_survey_results_t::num_cur_nwk_beacons
zb_uint8_t num_cur_nwk_beacons
Definition: zboss_api_zdo.h:4042
ZB_SURVEY_BEACON_MAX_CHANNEL_PAGE_CNT
#define ZB_SURVEY_BEACON_MAX_CHANNEL_PAGE_CNT
Definition: zboss_api_zdo.h:3964
zb_set_supported_psk_secrets
void zb_set_supported_psk_secrets(zb_uint8_t secret_mask)
zb_zdo_configuration_parameters_s::disable_channel_change
zb_bitfield_t disable_channel_change
Definition: zboss_api_zdo.h:3809
zb_start_channel_change
zb_ret_t zb_start_channel_change(zb_uint8_t param)
zb_zdo_signal_device_ready_for_interview_params_s::long_addr
zb_ieee_addr_t long_addr
Definition: zboss_api_zdo.h:1382
ZB_ZDO_SIGNAL_DEVICE_READY_FOR_INTERVIEW
#define ZB_ZDO_SIGNAL_DEVICE_READY_FOR_INTERVIEW
Definition: zboss_api_zdo.h:817
zb_zdo_beacon_survey_potential_parents_t::count_potential_parents
zb_uint8_t count_potential_parents
Definition: zboss_api_zdo.h:4066
zb_enable_key_neg_method
void zb_enable_key_neg_method(zb_uint8_t method)
zb_address_ieee_by_short
zb_ret_t zb_address_ieee_by_short(zb_uint16_t short_addr, zb_ieee_addr_t ieee_address)
zb_zdo_beacon_survey_results_t::total_beacons_surveyed
zb_uint8_t total_beacons_surveyed
Definition: zboss_api_zdo.h:4039
ZB_ZDP_STATUS_SUCCESS
#define ZB_ZDP_STATUS_SUCCESS
Definition: zboss_api_zdo.h:41
zb_nvram_write_dataset
zb_ret_t zb_nvram_write_dataset(zb_nvram_dataset_types_t t)
zb_debug_broadcast_aps_key
zb_ret_t zb_debug_broadcast_aps_key(zb_ieee_addr_t long_addr)
zb_buf_begin
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:354
zb_tc_enable_device_interview
void zb_tc_enable_device_interview(zb_bool_t enable)
ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_FINISHED
#define ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_FINISHED
Definition: zboss_api_zdo.h:946
zb_disable_key_neg_method
void zb_disable_key_neg_method(zb_uint8_t method)
zb_debug_signal_tclk_ready_params_s::long_addr
zb_ieee_addr_t long_addr
Definition: zboss_api_zdo.h:1483
zb_ieee_addr_t
zb_64bit_addr_t zb_ieee_addr_t
Long (64-bit) device address.
Definition: zb_types.h:535
zb_zdo_configuration_parameters_s::disable_panid_change
zb_bitfield_t disable_panid_change
Definition: zboss_api_zdo.h:3812
zb_zdo_secur_get_auth_level_req_s
Parameters for get authentication level request.
Definition: zboss_api_zdo.h:3087
RET_OK
#define RET_OK
Error codes for non-void stack functions. In general, function can return OK, BLOCKED or some error....
Definition: zb_errors.h:79
zb_zdo_beacon_survey_results_t::num_potential_parents_current_zbn
zb_uint8_t num_potential_parents_current_zbn
Definition: zboss_api_zdo.h:4045
ZB_TLV_PSK_SECRET_ENABLE
#define ZB_TLV_PSK_SECRET_ENABLE(var, secret)
Definition: zboss_api.h:1161
zb_address_short_by_ieee
zb_uint16_t zb_address_short_by_ieee(const zb_ieee_addr_t ieee_address)
zb_zdo_configuration_parameters_s::dst_addr
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:3799
zb_zdo_beacon_survey_resp_params_s::parents
zb_zdo_beacon_survey_potential_parents_t parents
Definition: zboss_api_zdo.h:4086
zb_zdo_set_configuration_resp_s::status
zb_uint8_t status
Definition: zboss_api_zdo.h:2791
zb_channel_change_parameters_s
Parameters for zb_prepare_network_for_channel_change() and zb_start_channel_change()
Definition: zboss_api_nwk.h:650
zb_zdo_configuration_parameters_s
Configuration parameters Stack sends set_configuration_req to the device with set values.
Definition: zboss_api_zdo.h:3797
ZB_TIME_ONE_SECOND
#define ZB_TIME_ONE_SECOND
Definition: zboss_api_core.h:172
zb_uint16_t
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:151
zb_zdo_beacon_survey_potential_parents_t::current_parent
zb_uint16_t current_parent
Definition: zboss_api_zdo.h:4063
zb_prepare_network_for_panid_change
zb_ret_t zb_prepare_network_for_panid_change(zb_uint8_t param, zb_callback_t cb)
zb_secur_ic_set
zb_ret_t zb_secur_ic_set(zb_uint8_t ic_type, const zb_uint8_t *ic)
Set install code for the device.
zb_prepare_network_for_channel_change
zb_ret_t zb_prepare_network_for_channel_change(zb_uint8_t param, zb_callback_t cb)
zb_panid_change_parameters_s
Parameters for zb_prepare_network_for_panid_change() and zb_start_panid_change()
Definition: zboss_api_nwk.h:660
ZB_TCSWAP_DB_BACKUP_REQUIRED_SIGNAL
#define ZB_TCSWAP_DB_BACKUP_REQUIRED_SIGNAL
Definition: zboss_api_zdo.h:856
zb_buf_free
#define zb_buf_free(buf)
Free packet buffer and put it into free list.
Definition: zboss_api_buf.h:344
zdo_mgmt_beacon_survey_req
zb_uint8_t zdo_mgmt_beacon_survey_req(zb_uint8_t param, zb_callback_t cb)
Sends Mgmt beacon survey request.
ZB_FALSE
#define ZB_FALSE
Definition: zb_types.h:349
zb_zdo_configuration_parameters_s::require_link_key_encr_for_tk
zb_bitfield_t require_link_key_encr_for_tk
Definition: zboss_api_zdo.h:3804
zb_tc_auth_device_after_interview
zb_ret_t zb_tc_auth_device_after_interview(const zb_ieee_addr_t device_addr)
zb_zdo_decommission_req
zb_uint8_t zb_zdo_decommission_req(zb_uint8_t param, zb_callback_t cb)
Sends Secur_Decommission_req command.
ZB_ZDO_SIGNAL_GET_PARAMS
#define ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, type)
Definition: zboss_api_zdo.h:1111
zb_disable_psk_secret
void zb_disable_psk_secret(zb_uint8_t secret)
zb_zdo_configuration_parameters_s::restricted_mode_enabled
zb_bitfield_t restricted_mode_enabled
Definition: zboss_api_zdo.h:3800
zb_zdo_mgmt_beacon_survey_param_s
Parameters for beacon_survey_req command.
Definition: zboss_api_zdo.h:3967
ZB_DEBUG_SIGNAL_TCLK_READY
#define ZB_DEBUG_SIGNAL_TCLK_READY
Definition: zboss_api_zdo.h:1087
ZB_BDB_SIGNAL_DEVICE_REBOOT
#define ZB_BDB_SIGNAL_DEVICE_REBOOT
Definition: zboss_api_zdo.h:253
zb_zdo_send_configuration_parameters
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.
zb_start_panid_change
zb_ret_t zb_start_panid_change(zb_uint8_t param)
zb_zdo_clear_all_bind_req_param_s
Parameters for zdo_clear_all_bind_req.
Definition: zboss_api_zdo.h:3854
zb_channel_panid_change_preparation_s
Callback parameters for zb_prepare_network_for_channel_change() and zb_prepare_network_for_panid_chan...
Definition: zboss_api_nwk.h:641
zboss_use_r22_behavior
void zboss_use_r22_behavior(void)
zboss_start_no_autostart
zb_ret_t zboss_start_no_autostart(void)