JN5179 ZigBee 3.0 Time Cluster

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

JN5179 ZigBee 3.0 Time Cluster

823 Views
jurijhuebner
Contributor I

Hello,

I want to use the time cluster as client for a zigbee enddevice with HA Profile (0x0104). Therefore I configured the zcl_options.h as follwed:

#define CLD_TIME

#define TIME_CLIENT

I configure the time master on a coordiantor with a real time clock. 

At the next step I start my application as an enddevice with JN5179 on a different device. 

I join the network, bind the enddevice time cluster. 

After the enddevice was binding I send a eZCL_SendReadAttributesRequest to coordiantor and receive the correct utc.

After sending message I get   E_ZCL_SUCCESS == eStatus. So everthing have to be alright, otherwise I wouldn't receive the utc.

But if I read u32ZCL_GetUTCTime(), it is still different!

Is it not possible to run the received utc in the backround?

ZigBee Cluster Library 3.0 ( part of documentation page 395)

The application can remotely read the Time cluster attributes from the time-master by calling the function
eZCL_SendReadAttributesRequest(), which will result in a ‘read attributes’
response containing the Time cluster data. On receiving this response, a ‘data
indication’ stack event is generated on the local device, which causes a ZCL user task
to be activated. The event is initially handled by this task as described in Section 3.2,
resulting in an E_ZCL_ZIGBEE_EVENT event being passed to the ZCL via the
function vZCL_EventHandler(). Provided that the event contains a message
incorporating a ‘read attributes’ response, the ZCL:
1. automatically sets the utctTime field of the tsCLD_Time structure to the
value of the same attribute in the ‘read attributes’ response (and also sets
other Time cluster attributes, if requested)

Regards

Tags (2)
0 Kudos
3 Replies

525 Views
jurijhuebner
Contributor I

Example: If init on power cycle this function   vZCL_SetUTCTime(0); and read UTCTime on every wakeup with this funtion u32ZCL_GetUTCTime() I can see that it count only to the value 4. On every futher wakeup I see the same value. 

It seems that it only counts on power cycle and after wake up this function does not work.

Regards,

Jurij

0 Kudos

525 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Jurij,

Just to confirm what is the AN that you are using?

utctTime is a mandatory 32-bit attribute which holds the current time (UTC). This attribute can only be over-written using a remote ‘write attributes’ request if the local Time cluster is not configured as the time-master for the network - this is the case if bit 0 of the element u8TimeStatus

18.5.1 Initialising and Maintaining Master Time

The application must also set (to ‘1’) the ‘Master’ bit of the u8TimeStatus attribute of the tsCLD_Time structure, to indicate that this device is the time-master and that the time has been set.

Hope it helps and Please let me know your findings.

Best Regards,

Mario

0 Kudos

525 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Jurij,

But if I read u32ZCL_GetUTCTime(), it is still different!

What are the utc values that you are getting?

Could you please take a screen with the utc values with a sniifer?

On all other devices, it is the responsibility of the local application to synchronise this time with the time-master.

Best Regards,

Mario

 

0 Kudos