Fragmented data transfers
The send ‘with acknowledgment’ functions (ZPS_eAplAfUnicastAckDataReq(), ZPS_eAplAfUnicastIeeeAckDataReq(), and ZPS_eAplAfBoundAckDataReq()) allow a large data packet to be sent that may be fragmented into multiple messages/ frames during transmission. As a general rule, one of these two functions should be used when sending a data packet with a payload size greater than 80 bytes. It is important to note, however, that the use of APS security will reduce this limit, as payload bytes are taken up by security data.
The processes of fragmentation at the sender and de-fragmentation at the receiver are transparent to the applications at the two ends, but the points described in the sub-sections below should be noted.
Note:
Fragmentation is described further in Fragmented data transmission to sleeping End Device: in connection with fragmented data transfers to sleeping End Devices.
The ZigBee network parameters referenced in this section are configured using the ZPS Configuration Editor and are described in Chapter 13, “ZigBee Network Parameters”. When setting up the APDUs to handle Rx fragmentation, care must be taken to ensure that the configuration setting in the ZPS Configuration Editor is sized to be able to handle 3* Tx Fragments.
Enabling/disabling fragmentation
In order to allow fragmented data transfers between two nodes, you must appropriately configure two ZigBee network parameters:
Set the parameter Maximum Number of Transmitted Simultaneous Fragmented Messagesto a non-zero value on the sending node, to allow transmitted messages to be fragmented.
Set the parameter Maximum Number of Received Simultaneous Fragmented Messagesto a non-zero value on the receiving node, to allow received fragmented messages to be re-assembled.
Note: Setting either of these parameters to zero would disable the corresponding fragmentation feature but reduce the size of your compiled application code.
Parent topic:Fragmented data transfers
Configuring acknowledgments
You can configure how acknowledgments are generated during a fragmented data transfer by setting the ZigBee network parameter APS Max Window Size. This parameter must be set to the same value on the source and destination nodes. The parameter determines the number of fragments to be transferred before an acknowledgment is generated. For example, if a data packet is divided into 6 fragments and this parameter is set to 3, an acknowledgment will be generated after the third fragment and after the sixth fragment.
Note: Setting this parameter to a low value results in a high level of network traffic, since a large number of acknowledgment packets are sent.
The acknowledgment for a group of fragments contains an indication of any missing fragments from the group, thus requesting the missing fragment(s) to be re-sent.
Parent topic:Fragmented data transfers
Acknowledgment timeout
A timeout of approximately 1600 ms is applied to each acknowledgment, measured from the time at which the last data fragment in the relevant group was transmitted - if no acknowledgment is received within this timeout period, the entire group of fragments is automatically re-sent. Up to 3 more re-tries can subsequently be performed. For a fragmented data transfer, the time that elapses before a completely unacknowledged transmission is abandoned is difficult to estimate, since this time depends on the number of fragments, the network parameter APS Max Window Sizeand the network parameter APS Inter-frame Delay(time between transmissions of consecutive fragments).
Parent topic:Fragmented data transfers
Parent topic:Appendix B: Application design notes