Skip to content

DDP "skip out-of sequence packets" assumes that 5 packets are enough for a complete frame #5412

@softhack007

Description

@softhack007

WLED/wled00/e131.cpp

Lines 24 to 38 in 53d6c4b

//reject late packets belonging to previous frame (assuming 4 packets max. before push)
if (e131SkipOutOfSequence && lastPushSeq) {
int sn = p->sequenceNum & 0xF;
if (sn) {
if (lastPushSeq > 5) {
if (sn > (lastPushSeq -5) && sn < lastPushSeq) return;
} else {
if (sn > (10 + lastPushSeq) || sn < lastPushSeq) return;
}
}
}
unsigned ddpChannelsPerLed = ((p->dataType & 0b00111000)>>3 == 0b011) ? 4 : 3; // data type 0x1B (formerly 0x1A) is RGBW (type 3, 8 bit/channel)
uint32_t start = htonl(p->channelOffset) / ddpChannelsPerLed;

We need to verify if the assumption stated in the source code - 4 packets max before push - is correct w.r.t to the protocol definitions, and analyze if packets that are more than 4 out-of-sequnce can lead to a corrupted LEDs display.

With HUB75 panels, users have succesfully streamed 64x64 pixels, so it seem that larger frame sizes generally do work.

Reference
#5390 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds investigationThe bug has not yet been reproduced by me. Analysis or more details are needed.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions