In Socketcan, not receiving CAN-FD frames

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
manju
Posts: 27
Joined: Mon 24. Jun 2024, 16:09

In Socketcan, not receiving CAN-FD frames

Post by manju » Tue 4. Mar 2025, 12:34

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 29079 times
Thanks in advance
Thanks

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: In Socketcan, not receiving CAN-FD frames

Post by M.Heidemann » Tue 4. Mar 2025, 12:42

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
---
Marvin Heidemann
PEAK-Support Team

manju
Posts: 27
Joined: Mon 24. Jun 2024, 16:09

Re: In Socketcan, not receiving CAN-FD frames

Post by manju » Wed 5. Mar 2025, 07:09

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
Thanks

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: In Socketcan, not receiving CAN-FD frames

Post by M.Heidemann » Wed 5. Mar 2025, 07:58

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?
---
Marvin Heidemann
PEAK-Support Team

Post Reply