uhi22/ccs32clara

SPI Ethernet packet length clarification

uhi22 opened this issue · 3 comments

uhi22 commented

In

&& (L2+10==L1)) {
there is the length check, which compares the "outer" and the "inner" length.
According to https://openinverter.org/forum/viewtopic.php?p=62491#p62491 the frame size may not always be correct.

Thanks for the reply! (this is olegiv)
That's what I figured, if you have to check this condition, then it looks like the QCA frame size may not always be correct?
or there may be additional information here in the case of if ((p[4]=0xAA) && (p[5]=0xAA) && (p[6]=0xAA) && (p[7]=0xAA) && (L2+10!=L1))

uhi22 commented

The plausibilization of the length is just an additional method to avoid, that we interpret "random" data as valid frame. Imagine, that due to electromagnetic influence we see garbage on the SPI, 0xAA, 0xAA, and so on. We would take this as valid frame, but the length check discovers the garbage and we discard it.
I did not see any case where the QCA intentionally violated the length rule.

uhi22 commented

Closing this issue due to inactivity and no open points.