tracetronic: SocketCAN

Vendor information

Vendor

Web page

Product name

Version

tracetronic GmbH

https://www.tracetronic.de

SocketCAN

0.1

Categories

MDL 🛈

APL 🛈

BAN 🛈

BMA 🛈

SVC 🛈

DGN 🛈

FIU 🛈

EES 🛈

FCT 🛈

DBG 🛈

IMG 🛈

AUDIO 🛈

ENVSIM 🛈

ENVCOM 🛈

✓

✓

✓

✓

✓

Signal recordings 🛈

File format

Comment

*.asc

*.mf4

BUSACCESS - CAN(-FD) ports support MDF4 bus logging only. XCP ports support signal-based MDF4 recording.

*.pcapng

BUSACCESS - CAN(-FD) ports will use linktype=227. The resulting files cannot be processed by trace analysis.

Platform

Operating system

Support

Windows

Linux

✓

Ports

Info

Ports marked with ✦ are part of the Add-on ecu.test calibration (subject to a separate license)

Specifics

This interface allows, by means of hardware, direct CAN and CAN-FD bus access. It supports the test steps read signal, read/write signal group as well as monitor and supports signal recording, Raw diagnostics with KWP2000 over ISO-TP, the Mini residual bus simulation and Additional functions of the close-to-hardware bus connections.

Drivers

The SocketCAN driver must be included in the kernel of the Linux distribution in use.

Notes on Behavior

  • Interfaces that are in the UP state before the tool starts also remain in the UP state after the tool stops.

  • For physical interfaces that are in the UP state, ecu.test assumes that the user has already correctly preconfigured the interface and skips the configuration of baud rate, bit timing and CtrlModes.

  • Interfaces that are in the DOWN state before the tool starts are configured at tool start, set to UP before the test case starts, and are set back to DOWN after the test case ends. They remain in the DOWN state even after the tool stops. The baud rate, bit timing, and CtrlMode configurations set by ecu.test remain persistent even after the tool stops.

  • If an interface does not have readable bit timing properties, it is assumed to be a virtual interface. In this case, the configuration of baud rate, bit timing, and CtrlModes is skipped.

  • The interfaces are identified using the Linux interface index, which is stored in the TBC. If the index of a used interface is changed, the TBC must be updated.

Example setup of virtual SocketCAN interfaces

Install the required dependencies

sudo apt update
sudo apt install can-utils

Create virtual SocketCAN interfaces

# load kernel modules
sudo modprobe vcan
sudo modprobe can-gw

# create two virtual SocketCAN interfaces (named vcan0 and vcan1)
sudo ip link add dev vcan0 type vcan
sudo ip link add dev vcan1 type vcan

# connect both interfaces
# rules for CAN
sudo cangw -A -s vcan0 -d vcan1 -e
sudo cangw -A -s vcan1 -d vcan0 -e
# rules for CAN-FD
sudo cangw -A -X -s vcan0 -d vcan1 -e
sudo cangw -A -X -s vcan1 -d vcan0 -e

Info

Loading the kernel modules as well as creating and connecting the virtual SocketCAN interfaces will be lost after a system restart. To ensure the setup persists, you may want to configure the script to run automatically after each reboot.

Name

Available if

Default value

Valid values

Type

Description

Timeout for tool call ❲in sec.❳

‘600’

string

Timeout after which a tool call is aborted.