Interface

The section documents the serial interface.

The device supports a serial interface that can be accessed using the USB connection (see Modes of operation). The interface can be used to communicate with the device in real-time.

Note

See the product webpage for tools supporting the serial interface.

Serial protocol

Warning

The specification of the serial interface protocol below is for advanced users only

The serial protocol consists of three simple layers:

The layered model ensures effective and robust communication between the device and the host (e.g. PC).

In the following sections, the protocol layers will be described.


Physical layer

The USB connection creates a virtual serial interface with the following configuration:

  • Bit-rate: 115200 bit/s

  • Data bits: 8

  • Stop bits: 1

  • Parity: None

  • Flow control: None

Note

The settings above are in practice not used as the serial port is virtual via USB.



Application layer

The decoded DLL payload becomes the APL frame.

The APL is the decoded Payload of the DLL and contains an application ID (1 byte) and the application data:

The APL frame format is:

APL frame format

ID

Application data

1-3

The interpretation of the application data is defined by the ID field:

APL frame format

ID

Description

Direction

1

CAN-bus message received

Device to PC

2

CAN-bus message transmitted

Device to PC

3

CAN-bus transmission request

PC to device

The following describes above listed application data interpretations.


ID 1 - CAN-bus message received

The application data contains a CAN-bus message received by the device.

ID1 interpretation

ID

Application data

1

Time

Time ms

Message ID

Data length

Data

4 byte

2 byte

4 byte

1 byte

0-8 byte

The Time field is encoded as epoch seconds. The message ID is extended if bit 29 (indexed from zero) is set. Multi-byte fields shall be interpreted MSB (Most-Significant-Byte) first.


ID 2 - CAN-bus message transmitted

The application data contains a CAN-bus message transmitted by the device based on the configuration file.

Note

Note that messages transmitted based on interface transmission requests (via USB) are not included.

ID2 interpretation

ID

Application data

2

Time

Time ms

Message ID

Data length

Data

4 byte

2 byte

4 byte

1 byte

0-8 byte

The Time field is encoded as epoch seconds. The message ID is extended if bit 29 (indexed from zero) is set. Multi-byte fields shall be interpreted MSB (Most-Significant-Byte) first.


ID 3 - CAN-bus transmission request

The application data contains a CAN-bus message to be transmitted by the device.

ID3 interpretation

ID

Application data

3

Message ID

Data length

Data

4 byte

1 byte

0-8 byte

The message ID is extended if bit 29 (indexed from zero) is set. Multi-byte fields shall be interpreted MSB (Most-Significant-Byte) first.