Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HDLC Frames - Octets/modulo 8 doubts

I am trying to implement the HDLC frame format type 3 and I have some doubts as regards Octets/Modulo 8 encoding of frames.

  1. Firstly, Is the HDLC frame transmitted entirely in Octets?
  2. What do they mean by a frame is 'n' Octet in length? Please give an example.
  3. I believe that Octet and Modulo is the same, so assuming that we have a frame X of one byte, what then do they mean by the encoding of X shall be modulo 8.

I am getting a little confused with all this, so i need more clarifications. Example and illustration will be of great help.

Thanks in Advance.


Thanks @clifford and @masoud. Your answer was really helpful. But I have to read this Octet String: What is it? (though it sounds funny because it explained in a simple way), and I came back to read your comments, then I understood all you explained. All the same, wish me a happy coding.

like image 443
Paul A. Avatar asked Feb 14 '26 19:02

Paul A.


1 Answers

In HDLC every field length must be modulo 8 for example:

A frame of HDLC is like below: [FLAG(8bits)|ADDRESS(8bits)|CONTROL(8/16bits)|INFORMATION(n*8bits)|FCS(8bits)|FLAG(8bits)]

each field is modulo 8, even length of INFORMATION must be modulo 8.

It means if you want to send a data with length of 1 bit, you must consume a byte(8 bits).

If you are looking for some HDLC frame sample, look at this link: Click me! and read this: Click me

like image 186
masoud Avatar answered Feb 16 '26 09:02

masoud



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!