Question Details

No question body available.

Tags

python capl canoe python-can uds

Answers (2)

February 5, 2026 Score: 0 Rep: 3,907 Quality: Low Completeness: 50%

There is a CAPL function called CanTpSetPadding. This function can be used to configure CANoe's padding behavior for a ISO-TP connection:

In your case:

CanTpSetPadding(gHandle, -1)

-1 here means no padding If you, e.g. use 0xAA instead of -1, the the frames will be padded with 0xAA

You have used 0x00 which means pad with 0x00 and is exactly what you have observed.

November 24, 2025 Score: -1 Rep: 730 Quality: Low Completeness: 100%
  • Why does CanTpSendData(gHandle, resp, 6) still result in an 8-byte CAN frame?

Underlying Diagnostic over CAN (DoCAN) protocol that handles CAN packets segmentation for UDS by default expects CAN frames with DLC 8 or longer. There are two mechanisms to handle that, both are described here: https://uds.readthedocs.io/en/stable/pages/knowledgebase/can.html#data-field

In short words, here Data Padding is used and every CAN frame has DLC equal 8 (or more). If some of the bytes are unused, then filler byte value (in your case 0x00) is added at the end of the frame to fill it to full 8 bytes.

  • How can I make CANoe’s CAPL simulation send exactly the number of UDS bytes I specify (without padding), so udsoncan/isotp accepts it?

You can reconfigure udsoncan/isotp to accept these frames.
I'm pretty sure that if you set RXPADDING flag (https://can-isotp.readthedocs.io/en/latest/isotp/socket.html#isotp.socket.flags.RX_PADDING) then udsoncan should be able to receive your messages.

  • Is there a better practice for handling padding between Python isotp and CANoe CAPL?

Both approaches are fine (Data Padding and Data Optimization). It seems like by default each tool uses a different one. So you just have to pick one and stick with it.

Personally, I would consider it a defect in udsoncan/can-isotp cause in my opinion it should support both Data Optimization and Data Padding for RX messages regardless of configuration. At least least this is the way I designed py-uds (an alternative solution to udsoncan).