3.4.2. CAN Communication¶
The CAN gateway transports UDS messages over ISO-TP (ISO 15765-2). It supports
physical UDS communication with ECUs using SocketCAN ISO-TP sockets. The can
feature is required; on non-Linux systems it additionally requires the
can-socketcand feature.
3.4.2.1. Addressing And Configuration¶
Each physical ECU connection requires a request CAN ID (tester to ECU) and a response CAN ID (ECU to tester). The gateway accepts 11-bit standard IDs and 29-bit extended IDs. Addressing is resolved in this order:
Explicit configuration overrides MDD values. An ECU with no complete request/response pair has no CAN connection. The gateway rejects unusable configuration, including an empty usable mapping set, out-of-range IDs, and IDs reserved for the functional TesterPresent broadcast. |
3.4.2.2. Physical ISO-TP Exchange¶
The gateway opens a fresh ISO-TP socket for each physical request. Its receive ID is
the ECU response ID and its transmit ID is the ECU request ID. TX padding is enabled
with The CAN bus is shared. Before forwarding a terminal response, the gateway verifies that its response SID belongs to the sent request. Frames that do not match are discarded and do not extend the receive deadline. This avoids accepting unrelated traffic, including a physical negative response to a functional TesterPresent broadcast.
CAN Physical UDS Exchange¶ |
3.4.2.3. NRC Classification¶
The CAN gateway classifies every incoming UDS response through the shared
The helper recognizes three pending-lifecycle NRCs – When a pending NRC arrives, the gateway extends the ISO-TP socket receive deadline
(
CAN NRC Classification Flow¶ The classification functions are defined in
Unlike the DoIP transport, CAN does not intercept TesterPresent NRCs ( |
3.4.2.4. Discovery And Keep-Alive¶
CAN has no connection-establishment event. The gateway probes every configured ECU at
startup and marks it discovered when any non-empty response is received, including a
negative response. The default probe is physical Undiscovered ECUs are re-probed sequentially every five seconds. A physical request with no received frame for at least the probe timeout also removes that ECU from the discovered set, allowing the rediscovery task to recover it after wake-up or reboot. An on-demand probe is also made when a caller checks a currently undiscovered ECU. Independently, the gateway can send
CAN Discovery And Rediscovery¶ |
3.4.2.5. Functional Communication Limitation¶
Note
Functional transport for CAN is currently not supported. Tracked via https://github.com/eclipse-opensovd/classic-diagnostic-adapter/issues/417