This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE mesh SeqAuth

In the Lower transport layer, segmentation will be carried out. The concept of a place is not very clear. Can you help me?

SeqAuth = IV Index + first segment SEQ = 56bit, SeqZero is the least significant 13bits of the SeqAuth.

When SEQ = 0x647262 is received, IV Index = 0x58437AF2, SeqZero = 0x1849

Why SeqAuth = 0x58437AF2645849, how is this calculated?

  • sorry for the late reply,

    Isn't this the function that calculates the sequence number. 

    static uint32_t seqauth_sequence_number_get(uint32_t seqnum, uint16_t seqzero)
    {
        if ((seqnum & TRANSPORT_SAR_SEQZERO_MASK) < seqzero)
        {
            return ((seqnum - ((seqnum & TRANSPORT_SAR_SEQZERO_MASK) - seqzero) - (TRANSPORT_SAR_SEQZERO_MASK + 1)));
        }
        else
        {
            return ((seqnum - ((seqnum & TRANSPORT_SAR_SEQZERO_MASK) - seqzero)));
        }
    }

    I am not sure of the internals of segmentation

Related