Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK
What is the purpose and difference between longPollInterval and shortPollInterval configuration in gateway_config.tlg file present in Z-Stack Linux Gateway?
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.
Thank you again YK Chen. From the specification I understand that ZED implements Poll Control Cluster Server and ZC implements Poll Control Client. But as shown in the sequence diagram below (from ZCL specification) ZED must send Check In command to ZC and it does it at an configured interval. Is the command sending from ZED to ZC done automatically by Z-Stack or the application must implement a timer routine to send this command?
Ok. Application layer must then implement a time routine to send check in commands to ZC periodically right? If so what must be the timeout value to use? Also the specification has some default attribute values for long and short poll interval what is the significance of this?
Yes, you have to create a periodic timer event to send check-in command to ZC. 3.16.4.2 Attribute Settings and Battery Life Considerations in ZCL spec already elaborate the significance of those default attribute values for long and short poll interval.
I read the commissioning process given in ZCL specification. I have the following questions. Apologies, if I'm asking the same questions again.
1. Long Poll Interval: The amount of time between MAC Data Requests when the device is in its normal op- erating state and not expecting any messages - ZED uses this interval to send data request after it receives a check-in response with start fast polling set to false?
2. Short Poll Interval: The amount of time between MAC Data Requests when the device is either expectingdata or has been put into “Fast Poll Mode” by the controlling device - ZED uses this interval to send data request after it receives a check-in response with start fast polling set to true?
3. Fast Poll Timeout -Time duration in which the ZED will remain in FastPoll mode where it sends data request using Short Poll Interval?
Hi YK Chen,
Please find the attached sniffer log file.
Poll Control - Irregular Data Request.cubx.zip
As per the specification I have set the POLL_RATE value in f8wConfig.cfg to a non zero number. My ZED and ZC are properly binded for Poll Control Cluster. I have set my Check-in interval as 180secs, Long Poll interval value to 30secs, and Short Poll interval as 5 seconds. If you see the log my check-in command are sent to ZC every 180 secs. But the Data Request are not sent to ZC in the configured interval.
After I send the checkin command I change the poll rate to my short interval value which 5 seconds. But I don't see this reflected in the log. What I observe is that data request is sent to ZC after check in command is sum of Long interval and short interval (35 secs).
Hi YK Chen,
As I mentioned earlier I'm trying some negative test cases to test my application core logic. Today I found that without a bind request from ZC to ZED for poll control cluster the ZC was able to respond to a ZED checkin command. Attached the sniffer log for your reference.
Thank you YK Chen. When you say "use short address mode when your application knows destination"? what do you mean?
In my ZED code I have the following code to send a checkin command to ZC. First I check for an binding entry then I verify if an valid bind is available for ZCL_CLUSTER_ID_GEN_POLL_CONTROL? If both the condition are true I then send the checkin command.
Please correct me with the addressing used in the below code.
zAddr = (zAddrType_t *)osal_mem_alloc(sizeof(zAddrType_t));
if (NULL != zAddr)
{
zAddr->addr.shortAddr = 0x0000; // ZC address
zAddr->addrMode = Addr16Bit;
// Find if a bind is existing with ZC
bindEntry = bindFindExisting(SAMPLETEMPERATURESENSOR_ENDPOINT, zAddr, SAMPLETEMPERATURESENSOR_ENDPOINT);
if (NULL != bindEntry)
{
// Find if the Poll Cluster is binded with ZC
if (bindIsClusterIDinList(bindEntry, ZCL_CLUSTER_ID_GEN_POLL_CONTROL))
{
afAddr = (afAddrType_t *)osal_mem_alloc(sizeof(afAddrType_t));
if (NULL != afAddr)
{
afAddr->addr.shortAddr = 0x0000; // ZC address
afAddr->addrMode = afAddr16Bit;
afAddr->endPoint = SAMPLETEMPERATURESENSOR_ENDPOINT;
// Send Check-in command
zclPollControl_Send_CheckIn(SAMPLETEMPERATURESENSOR_ENDPOINT, afAddr, 1, bdb_getZCLFrameCounter());
osal_mem_free(afAddr);
}
}
}
osal_mem_free(zAddr);
}
Hi YK Chen,
I found a strange behaviour. When ZC doesn't do any binding an when I use dstAddr.addr.shortAddr = 0x0000; and dstAddr.addrMode = afAddr16Bit; ZED sends a check in command to ZC. But when I use dstAddr.addr.shortAddr = 0; and dstAddr.addrMode = afAddrNotPresent; I don't see any checkin command sent to ZC. What is the difference between the two condition?