When a Digi radio is being used in transparent (AT) mode, packet size is not a major concern because the data packets will be fragmented as needed. When transmitting data using API frames, it is important not to exceed the allowable payload size or the packet will not be sent and an error generated.
Maximum payload size varies depending on radio type, firmware load, and what parameters are set on the radio. In order to determine what the payload size is, the NP parameter can be queried. NP will indicate the maximum payload size (as a hexadecimal value,) based on the parameters that are currently set on the radio.
If you are using a ZigBee enabled XBee, the NP parameter on the Coordinator or an End device will always return 0xFF. This is because the ZigBee protocol used on the XBee ZB modules supports fragmentation. Regardless of what settings are being used on the Coordinator or End device, you can put a 255 byte payload into the transmission API frame and it will break the data transmission into multiple RF packets. If you want to avoid fragmentation, the payload size without encryption will be 84 bytes, 66 bytes if encryption is enabled (EE parameter), and 92 bytes if the transmission is a broadcast. Broadcast transmissions do not use encryption.
The NP parameter is not available for the following radios and their payload sizes are included here as a reference:
Note: This only applies to the point-to-multipoint (non-DigiMesh) and Zigbee enabled firmware's.
|802.15.4 (Series 1) XBee||100 Bytes|
|XTC (Xtend Compatible)||2048 Bytes|
Last updated: Aug 23, 2017