3 Replies Latest reply on Jun 29, 2017 11:24 PM by andreas.boehler_2378171

    EZ-Serial: Packet Fragmentation

    andreas.boehler_2378171

      Hi,

         

      I'm investigating the throughput on EZ-Serial. I would like to be able to send, for example, 16 bytes and force the module to send it immediately (as far as I know, the maximum is 20 bytes for the characteristic). Can this be done over the UART connection?

         

      Thanks,

         

      Andreas

        • 1. Re: EZ-Serial: Packet Fragmentation
          e.pratt_1639216

          Since the UART connection is asynchronous, as long as it doesn't have data in its buffer, you should be able to send data "immediately"

          • 2. Re: EZ-Serial: Packet Fragmentation
            jrow

            Hi Andreas,

               

            The current v1.0 firmware release does not provide any mechanism for specifically packetizing data sent over the CYSPP connection, but this feature is included in the new v1.1 update currently intended for mid-July release. With this new feature, you can configure a fixed packet size (e.g. 16 bytes) so that EZ-Serial will simply wait until that many bytes are in the buffer and then send exactly that many in a single transmission.

               

            All packetization modes in v1.1 are:

               
                  
            • Immediate mode, where data is sent immediately as soon as any is detected (current default in v1.0)
            •     
            • Anticipate mode, which waits a few milliseconds for a full buffer to avoid the current behavior of initial transmissions usually being 1 or 2 bytes (new default in v1.1)
            •     
            • Fixed mode, where fixed-size packets are transmitted only once the correct number of bytes are available (this is what you wanted)
            •     
            • Variable mode, where each transmission is preceded by the number of bytes to wait for in that packet before sending
            •     
            • End-of-packet (EOP) mode, where transmissions occur only when a specific character is encountered in the data stream, or the buffer is completely full (makes it easier to use e.g. "\r" or "\n" CR/LF bytes to trigger transmissions)
            •    
               

            Note that if you are simply testing throughput, the current "immediate" behavior in v1.0 has a negligible impact if you are sending a constant data stream into the module over UART. Only the first packet will be less than full, since after that the buffer should always (or at least usually) have enough data to fill the next packet.

               

            Jeff

            • 3. Re: EZ-Serial: Packet Fragmentation
              andreas.boehler_2378171

              This is exactly what I was looking for, given the fact that I am transferring packets of fixed size. I'm looking forward to the new release then!

                 

              Thanks,

                 

              Andreas