There was a modification https://www.gurux.fi/node/6280 on the frame size.
//Remove BOP, type, len, primaryAddress, secondaryAddress, frame, header CRC, data CRC and EOP from data length.
frameSize -= 11;
But the nummers don't add up.
BOP = 1
type = 1
len = 1
primaryAddress = 4
secondaryAddress = 1
frame = 1
header CRC = 2
data CRC = 2
EOP = 1
This totals 14, where is 11 comming from?
Hdlc frame size calculation
Hi,
Length is bytes after the length and also length byte.
BOP + type + len + 11 = 14.
BR,
Mikko
Hdlc frame size calculation
Hi,
Thanks for the explanation.
Perfectly clear, the (incorrect) comment set me on the wrong foot.