Hdlc frame size calculation.

3 posts / 0 new
Last post
rudyjansen
Hdlc frame size calculation.

Following up on https://www.gurux.fi/node/7287

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?

kurumi
kurumi's picture
Hdlc frame size calculation

Hi,

Length is bytes after the length and also length byte.

BOP + type + len + 11 = 14.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

rudyjansen
Hdlc frame size calculation

Hi,
Thanks for the explanation.
Perfectly clear, the (incorrect) comment set me on the wrong foot.