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.

Coordinator not sending message with status=ZSuccess

Other Parts Discussed in Thread: CC2531

Hello everyone,

i'm running a simple application where a ZED connects to the Coordinator and they periodically send each other a message using AF_DataRequest. The coordinator is plugged in my pc and notifies via usb every time some RF activity happens. A part of the code of the coordinator is the above:

if(AF_DataRequest( &newDevAddr, &ZCube_epDesc, TEST_CLUSTERID, 21, buff,
&ZCube_TransID, AF_DISCV_ROUTE, AF_DEFAULT_RADIUS)==ZSuccess)
{
//send ok message to the pc
}
else
{
//send error message to the pc
}

the problem is that on the pc i keep reiceving the Ok message even if sometimes the message is not sent at all by the coordinator! (i can see it by the fact that on the sniffer i see nothing coming out and the End Device never replies to the message). I can see that the ED is correctly included in the net because i see the Data Request on the sniffer and because it correctly sends his periodic message to the Coordinator. 

So to me it looks like that even if the AF_DataRequest doesn't work, it returns ZSuccess...this happens maybe five or six times straight, than it goes back to work normally, than after some time (maybe even a day) it goes back to missing some message, etc...so it's a problem that gets fixed by itself after a while, but then sooner or later comes back...

i'm using 2007 ZigBee Pro Stack, IAR 8051 8.10 and CC2531 as both Coordinator and End Device

any suggestions?

regards

Claudio

  • Hi Claudio,

    AF_DataRequest() return code does not tell whether sending the packet succeeded or not. The result of the actual packet transmission is returned by afDataConfirm(), which will trigger the event AF_DATA_CONFIRM_CMD

    Best regards,

    OD

  • Hi OD,

    thanks for the answer. I will try to ceck the AF_DATA_CONFIRM_CMD event then. Do i have to somehow register my TaskID to be able to hadle that event? (for example like i do for the AF_INCOMING_MSG_CMD using afRegister)? And then what is the meaning of the return code of AF_DataRequest?

    do you have any idea about the reason of this behaviour? I kept the application running this weekend and there were some missing messages in the first hours, then all went on correctly for the whole three days...

    best regards

    Claudio

  • To use AF_DATA_CONFIRM_CMD, you don't have to do registration on you application code.

  • Hi Yikai, thanks for your answer. Do you have any idea about why the Coordinator is "skipping" some messages?

    regards

    Claudio

  • I suggest you using Ubiqua Packet Analyzer to check this issue?

  • i'm using te Smart RF Packet Sniffer and Wireshark, but from the sniffer i can't see nothing wrong: the ED sends the Data request to the coordinator and the coordinator sends the Liks Status broadcast, and they both work fine all the time. When the coordinator doesn't send his message to the ED, on the sniffer i just don't see the message come out (and that's why i think it's a problem of the coordinator and not of the ED), but the data request and the Link Status keep going on normally

    I forgot to say that i can trigger the Coordinator to send a different message to the ED beside the periodical one, and this one works all the time, even when the periodical one is not working...

  • How fast do you send periodic message?

  • every device sends his own periodic message every 5 minutes but they are 2 minutes and 30 seconds out of sync, so that every 2 minutes and 30 seconds you see one of the two messages being sent. And the Data Request of the ED is every 30 seconds

  • Do you set the device polling rate to 30 seconds? If so, try to reduce polling rate to 5 seconds and test again.