Updating JN-AN-1229 for compatibility with the SDK Version JN-SW-4170v1745 and JN-SW-4270v1746

Document created by Mario Ignacio Castaneda Lopez Employee on Jan 23, 2018Last modified by Mario Ignacio Castaneda Lopez Employee on Feb 14, 2018
Version 2Show Document
  • View in full screen mode

This Document describes the additional changes needed for JN-AN-1229 ZigBee PRO Application Template for ZigBee version 1002 to be able to compile correctly with the latest update SDK JN-SW-4170 Version 1745 and JN-SW-4270 Version 1746.

Note:  These modifications can be also found in the JN516x ZigBee 3.0 SDK Release Notes v1745 (Chapter 4.3 Modifications Required)

Tool modifications

The .zpscfg file contains all the information available of the setup of the ZigBee network, this file it’s located in C:\...\...\workspace\ JN-AN-1229\Common

The first step is to add the MAC Interface List to The ZigBee devices (Co-ordinator, Router, and Sleeping End Device) in the .zpscfg file.

Then, add the MAC Interface selecting the New Child option.

In the Properties tab, the Co-ordinator and the Router should have the Router Allowed option set to True.

Stack modifications

The new stack has support for better throughput and automatic buffering of data packets during route discovery. This requires the addition of a new queue in the application.

Open the app_common.h file which it’s located in the Common folder.

  • This queue should be tied to the stack definition:

extern PUBLIC tszQueue zps_msgMcpsDcfm;

After that, open the app_router.c and app_sleeping_enddevice.c.

  • The ZPS_tsAplAib structure has been changed, so, the vStartup function should be modified
  • Old version

/* Set channel to scan and start stack */

ZPS_psAplAibGetAib()->apsChannelMask = 1 << u8Channel;

  • Update needed

/* Set channel to scan and start stack */

ZPS_psAplAibGetAib()->pau32ApsChannelMask[0] = 1 << u8Channel;

Add the next code to the app_start.c(Coordinator and Router) and app_start_SED.c(Sleeping End Device)

  • The buffer of the Router device should be modified. The size of the queue is defined as:


  • The storage of the queue must be defined:


  • In the APP_vInitResources function an additional queue must be added:

ZQ_vQueueCreate(&zps_msgMcpsDcfm, MCPS_DCFM_QUEUE_SIZE,  sizeof(MAC_tsMcpsVsCfmData),(uint8*)asMacMcpsDcfm);