Packet Formats


special destination_adress_bytes:
---------------------------------
0x00;0xFF  : multicast adresses

Structure of Datagrams
----------------------
Each datagram consists of:
- destination_address_byte
- source_address_byte
- header type byte
- header
- data
- crc

Header_Types:
0x00 - 0x0F        : single byte adresses      8 bits
0x10 - 0x1F        : double byte adresses     16 bits
0x20 - 0x2F        : quad byte adresses       32 bits
0x30 - 0x3F        : octal byte adresses      64 bits
0x40 - 0x4F        : hex byte adresses       128 bits
0x50 - 0xDF        : reserved
0xE0 - 0xEF        : for development, experiments and play around
0xF0 - 0xFF        : special (booting) purposes

Special used  header type bytes:

0x00     simple datagram, max. 255 bytes data,  8bit crc. no confirmation
0x01     simple datagram, max. 1500/65535 bytes data, 16bit crc. no confirmation
0x02     simple dategram, max. 1500/65535 bytes data, 32bit crc, no confirmation
....     your suggestion
0x0F     reserved for extension, next byte spazifies the header type

0x20     for IPv4
....     your suggestion
0x2F     reserved for extension, next byte spazifies the header type

0x40     for IPv6
....     your suggestion
0x4F     reserved for extension, next byte spazifies the header type

0xF0        request for booting
0xF1        booting code
0xFF        reserved for extension, next byte spazifies the header type


 Format of Datagram Type: 0x00:
 ==========================
 1         Destination_Adress_Byte
 2         source_adress_byte
 3         Header_Type (=0x00)
 5         Count
           x Data
 x+5       CRC8

 Format of Datagram Type: 0x01:
 ==========================
 1         destination_ddress_byte
 2         source_adress_byte
 3         Header_Type (=0x01)
 4         Count_High
 5         Count_Low
           x Data
 x+6       CRC16 H
 x+7       CRC16 L

 


Some Links to CRC related stuff


CRC in Pascal
www.uni-paderborn.de
www.simtel.net

CRC in C
CCITT CRC 1

Look also to RFC
RELIABLE LINK LAYER PROTOCOLS: RFC 935

Much other source code is availabel on the Web. Please search!



Return to RS485 Start Page

mailto: Joachim Franek
Copyright © Joachim Franek 2001