Please enable JavaScript to view this site.

Introduction

Using this protocol, data can be securely exchanged between an application on a Personal Computer and Robox controls via serial channel. It differs from serial mode 0 communication (terminated strings) in that both requests and responses are encapsulated and protected by CRC. Only formally correct directives (valid CRC) will be executed.

dle_ascii

NOTE: Flash management directives (file upload/download) cannot be used using this protocol.

By enabling this protocol on a serial channel, it is reserved exclusively for the system, so it is not possible for the user to use functions like ser_in(), ser_out().

Protocol enabling

The following directive should be used to enable this protocol: PSER DLE_AscII.

Protocol disabling

To disable this protocol and re-enable the standard AscII protocol, the following directive should be used: PSER AscII.

To disable this protocol and re-enable the BCC3 protocol for communication with the RDE development environment, the following directive should be used: PSER_DLE_BCC3.

Packet format

DLE-AscII transmission does not need the transmission prefixes :DrT: . The transmitted command does not need to be terminated by LF (see ascii communication in mode 0 - terminated string).

The format of request transmission from PC to Robox control has the following structure:

Elem.

Dim. (byte)

Value

Meaning

I

1

0x10 (DLE)

Command byte identification character

II

1

0x02 (STX)

Buffer start code

III

1

0x21

Code for protocol (DLE-AscII)

IV

N

Max 256 bytes

….

Terminated ascii directive (string terminated by 0).

CR and/or LF terminators are not needed.

Any 0x10 (DLE) characters MUST be doubled.

NOTE: In CRC calculation only one is considered.

V

1

0x10 (DLE)

Command byte identifier character

VI

1

0x03(ETX)

End buffer code

VII

2

Crc16

CRC value of elements: III. and IV. (original element IV)

Requests are only assumed if the structure is recognized and the received CRC matches the calculated CRC. If there is no match, the command is ignored.

Example

Calculation of CRC16

The calculation of crc16 is done with the polynomial 0x1021. The initial value of crc is 0xFFFF. (crc16_be)

Example

Below is the software in C code to be used to calculate the value of CRC:

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC