Z-Stack 3.4.0 to Z-Stack 3.5.0

This section will describe a way to migrate a project from Z-Stack 3.4.0 to a Z-Stack 3.5.0 project.

For this guide, zc_light_sink from Z-Stack 3.4.0 will be ported over to Z-Stack 3.5.0. The two releases have minor differences mostly pertaining to:

  • Inclusion of the Common User Interface

  • Improved NV driver

The recommended approach is to start with a Z-Stack 3.5.0 project that contains the same base application as the porting target project and merge any custom functionality.

Note

Although no Migration Guide was provided for Z-Stack 3.3.0 to Z-Stack 3.4.0, the only pertinent application changes are the addition of POWER_TEST cases (see Example Application Power Test Definitions) and using OsalPort_memcpy in place of memcpy.

  1. Choose a Z-Stack 3.5.0 example project that contains your target project’s base functionality. For reference and use in this example, zc_light_sink from C:\ti\simplelink_cc13xx_cc26xx_sdk_x_xx_xx_xx\examples\rtos\CC13xx or CC26xx_LAUNCHXL\zstack is chosen as a starting point.

  2. No changes are required for the Z-Stack 3.5.0 zcl_samplelight_data.c file unless clusters, attributes, or simple descriptors were added or altered in the Z-Stack 3.4.0 project.

  3. Small changes to zcl_samplelight.h include application event changes and additional UI function definitions:

    #include "cui.h"
    ...
    // Application Events
        #define SAMPLELIGHT_POLL_CONTROL_TIMEOUT_EVT  0x0001
        #define SAMPLELIGHT_LEVEL_CTRL_EVT            0x0002
        #define SAMPLEAPP_END_DEVICE_REJOIN_EVT       0x0004
        #define SAMPLEAPP_DISCOVERY_TIMEOUT_EVT       0x0008
        #define SAMPLEAPP_PROV_CONNECT_EVT            0x0080
        #define SAMPLEAPP_PROV_DISCONNECT_EVT         0x0010
        #define SAMPLEAPP_POLICY_UPDATE_EVT           0x0020
        #define SAMPLEAPP_SYNC_ATTR_EVT               0x0040
    ...
        /*
         *  Function to toggle the light
         */
        extern void zclSampleLight_UiActionToggleLight(const int32_t _itemEntry);
    
        /*
         *  Function to discover switch devices to report state of the light
         */
        extern void zclSampleLight_UiActionSwitchDiscovery(const int32_t _itemEntry);
    
        #ifdef USE_ZCL_SAMPLEAPP_UI
        #if defined (ENABLE_GREENPOWER_COMBO_BASIC)
        void zclSampleLight_setGPSinkCommissioningMode(const int32_t _itemEntry);
        #endif
        #endif
    

The following items specifically concern zcl_samplelight.c:

  1. Common User Interface operation (identifiable by #ifdef USE_ZCL_SAMPLEAPP_UI and involving the new functions defined in zcl_samplelight.h) has replaced previous UI processes (including keys, LEDs, and UART).

  2. Addition of the Discovery clock, including extra functions and event handling.

  3. *_bdbGetZCLFrameCounter* is replaced with *_getZCLFrameCounter*.

  4. New Match Descriptor Response and IEEE Address Response callbacks used for manual binds.

  5. zclSampleLight_dmmPausePolicyCb has been added for DMM_OAD.

  6. Updated parameter for zclSampleLight_setGPSinkCommissioningMode.

  7. If performing a field upgrade in which the NV memory is retained then ZSTACK_NVOCMP_MIGRATION must be defined in the upgrade image to properly maintain NV item IDs while migrating from the old NVOCTP driver. If not using default NV item IDs from Z-Stack 3.4.0 then users must ensure that their legacy items are updated appropriately for Z-Stack 3.5.0, please refer to zgUpgradeNVDriver inside of zglobals.c to accomplish this.

  8. Add any other Z-Stack 3.4.0 application changes to the Z-Stack 3.5.0 file if not pertaining to the items listed above.

Note

Difference comparison software is recommended for discerning all differences between software stacks.