Skip to main content

VSS / CAN Signal Mapping

All signals in this demo are aligned to the COVESA Vehicle Signal Specification (VSS). This page documents how VSS signals map to CAN frames on the bus.

VSS Signals Used

VSS PathData TypeDescription
Vehicle.Body.Lights.DirectionIndicator.Left.IsSignalingbooleanLeft turn indicator state
Vehicle.Body.Lights.DirectionIndicator.Right.IsSignalingbooleanRight turn indicator state
Vehicle.Body.Lights.Brake.IsActivestring (INACTIVE / ACTIVE / ADAPTIVE)Brake light state
Vehicle.Driver.Identifier.SubjectstringDriver RFID card UID

CAN Frame Encoding

The blinker signals are encoded in a single-byte CAN payload. Each signal occupies one or two bits:

CAN IDNameDirectionByteBit(s)VSS SignalDescription
0x120 (288)BlinkerCommandRaspberry Pi → Arduino00...Left.IsSignalingCommand left indicator
0x120 (288)BlinkerCommandRaspberry Pi → Arduino01...Right.IsSignalingCommand right indicator
0x120 (288)BlinkerCommandRaspberry Pi → Arduino02–3...Brake.IsActiveCommand brake light
0x121 (289)BlinkerStatusArduino → Raspberry Pi00...Left.IsSignalingCurrent left indicator
0x121 (289)BlinkerStatusArduino → Raspberry Pi01...Right.IsSignalingCurrent right indicator
0x121 (289)BlinkerStatusArduino → Raspberry Pi02–3...Brake.IsActiveCurrent brake light
  • CAN bitrate: 500 kbit/s
  • Byte order: Little-endian (Intel)
  • Brake encoding: 0 = INACTIVE, 1 = ACTIVE, 2 = ADAPTIVE

DBC File

The CAN encoding is formally defined in motorbike-blinker-command.dbc:

BO_ 288 BlinkerCommand: 1 RPI5
SG_ DirectionIndicatorLeft : 0|1@1+ (1,0) [0|1] "" MCU1
SG_ DirectionIndicatorRight : 1|1@1+ (1,0) [0|1] "" MCU1
SG_ BrakeIsActive : 2|2@1+ (1,0) [0|3] "" MCU1

BO_ 289 BlinkerStatus: 1 Vector__XXX
SG_ DirectionIndicatorLeft : 0|1@1+ (1,0) [0|1] "" Vector__XXX
SG_ DirectionIndicatorRight : 1|1@1+ (1,0) [0|1] "" Vector__XXX
SG_ BrakeIsActive : 2|2@1+ (1,0) [0|3] "" Vector__XXX

VSS-to-DBC Mapping (Kuksa CAN Provider)

The Kuksa CAN Provider uses a VSS overlay JSON file (motorbike-blinker-vss.json) to map between VSS paths and DBC signal names. Key mapping:

VSS PathDBC SignalMode
Vehicle.Body.Lights.DirectionIndicator.Left.IsSignalingDirectionIndicatorLeftdbc2vss + vss2dbc
Vehicle.Body.Lights.DirectionIndicator.Right.IsSignalingDirectionIndicatorRightdbc2vss + vss2dbc
Vehicle.Body.Lights.Brake.IsActiveBrakeIsActivedbc2vss + vss2dbc (with value transform)

Brake Value Transform

The brake signal requires a value transform between VSS string values and CAN integer values:

dbc2vss (CAN → VSS):

CAN ValueVSS Value
0INACTIVE
1ACTIVE
2ADAPTIVE

vss2dbc (VSS → CAN):

VSS ValueCAN Value
INACTIVE0
ACTIVE1
ADAPTIVE1

MQTT Payload Format

The Arduino ECUs publish JSON on the MQTT topic InVehicleTopics. The keys are the full VSS paths:

Joystick ECU payload:

{
"Vehicle.Body.Lights.DirectionIndicator.Left.IsSignaling": true,
"Vehicle.Body.Lights.DirectionIndicator.Right.IsSignaling": false,
"Vehicle.Body.Lights.Brake.IsActive": "ACTIVE"
}

RFID Door ECU payload:

{
"Vehicle.Driver.Identifier.Subject": "A1B2C3D4"
}

The MQTT-to-gRPC bridge maps these keys to Kuksa Databroker Val/Set gRPC calls using JSON pointer extraction as configured in grpc-mqtt.yaml.

Default Signal Values

The CAN provider uses default values for unmapped signals when operating in val2dbc mode:

{
"DirectionIndicatorLeft": 0,
"DirectionIndicatorRight": 0,
"BrakeIsActive": 0
}