Newsgroups: comp.dcom.modems
Path: utzoo!utgpu!cunews!hobbit.gandalf.ca!dcarr
From: dcarr@hobbit.gandalf.ca (Dave Carr)
Subject: Re: LAP-M frame formatting
Message-ID: <1991Mar12.144619.14621@hobbit.gandalf.ca>
Organization: Gandalf Data Ltd.
References: <5098@mindlink.UUCP>
Distribution: world 
Date: Tue, 12 Mar 1991 14:46:19 GMT
Lines: 21

In <5098@mindlink.UUCP> Mike_Benna@mindlink.UUCP (Mike Benna) writes:

>Based on some of the things Toby has said about LAP-M packet assembling
>I'm led to believe that LAP-M packets have a header, a _variable_ length
>data area, and then a frame end marker/crc.

>What I'd like to know is how the data stream can be formatted so that
>the header doesn't need to contain the length of the subsequent data but
>that the receiving modem can somehow determine the length of the data
>portion of the frame.

Similar to HDLC.  The data links inserts 0's into the data stream so that
no more than five 1's are in a row.  Then, it defines the pattern 01111110
as a flag, used for start and end of frame delimiting.  To start/end a
frame, the USART overrides the bit stuffing logic to produce a flag.
The receiver knows how many bytes were received BETWEEN the flags.
The last 2/4 are the CRC 16/32.

Note, the data between the flags does not need to be a multiple of 8
bits.  This is useful when compression results in an odd number of bits.
 
