Hello everyone.
I am currently making some libraries to communicate to an Xbee S2 (using zigbee API function set) by a microcontroller (Atmel AVR 8 bit to be specific).
The length of any API frame is the second and third bytes in the frame.
I am trying to calculate the maximum length for any given frame send or received but this seems rather difficult.
Also from everything I understand rom the manuals, there is no way I can exceed 256 bytes in a frame so I will never have a length more than one byte (I can understand why there are two bytes in the API e.g. compatibility, future version etc)
In my code I define character arrays for the packet to be sent to the xbee and another one for the reply. Since memory in a microcontroller is something limited and ussually small I cannot declare something many times bigger that what I will need.
I have concluded that an array of 100 elements will always be enough for transmission or reception of any API frame.
Does this stand true??
Thanx