need to send long information of around 129-byte long ZCL attribute through zigbee frame fragmentation

We need to send an encrypted message from the cloud to our ZED, which is 128 bytes, but if we cannot send it as a whole, we need to cut it to many pieces and make the application layer more complicated.  We want to define zigbee cluster on ZC and ZED with octave string of length that can hold more than 128 bytes, and then use 'write attribute' ZCL command to do the communication between the ZED and ZC.  Thus we really would like to be able to send/receive (128 bytes + 1 extra bytes indicating the length of the ZCL attribute) at once, we would like to let the zboss stack to handle the fragmentation for us, most likely through automatic fragmentation, instead of doing fragmentation at application layer program by ourselves.

 

  • Hello,

    So you intend to do the encryption/decryption yourself in addition to the Zigbee network's encryption? 

    From the top of my head, I am not sure. Did you try to set up a cluster with octave strings? What do you see as the limitation (with regards to length?)

    Best regards,

    Edvin

  • Yes, we have to add our own encryption.  But anyway, to be able to send, the octave string max length is 48 bytes. 

  • Hello,

    Looks like the maximum length will not fit 129 bytes. One guy in our Zigbee team quoted this:

    Any message that needs truncation shall truncate on a UTF-8 character boundry. The SE secure payload is 59 bytes for the Message field in a non-fragmented, non-secure routed Display Message packet (11 bytes for the other Display Message fields). Devices using fragmentation can send a message larger than this. Reserving bytes for source route will reduce this. InterPAN message payload for the "message" is 98 bytes. 

    So it looks like without fragmentation the Message field length is limited to 59 bytes (58 for the message itself). If you want to send longer messages, you need to use APS fragmentation.

    Best regards,

    Edvin

  • So we will not able to get automatic fragmentation on the ZCL level, instead, we need to let our application code call APS functions and send fragment frames, and then let application code at the receiver node to assemble them? 

  • There is something called APS_FRAGMENTATION, but I have not used it. I think you can use it to fragment and reassemble messages "automatically". They will obviously still be split up, but it will probably look like one packet from the application's point of view.

    I believe this is set up where you set up the cluster that handles the message. You say that the string length is 48 bytes. Where do you see that? Did you try sending longer packets and failed, or do you see any limitations somewhere? 

    Best regards,

    Edvin

Related