[ebus-dev] CSMA/CD test code

Werner Koch wk at gnupg.org
Mon Aug 22 16:02:54 CEST 2011


Hi!

The latest version includes a CRC; the CRC is part of the frame and not
of the payload.  Thus the frame forma is now:

    +-----------+--------+---------------------+---------+----------+
    |SYNC(0x7e) | PROTID | PAYLOAD (15 octets) | CRC(msb)| CRC(lsb) |
    +-----------+--------+---------------------+---------+----------+

Except for the SYNC byte all other octets are byte stuffed and masked so
that the sync byte value always indicates the start of a frame.  The CRC
is computed over PROTID and PAYLOAD after de-stuffing.  In contrast to
PPP we don't need a trailing flag to indicate the end of the frame
because we use a fixed length payload.  The CRC uses the polynom
x^16+x^12+x^5+1 and an initial value of 0xfff (CRC-CCID).  The CRC is
sent in network byte order.


Salam-Shalom,

   Werner

--
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Ebus-dev mailing list