Messages shorter than 256 octets may use the 1-octet format

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Trivial
    • wd04
    • Affects Version/s: MQTT-SN-1.2
    • Component/s: MQTT-SN
    • None
    • Hide

      In section 5.2.1, change

      "smaller than 256 octets"

      to

      "up to and including 255 octets"

       

      rather than "may use the shorter 1-octet format", it should be "MUST use the shorter 1-octet format"

       

      Show
      In section 5.2.1, change "smaller than 256 octets" to "up to and including 255 octets"   rather than "may use the shorter 1-octet format", it should be "MUST use the shorter 1-octet format"  

      5.2.1 Length

      Via Tomoaki Yamaguchi.

      The Length field is either 1- or 3-octet long and specifies the total number of octets contained in the message (including the Length field itself).
      If the first octet of the Length field is coded “0x01” then the Length field is 3-octet long; in this case, the two following octets specify the total number of octets of the message (most-significant octet first). Otherwise, the Length field is only 1-octet long and specifies itself the total number of octets contained in the message.
      The 3-octet format allows the encoding of message lengths up to 65535 octets. Messages with lengths smaller than 256 octets may use the shorter 1-octet format. 5.2.1 Length
      The Length field is either 1- or 3-octet long and specifies the total number of octets contained in the message (including the Length field itself).
      If the first octet of the Length field is coded “0x01” then the Length field is 3-octet long; in this case, the two following octets specify the total number of octets of the message (most-significant octet first). Otherwise, the Length field is only 1-octet long and specifies itself the total number of octets contained in the message.
      The 3-octet format allows the encoding of message lengths up to 65535 octets. Messages with lengths smaller than 256 octets may use the shorter 1-octet format. 256 should be changed to 255.    255 + 1 = 256 but the hex value of 256 is 2 octet.   254 + 1 = 255 = 0xff.    255 + 3 = 258 = 0x0102

       

            Assignee:
            ian.craggs
            Reporter:
            ian.craggs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: