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.

Regarding MAC ACK

Other Parts Discussed in Thread: Z-STACK

Hi Friends,

I have one coordinator and 50 end device. 

All the end device sends the data to coordinator.

For the above Many to One communication,

Is the MAC ack enough to conform the successful reception of data at coordinator?

Regards,

Keerthi G.

  • It depends on how robust you want your system to be. If your ZED sends insensitivity data, it should be OK. If the message is critical, I would suggest you enable APS ack.
  • Hi Chen,

    I don't want to miss even a single data. 

    My Process:

    All end device sending the data to coordinator at periodic interval. 

    when the coordinator move away from end device, End device will know the out of coverage and store the data into memory.

    So that I thought to use APS ack to know the failed message and stored in memory .

    When the end device comes within coverage, it will be sending all the stored data.

    1. Is it works?

    2) How end device know it is not connected with coordinator or out of coverage?

    Regards,

    Keerthi G.

  • 1. Yes, it will work.
    2. You can check if zclXXX_NwkState is DEV_NWK_ORPHAN to know device is orphan or not. Orphan means ZED lost connection with its parent node
  • Hi Chen,
    Thanks chen.
    I am using SampleApp project in zstack 2.5.1.
    So I don't see the zclXXX_NwkState.
    Can you please tell me how to find the nwk status of end device in SampleApp prjt?


    Regards,
    Keerthi G.
  • In SampleApp, it is SampleApp_NwkState.
  • Hi Chen,
    1) The SampleApp_NwkState is orphan. after some time, it is DEV_NWK_DISC state. Is it correct?
    2) The End device sends the message to coordinator. Even the APS ACK returns fails, some of the message received at coordinator. How it is possible?


    Regards,
    Keerthi G.
  • 1. It is correct.
    2. It is possible that ZC receives message and send ACK but ZED doesn't receive the ACK.
  • Hi Chen,
    when I receive the APS ACK fail at end device, I will start to store the data,.
    After end device join with coordinator again, I will send all the stored data.

    As you said , If the data already sent to coordinator, but end device doesn't receive the ACK. it is chance to send the already sent message(repeated msg).
    How can i avoid that?


    Regards,
    Keerthi G.
  • If ZED doesn't receive APS ACK, it should send message again. There is sequence number in AF_DataRequest and your application on ZC can filter message with sequence number.
  • Hi Chen,

    1) Is the sequence number received using  this ( pkt->cmd.TransSeqNumber ) ?

    If so, I don't get correct value it is always zero at coordinator, 

    But at end device, I can print the incremental seq number(0, 1, 2, 3 etc). 

    2) Is the sequence number comes one by one at coordinator like 12, 13, 14 etc or it may be like 12 , 14, 13 , 16, 17, 15 etc?

    (This is many to one communication , All end device sends the data to coordinator.)

    3) Is it possible sequence number 12, 14 received by coordinator but not 13?

    4) I have enabled the POWER_SAVING in end device. After sending data, 

    Is it end device enter into sleep or waiting for ACK?

    5) In End device code:

    Is there anyway to check whether the end device connect or not with coordinator before sending the data each time?

    Regards,

    Keerthi G.

  • 1. Yes.
    2&3. It is the sequence that you send from device so it might not be like that.
    4. When you send message with APS ack, sleeping device will wake up shortly to receive ack.
    5. You can use SampleApp_NwkState.
  • 1) You replied to previous post like below.

    If ZED doesn't receive APS ACK, it should send message again. There is sequence number in AF_DataRequest and your application on ZC can filter message with sequence number.

    The sequence number is only identify by device which send the data. Then how ZC know about that to filter the message?

    2) The end device is in sleep. Poll rate is 60 seconds. The data is sent from end device to coordinator periodically. 

    I have switched off the coordinator. End device still has the nwk_status is DEV_END_DEVICE and send the message to coordinator.

    After sending single data, it changes the nwk_status to DEV_NWK_DISC.

    Why end device doesn't know coordinator is no longer present before sending the message? and

    How do the end device know about coordinator absence before sending the message?

    Regards,

    Keerthi G

  • 1. The application on ZC should keep records of this and take care of it.
    2. When ZED asks for response, it will send polling according to RESPONSE_POLL_RATE not POLL_RATE.
  • Hi Chen,
    1) Is it comes along with zstack or it is write by user?
    If it comes along with zstack, where is the code?

    2) So The end device will know the absence of coordinator after send the message only.
    Is it correct?

    Regards,
    Keerthi G.
  • 1. No, it doesn't come with Z-Stack. You have to do it by yourself.
    2. No, ZED would know it lost connection with its parent node when poling fails too.
  • Hi Chen,
    1) The sequence number at coordinator is always zero. Then how can i filter the message?
    Can You please guide me to do this process?

    2) Ok . It is tries maximum of -DMAX_POLL_FAILURE_RETRIES in f8wConfig.cfg.
    correct?


    Regards,
    Keerthi G.
  • 1. You can use Ubiqua Packet Analyzer to check it first.
    2. Yes.
  • I don't have any packet analyzer tool right now.
    Is there any other way to do these things?

    Regards,
    Keerthi G.