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.

Question on Fragmentation 1/1 and Fragmentation 1/N

Other Parts Discussed in Thread: CC2530, Z-STACK

Hi

Now, I am using SmartRF05EB Rev 1.8.1 + CC2530 + ZigBee Stack 2.5.1a to run my wireless serial replacement application. This application was modified from GenericApp.c and SerialApp.c and it work perfectly. In addition, my router module (TI) can receive 2-7 fragment packets from a coordinator (Ti or any vendor with same Profile ID), defrag it and completely send to a serial port.

Next, I got ZigBee coordinator from the vender "S" and it sent the single packets (20-40 bytes) and also set it be the fragmented packets. The peryton sniffs this single packet and shows "Fragment 1/1". Finally, my router send the "Ack" packet but there is no data from terminal ???

If this coordinator sent the actually fragment packets for example Fragment 1/3 (Block 3), 2/3 (Block 2) and 3/3 (Block 1) then my router receive the complete defragment data on a serial port.

In brief,

- Coordinator "S" send 1-19 Bytes (Single Packet & with out Extended Header) => Router "TI" can receive a data on serial port

- Coordinator "S" send 20-40 Bytes (Single Packet & Fragment 1/1) => Router "TI" can not receive a data on serial port

- Coordinator "S" send 41+ Bytes (Multiple Packet & Fragment 1/N) => Router "TI" can receive a data on serial port

I have thought this problem corresponding to TI ZigBee's Stack. Can anyone help me solve this problem ?

Thank in advance.

  • What is the interval between packet1 and packet2? Is it possible that ZC sends packets too fast so it can't be output to serial in time.

  • Nice to meet you YiKai Chen !!! I have been reading your post in this forum for 2 years. You are so kind ~

    The interval is too long because i sent 25 bytes and stop everything for debug on packet sniffer (perytons). The sniffer shows the packet was sent with extended header = 1 (frag 1/1) and the router send "ACK". However, there is nothing on serial port.

    Five minutes later, i send 41 bytes and the sniffer shows i was sent 2 fragmentation packets which were 40 bytes (frag 1/2) and 1 bytes (frag 2/2), respectively. Both packets had extended header = 1.

    If I use TI coordinator sent 25 bytes then there was only 1 packet sent without extended header. 

    I think the problem is Frag 1/1 and it is bug on stack.

    ps. nothing active on application layer

  • Hi SSAPAPRET,

    You are welcome. I had found that there is bug of fragmentation in ZStack-CC2530-2.3.1-1.4.0, ZStack-CC2530-2.5.0,and ZStack-CC2530-2.5.1a. Please refer to my post at http://e2e.ti.com/support/wireless_connectivity/f/158/p/275820/963328.aspx#963328. If I am not wrong, Z-Stack would collect all fragment packets together and output to AF layer at one time. Do you expect to receive separated fragment packet one by one?

  • Thank you YiKai Chen, I have read your post and I think we have the same problem.

    I expect to receive separated fragment packet one by one. In case of use ZStack-CC2530-2.5.1a, Could you please recommend me ?

  • As I answer you in previous post, Z-Stack would collect fragment messages in on AF packet and output to application. It means you can't get frament message to output one by one. Would you tell me why you have to enable fragment? In my experience, it would slow down transmitting performance when enable fragment.

  • I have to enable fragment because our message is too large too send for example 300+ bytes.

    The problem is my router got hang !!! when coordinator send 1 packet with extended header. As you describe above, Z-Stack collected fragment messages in AF packet and send to the application layer. I think the extended header of 1 packet make Z-Stack busy and send nothing to the application layer.

    [See Attach file]

    extended header = extended frame control + block number + ack

    extended frame control :

    00 = Not fragmented

    01 = first fragment, block 1 is 1 of fragments <= Busy ?

    10 = other fragments, block # is fragment #

    11 = reserve

    In this case, I can't get any message in application layer. How to access the APS layer for collect data ? or how to get fragment message 1 by 1 in application layer (reassemble message in application layer) ?.

    thank you

  • I would suggest you not using fragment. You can separate you messages into several small packets and enum them with serial number. Then, you send these packets one by one by AF _DataReq without fragment enable. In this way, you can receive packets one by one and output to your application without problem.