Page 1 of 1

In Socketcan, not receiving CAN-FD frames

Posted: Tue 4. Mar 2025, 12:34
by manju
Hello,

I'm sending both CAN and CAN-FD messages from my Peak devices, and I’m using SocketCAN’s candump to receive the messages. To my surprise, I was only receiving the CAN frames, despite sending both types of frames.

I then ran the candump command to log both data and error frames, and I noticed that the CAN-FD messages were being received as error frames.

I'm really confused about why I’m unable to send CAN-FD data through SocketCAN, and why the CAN-FD messages are being received as error frames.
img.png
img.png (92.97 KiB) Viewed 43780 times
Thanks in advance

Re: In Socketcan, not receiving CAN-FD frames

Posted: Tue 4. Mar 2025, 12:42
by M.Heidemann
Hello,

Either one of your PCAN-Interfaces does not support CAN-FD or
the data bitrate config is off, in that case regular CAN 2.0 messages would be working just fine,
however FD messages would fail and generate Error codes.

You have to be really precise with FD bit-timing, just being in the ballpark in terms of
bitrate speed is not sufficent, the same goes for termination (120Ohms on both ends, 60Ohms between CAN-H and CAN-L (when power is off))

So, which PCAN-devices are you using and which bitrate are you currently uisng?

Also, is the bus properly terminated and is the cabling intact?

BR

Marvin

Re: In Socketcan, not receiving CAN-FD frames

Posted: Wed 5. Mar 2025, 07:09
by manju
Hello,

I'm pretty sure that my Peak devices support can-fd, as I've used it in several other functionalities. But in socketcan I'm wondering why it isnt working.

ip link set can0 type can bitrate 125000 dbitrate 8000000 fd on, This is the command I'm using to set the can-fd bitrate.

Both of my devices are peak-usb-fd.

Yes CAN termination are proper as I have verified the messages flow in Pcan-view software

Re: In Socketcan, not receiving CAN-FD frames

Posted: Wed 5. Mar 2025, 07:58
by M.Heidemann
are you using the proprietary driver
do you use the kernel driver?

whats the output for

Code: Select all

uname -a
?

anything in

Code: Select all

dmesg
that seems off?

Is the cabling verified to be in working order?