This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2538: Using ZCL_CLUSTER_ID_GEN_TIME to learn current real time from Coordinator

Part Number: CC2538
Other Parts Discussed in Thread: Z-STACK

Hi All. How would an end device query the coordinator for the current real time? Can ZCL_CLUSTER_ID_GEN_TIME be used for that? How?

  • Hi Ra No,

    You should be able to use the ZCL_CLUSTER_ID_GEN_TIME cluster, ATTRID_TIME_TIME attribute, and ZCL_DATATYPE_UTC datatype to communicate the real time clock value.  You can read more from the ZCL 7 Specification's chapter on the topic, however TI does not provide any out-of-box example usage in Z-Stack so you will need to modify the existing example applications for your purposes.

    Regards,
    Ryan

  • Thanks, Ryan. But is there any standard way to request for such information from another device?

    Also, my coordinator does not seem to expose this cluster. Should I expect it to, or genTime is not one of the clusters coordinators normally expose?

    In general what's the practice here? If several end devices in the network need to synchronize real time with a single device (preferably the coordinator), what scenario should they follow?

  • There is no standard method, method, or scenario given by TI or defined in the ZCL Specification.  ZCL_CLUSTER_ID_GEN_TIME/ATTRID_TIME_TIME is defined in zcl.h/zclgeneral.h, respectively and thus should be available to any ZCL application. However you will need to add the cluster/attribute to your attribute record since they are not provided by default.  Then you will need to manually call zcl_SendRead and evaluate the zcl*_ProcessInReadRspCmd accordingly.  

    Regards,
    Ryan