DOCUMENTATION

CAN

Table Of Contents

Overview #


You can configure the CAN-bus integration in V-Link using the file /.config/v-link/can.json. This JSON file is made up out of 2 parts: interfaces and sensors. They are shown separately below to explain the functions, but in the end these 2 parts are what you fill find when opening can.json.

Interfaces #


In this part of the json you can configure the 2 CAN channels which are present on the HAT. Usually you dont need to change anything here except your CANBUS uses a different Bitrate.

"interfaces": [
    {
        "enabled": true,
        "bustype": "socketcan",
        "channel": "can0",
        "bitrate": 500000
    },
    {
        "enabled": false,
        "bustype": "socketcan",
        "channel": "can1",
        "bitrate": 125000
    }
],
enabledEnable/disable the CAN bus interface. If you disable an interface, any associated sensors are not requested/intercepted.
bustypeType of the CAN bus.
channelThe name of the CAN channel, can0, can1, etc.
bitrateThe speed of the CAN bus.

In case you are using a different Bitrate, make sure to also edit the two CAN files in this location:

/etc/systemd/network

Keep in mind, the files are only present after you installed V-Link.

Sensors #


Here you can define the engine parameters you want the app to retrieve/intercept from the CAN bus. As mentioned in the introduction, there are two ways to get the value for a given engine parameter. You can either set the sensor to "type": "diagnostic" or to "type": "internal". If you set it to diagnostic. V-Link will send a request to the associated CAN-bus and update the value in V-Link using the response. For internal messages, V-Link only listens on the CAN bus and updates app-values accordingly.

You can add as many sensors as you like by filling in the sensor information using the message format shown at the top of this page.

The configuration file follows a structured JSON format. Below is an example:

"sensors": {
    "rpm": {
        "interface": "can0",
        "enabled": false,
        "type": "diagnostic",
        "parameter": [
            "0x10",
            "0x1D"
        ],
        "app_id": "rpm",
        "req_id": "0x000FFFFE",
        "rep_id": "0x00400021",
        "action": "0xA6",
        "target": "0x7A",
        "is_16bit": false,
        "priority": 1,
        "scale": "(value * 40)",
        "label": "RPM",
        "unit": "rpm",
        "min_value": 0,
        "max_value": 8000,
        "limit_start":7000
    },
}
interfaceThe interface on which the messages should be sent/received
enabledEnable or disable the sensor
type“Diagnostic” or “Stream”
parameterThe bytes that define which value you want to retrieve from the ECU
app_idUnique identifier for V-Link
req_idID of the ECU the value was requested from
rep_idID of the ECU the value will be sent from
actionDefines the type of message, usually this is only a read command
targetTarget ECU
is_16bitDefines if the retrieved value will be an 8-Bit or 16-Bit value
priorityDefines how often the message should be sent. 1 for high refresh rate, 3 for low refresh rate
scaleA formula to convert the retrieved value to the correct format
labelThe label inside V-Link
unitThe unit of the retrieved value
min_valueThe lowest expected value
max_valueThe highest expected value
limit_startDefines the limit for the red areas in the gauges
Updated on September 9, 2025

© 2025 Boosted Moose

This project is an independent initiative and has no affiliation with Volvo.

Car Love <3