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.
Thanks in advance
In Socketcan, not receiving CAN-FD frames
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: In Socketcan, not receiving CAN-FD frames
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
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
Marvin Heidemann
PEAK-Support Team
Re: In Socketcan, not receiving CAN-FD frames
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
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
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: In Socketcan, not receiving CAN-FD frames
are you using the proprietary driver
do you use the kernel driver?
whats the output for?
anything in that seems off?
Is the cabling verified to be in working order?
do you use the kernel driver?
whats the output for
Code: Select all
uname -a
anything in
Code: Select all
dmesg
Is the cabling verified to be in working order?
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team