nRF5 SDK for Thread and Zigbee v3.1.0
Introduction

The nRF5 Software Development Kit for Thread and Zigbee helps you when developing products for these protocols with Nordic Semiconductor's advanced nRF52840 System on Chip (SoC).

Both the Zigbee stack and the Thread stack and examples are production level.

Note
When developing products using the Zigbee stack, in several .h files you will come across references to snippets in .c files. These .c files are not included in the SDK package. Check the API reference for the related .h file to see the snippet code usage.

Release Notes:

nRF5 SDK for Thread and Zigbee v3.1.0
-------------------------------------
Release Date: Week 23, 2019


****** Release highlights ******
- Thread: Introduced a set of new thread-safe libraries with concurrent access to cryptographic functions for RTOS environments. Thread FreeRTOS examples now by default use the mbedTLS thread-safe libraries without hardware acceleration.
- Zigbee: Introduced Zigbee stack add-ons.
- Zigbee: Improved OTA DFU Client.
- Zigbee: Removed some bugs and limitations in the ZBOSS stack.
- Shared: Extended Benchmark Application to enable BLE Central + Zigbee Router/Coordinator measurements.
- Shared: Added implementation of mbedtls mutexes for FreeRTOS.

For detailed release notes, see below.

---------------------------------------

This release is the production-ready release of the Thread features available on the nRF52840 chip.
The nRF52840 running the OpenThread stack is Thread 1.1 Certified (https://www.threadgroup.org/What-is-Thread#certifiedproducts).

This release is the production-ready release of the Zigbee features available on the nRF52840 chip.
The nRF52840 running the Zigbee stack conforms to Zigbee PRO R21 + Green Power Proxy specifications.

The Zigbee stack provided by the release has been successfully tested in Zigbee Alliance Authorized Test Laboratory
and has received formal approval from Zigbee Alliance as a Zigbee Compliant Platform.

The Nordic Zigbee software solution released as part of nRF5 SDK for Thread and Zigbee incorporates
the Base Device Behavior specification and the latest of the ZCL specification (ver. 7).
This enables to build, certify, and ship commercial Zigbee 3.0 Certified Products.

Software components and application examples for MDK, peripherals, BLE, and NFC
have been inherited from nRF5 SDK v15.3.0. No changes were made to the SDK v15.3.0 content.

For information about the supported toolchains, SoftDevices and boards, see the Getting Started with Thread and Zigbee page.

****** Multiprotocol limitations ******
- Interrupts with IRQ priority 2 and 3 must not be used for multiprotocol examples.
- Limitations of simultaneous operation of the SoftDevice frontend and the 802.15.4 frontend:
 - Do not use the PPI channels reserved by the SoftDevice (17, 18, 19).
 - The SoftDevice and the 802.15.4 driver must use separate sets of PPI channels, for example (1, 2) and (3, 4).
 - The SoftDevice and the 802.15.4 driver must use separate sets of GPIOTE channels, for example 4 and (6, 7).
- Due to a limitation of the SoftDevice, depending on the configured timeslot timeout of nRF IEEE 802.15.4 radio driver, BLE activity may cause 100% CPU utilization, or increase switching times. The details are presented in the official documentation in the Multiprotocol considerations section, available in Thread and Zigbee shared features > Multiprotocol support with BLE/Bluetooth > Dynamic multiprotocol.

---------------------------------------

****** Thread and Zigbee common features ******
- Introduced a new configuration parameter of NRF_LOG module: NRF_LOG_NON_DEFFERED_CRITICAL_REGION_ENABLED.
  When this parameter is enabled, NRF_LOG_FLUSH is called from critical section when non deffered mode is used.
- Added implementation of mbedtls mutexes for FreeRTOS.
- Added an option to use the MA-L block (Nordic Semiconductor's f4-ce-36) to derive the EUI64 address.
- Introduced a new API for resetting the DFU progress in the settings structure ("nrf_dfu_settings_progress_reset").


****** Thread ******
The Thread examples in this SDK are built on top of the OpenThread stack: https://github.com/openthread/openthread.

For information about the certification, see the OpenThread certification page in the Thread section.

*** New features
****************
- Introduced a set of new thread-safe libraries with concurrent access to cryptographic functions for RTOS environments.

*** Changes
***********
- Thread FreeRTOS examples now by default use the mbedTLS thread-safe libraries without hardware acceleration.
- Modified nRF52840 THCI scripts to correctly detect mesh-local prefix.
- Replaced the build_gcc_libs.bat file with build_gcc_libs.py. The .bat file was present in version 2.0.0, but was missing in version 3.0.0.
- Fixed potential assertions in ble_thread_swi_mtd_coap_cli and MQTT-SN examples.
- Fixed background DFU state machine lock-up. The problem was visible when Thread IPv6 interface was turned off and then turned on in the middle of the DFU process.
- Thread Benchmark application does not autostart Thread network by default anymore.
- Thread devices now use the MA-L (OUI) block (Nordic Semiconductor's f4-ce-36) to derive the EUI64 address for commissioning purposes.
- SPI interrupt PIN for the NCP and RCP Nordic OpenThread Border Router has been changed from 25 to 21 on the Raspberry Pi side.

*** Limitations
***************
- Thread initialization must be done outside of the FreeRTOS thread, that is before the FreeRTOS thread is created.
- The Thread FreeRTOS examples with libmedcrypto-threadsafe are not delivered for Keil compiler.

*** Known issues
****************
- Nordic OpenThread Border Router occasionally fails to initialize the access point service. Currently, a reboot is required in such situations.
- Nordic OpenThread Border Router using SPI polling configuration is not stable, it is advised to use the SPI with the INT pin configured.
- To use Ethernet connection on Nordic OpenThread Border Router, the Ethernet cable must be plugged in prior to boot.
- Re-initialization of the OpenThread stack and platform can be done only for single PHY configuration. For multiprotocol configuration, the full reset of the MCU is needed.
- External commissioning example with the RCP connected to the Nordic OpenThread Border Router does not work. The current workaround is to use the NCP instead.
- In mbedTLS thread-safe variant of libraries non-reentrant heap is used for mbedTLS. Reentrant version of calloc and free should be provided using mbedtls_platform_set_calloc_free() right after a call to otInstanceInitSingle().

*** Compatible tools
********************
- nrfutil-5.1.0 (available from https://github.com/NordicSemiconductor/pc-nrfutil)
- nRF Thread Topology Monitor (nRF TTM) v0.12.0-1.alpha
- RaspPi_OT_Border_Router_Demo_v3.1.0-1.alpha.img

These tools are available from https://www.nordicsemi.com/thread#Downloads and https://www.nordicsemi.com/eng/Products/nRF-Thread-Topology-monitor#Downloads

The following OpenThread commit has been used to generate pre-built Thread stack libraries, and for testing and verification:
- https://github.com/openthread/openthread/commit/2279ef610eef80597bd789611d6931b95e08bf48

The following nRF IEEE 802.15.4 radio driver has been included in pre-built Thread stack libraries, and used for testing
and verification:
- https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver/commit/652a35c8718125ae7ef615df1155c5c412780b17

The following wpantund and Border Router commits have been used as part of the
Nordic OpenThread Border Router solution, and for testing and verification:
- https://github.com/openthread/wpantund/commit/f5de4e639b5e2a2ea65ab5da4e8264083b594650
- https://github.com/openthread/ot-br-posix/commit/a4dd306bf1ee6229c3d2bd329a243224e9d61723
- https://github.com/openthread/openthread/commit/2279ef610eef80597bd789611d6931b95e08bf48

The following wpantund and Border Router commits have been used as part of the
nRF Sniffer for 802.15.4 solution, and for testing and verification:
- https://github.com/NordicSemiconductor/nRF-Sniffer-for-802.15.4/commit/dff6c8d7170a034b09ce2ece361af77c72be4f37



****** Zigbee ******
This is a production-ready release of the Zigbee features available on the nRF52840 chip.

*** New features
****************
- Added an option to use a custom or the default MA-L block (Nordic Semiconductor's f4-ce-36) to derive the EUI64 address.
-- Note: The previous versions of SDK used an unofficial OUI. This OUI should not have been used in end products. This means that an example built with the current version of the SDK will render a device with a different EUI64 than an example built with the previous version of the SDK. In case of an OTA upgrade, this might require a factory reset and recommissioning of the device.
- Introduced Zigbee stack add-ons and moved the relevant parts of examples into add-ons.
- Added reset command to the Zigbee CLI.

*** Changes
***********
- Fixed an issue in Benchmark example related to a degradation in Keil performance. CPU utilization is higher (2x), network throughput is lower (/2).
- Fixed an issue with the OTA server not responding with Default Response if Image Block Request for non-existing image is sent. It answers with Image Block Response with status ABORT (0x95) instead.
- Fixed an issue with the OTA client not accepting upgrade image unless Stack Release version is the same as in current image.
- Fixed an issue with the NVRAM APS binding table dataset format. A device using the SDK v2.0.0 or older can now be safely upgraded to the SDK v3.1.0. For migration from the SDK v3.0.0 to the SDK v3.1.0, see the Known issues section below.
- Fixed an issue with reading GLOBAL_CLUSTER_REVISION (0xfffd) attribute on the clusters that does not have attributes list. Read Attributes Response command will contain UNSUPPORTED_ATTRIBUTE status for such type of clusters. Possible workaround: declare empty attribute list for this cluster and pass it into the cluster list declaration (instead of 0-NULL declaration):
    #define ZB_ZCL_DECLARE_EMPTY_ATTRIB_LIST(attr_list)  \ 
            ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list)  \
            ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST
- Fixed an issue with a retransmission of Query Next Image Response that would restart the DFU image download process.            

            
*** Limitations
***************
- Dynamic Memory Configuration: Binding table entries number with unique source address, endpoint, and cluster id is limited to 32.
- ZB KERNEL: Zigbee performance might be affected by heavy flash operations. Zigbee stack subsystem periodically runs migration process. As flash operations block the CPU, this may affect Zigbee time-critical processes (Association, Rejoin, Leave, GreenPower Commissioning etc.) if it occurs at the same time with such processes. The likelihood of this is low, but may occur if Parent device is joining 20+ devices one-by-one without delays, or in other cases of mass NVRAM operations in intersection with mass radio operations. This issue does not affect steady state operation.
- It is not advised to change values of parameters defined in memory configuration feature between firmwares, while performing OTA firmware upgrade.

*** Known issues
****************
- Multiprotocol: Match Descriptor Response message might not be propagated to the application layer.
- OTA DFU: In case of MCU reset between completion of OTA image transfer and postponed firmware upgrade, the upgrade will be applied immediately.
- For a device that upgrades from the SDK v3.0.0 (66th version of ZBOSS) to the SDK v3.1.0 (67th-bis version of ZBOSS), the migration may randomly fail, leading to a corrupted binding table that requires a factory reset of the device if the relation between the number of source/destination binding table entries equals:
-- for end devices: src = 37 - 2 * dst
-- for routers/coordinator: src = 73 - 2 * dst

*** Compatible tools
********************
- nrfutil-5.0.0 or newer (available from https://github.com/NordicSemiconductor/pc-nrfutil)


****** ZBOSS (Zigbee stack) ******
- Fixed NVRAM transactions in APS binding table operations.
- Added NVRAM migration for APS binding tables.
- Fixed the radio sleep state when joining a network.
- Fixed the mgmt_leave algorithm if the mgmt_leave_resp is not validated.
- Added ZB_ZDO_SIGNAL_DEVICE_UPDATE and ZB_ZDO_SIGNAL_DEVICE_AUTHORIZED signals.
- Increased buffer pool size for the minimal memory configuration.
- Set ZB_ZGP_PROXY_TBL_SIZE value to 5 to match the GPPB requirements.
- Fixed the race conditions between Leave and Link Status.

*** ZCL
*******
- Divided client and server for check_attr_value and write_attr_hook.
- Added a cluster_role parameter to zb_zcl_app_check_attr_value_cb_t.
- Added optional fields in time and on/off clusters.
- Removed legacy limitation for tunnel size in the Tunneling Cluster.
- Removed the following macros: 
-- ZB_ZCL_TIME_SET_REAL_TIME_CLOCK_CB,
-- ZB_ZCL_DECLARE_LEVEL_CONTROL_ATTRIB_LIST_EXT_WITH_OPTIONS,
-- ZB_ZCL_DECLARE_ON_OFF_ATTRIB_LIST_EXT_WITH_START_UP_ON_OFF,
-- ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_WITH_OPTIONS_FIELDS_CMD.
- Fixed On/Off cluster commands logic.
- Fixed GLOBAL_CLUSTER_VERSION reading.

*** ZCL bugfixes
****************
- Added configuring Default Reporting automatically for all attributes that support reporting,
with MinInterval equal to 5 sec, MaxInterval equal to 0 sec (no periodic reports), and Delta (analog attributes) equal to 0.
- Fixed several commands for GLOBAL_CLUSTER_REVISION attribute. Now Write Attr, Discover Supported Attr, and Configure Reporting operate correctly.
- Fixed the Diagnostic attribute LastMessageRSSI by changing its type to S8 (previously U8).
- Fixed the Thermostat attribute StartOfWeek by changing its access to R (previously RW).
- Level Control: Added support for OptionsMask and OptionsOverride.
- Level Control: Added answer with Default Response after the reception of a command received, instead of after its execution.
- Groups: Fixed the handler for Get Group Membership.
- Scenes: Added returning the application status from Recall Scene.
- Color Control: Added support for OptionsMask and OptionsOverride.
- Color Control: Added answer with Default Response after the reception of a command received, instead of after its execution.
- Color Control: Fixed Step Saturation payload, with Transition Time now at 1 byte (previously 2 bytes).
- Color Control: Fixed Move Color Temperature to limit value with ColorTempPhysicalMinMireds and ColorTempPhysicalMaxMireds.
- Color Control: Stopped the movement before the start of Step Color Temperature.
- Color Control: Fixed switching to the HueSaturation mode before starting the Color Loop.
- Color Control: Fixed Hue recalculation when switching the Color Mode from XY to HueSaturation.
- Time: Added time calculation for standard time and local time (write_attr_hook).
- Alarms: Fixed handling of Reset Alarm and Reset All Alarms.
- Alarms: Removed optional Alarms Count attribute and optional Alarams Table implementation.
- Thermostat: Fixed issues in check_attr_value for MIN_SETPOINT_DEAD_BAND, MIN_HEAT_SETPOINT_LIMIT, MAX_HEAT_SETPOINT_LIMIT, MIN_COOL_SETPOINT_LIMIT, MAX_COOL_SETPOINT_LIMIT.
- Fixed network steering attempt after reset to factory defaults.
- Fixed calling application callback for APS data before stack handling and added return status from application callback.
- Router startup: disabled legacy behavior of enabling Association Permit during startup.
- Fixed races between device_autorized signals in case when bdb_link_key_transport_with_alarm is used.
- Fixed misalignments.
- Fixed Occupancy attribute values.
- Fixed inconsitent trace in scenes cluster.
- Fixed several parts of documentation.
- Modified ZB_ASSERT() definition. Updated OSIF files.

*** ZBOSS OTA
*************
- Modified Image Block Response with ABORT to Default Response with NO_IMAGE_AVAILABLE.
- Added manufacturer code to zb_zcl_ota_upgrade_srv_query_img_param_t.
- Fixed OTA Query Jitter generation.
- Added dropping of the new block (instead of assert) if there already is a pending block.
- Added an application status verification before accepting an image.
- Fixed comparison in the macro ZB_ZCL_OTA_UPGRADE_GET_QUERY_NEXT_IMAGE_REQ.

*** ZBOSS API
*************
- Deleted the function zb_set_nvram_erase_at_reset().
- Released the function zb_af_set_data_indication() to public API.
- Added the function zb_bdb_reset_via_local_action() for the local reset to
factory defaults.
- Added functions to configure NBT threshold and timeout.
- Implemented long address resolution for binding table.

*** Other changes
*****************
- Changed the OSIF timer nomenclature.
- Set NRF_802154_CSMA_CA_WAIT_FOR_TIMESLOT by default in the radio
driver.
- Updated HA samples because of the modifications in the API.
- Updated documentation across the whole API.

*** Environment
***************
- ZBOSS trace configuration used to build debug libraries:
ZB_TRACE_LEVEL=4; ZB_TRACE_MASK=0x0858
- Tested with the radio driver v1.3.0 from the master branch
https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver,
SHA: 652a35c8718125ae7ef615df1155c5c412780b17.

Documentation feedback | Developer Zone | Subscribe | Updated