Search code examples
modelserial-portosi

Serial Protocols and the OSI Model


I connect a computer and an external device by a serial connection (RS 232). Then I send some data from the device to computer. Hyper terminal is accessing that data and show them. In this process what layers of the OSI model are used?

This is my understanding. RS-232 covers only Layer 1( Physical Layer). Hyper terminal runs in application layer. For this process only those two layers are used.

When I search stackoverflow I found something like “The serial protocol defines either the first layer or the first two layers of OSI model (depending on whether you consider the 7 or 8 bit serial packet a frame or not)”. See the full article.
What is meant by this?


Solution

  • When I search stackoverflow I found something like “The serial protocol defines either the first layer or the first two layers of OSI model (depending on whether you consider the 7 or 8 bit serial packet a frame or not)”

    That quote swaps the terms for "packet" and "frame".
    (I adhere to the definition of "frame" as used in UART documentation.
    This would also be consistent with the OSI hierarchy of packet->frame->bits.)

    The frame in asynchronus serial communications consists of only one character (of 5 to 9 bits).
    One char is not much of a message.
    Whereas in synchronous links, the frame contains several bytes to compose a higher-level message unit.
    So EliAlgranti in that answer seems to be pondering if this asynchronous frame qualifies as the OSI data-link layer, and if this is part of the "serial protocol".

    But note that this UART framing does not seem to be part of the RS-232 standard (even though you can find some "RS-232 descriptions" on the web that do include the frame description as well as sites that omit framing.)
    The actual TIA/EIA document costs US$156 from the TIA site.
    The abstract for the standard makes no mention of framing.

    The best confirmation that framing is not part of the RS-232 standard I found is in the 2nd to the last paragraph of "The RS232 Standard":

    Note that neither the ASCII alphabet nor the asynchronous serial protocol that defines the start bit, number of data bits, parity bit, and stop bit, is part of the EIA232 specification.

    So the RS-232 standard is likely only the Physical layer.


    For this process only those two layers are used.

    No, you've only identified the top and bottom layers.
    The other layers in between those two do exist (at least conceptually), but you have not identified if they have actually been implemented and how.
    Obviously there's framing per the Data Link layer.