Error testing CAN FD frames PEAK CAN USB X6 Device
-
- Posts: 7
- Joined: Tue 20. Jun 2017, 12:01
Error testing CAN FD frames PEAK CAN USB X6 Device
I am facing problem with testing "PCAN-USB X6 device" for CAN FD Frames(Send/Receive)
I am trying to Send(can0) and Receive(can1) CAN FD frames through PCAN-USB X6 interfaces using socketCAN and can-utils.
I ahave error with receiving CAN FD frames at receiving interface(can1). Below are the steps I followed to enable CAN FD:
1. sudo ip link set can0 type can bitrate 125000
sudo ip link set can1 type can bitrate 125000
2. sudo ip link set can0 mtu 72
sudo ip link set can1 mtu 72
3. sudo ifconfig can0 up
sudo ifconfig can1 up
After the 3rd step green LED's start blinking for can0 and can1 interfaces normally.
For the standard CAN frame Send/Receive works fine as below:
But for the CAN FD frame which is send at can0 is not getting received in the can1 interface and the LED's start blinking Red indicating an error as shown below:
Same error occurs with Red LEDs blinking when I try to listen to specific interface using "candump can1" command instead.
Could you please help me to fix the error ? Do we need to set a different bit rate for CAN FD ?
any relevant information/suggestions/solution is highly appreciated.
Regards,
Jibin
Regards,
Jibin Kurian
I am trying to Send(can0) and Receive(can1) CAN FD frames through PCAN-USB X6 interfaces using socketCAN and can-utils.
I ahave error with receiving CAN FD frames at receiving interface(can1). Below are the steps I followed to enable CAN FD:
1. sudo ip link set can0 type can bitrate 125000
sudo ip link set can1 type can bitrate 125000
2. sudo ip link set can0 mtu 72
sudo ip link set can1 mtu 72
3. sudo ifconfig can0 up
sudo ifconfig can1 up
After the 3rd step green LED's start blinking for can0 and can1 interfaces normally.
For the standard CAN frame Send/Receive works fine as below:
But for the CAN FD frame which is send at can0 is not getting received in the can1 interface and the LED's start blinking Red indicating an error as shown below:
Same error occurs with Red LEDs blinking when I try to listen to specific interface using "candump can1" command instead.
Could you please help me to fix the error ? Do we need to set a different bit rate for CAN FD ?
any relevant information/suggestions/solution is highly appreciated.
Regards,
Jibin
Regards,
Jibin Kurian
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: Error testing CAN FD frames PEAK CAN USB X6 Device
Hello,
In order to setup CAN FD, you should first setup the interface with "fd on":
Setting the "mtu" size is no more needed since implicit with "fd on".
Regards,
Stéphane
In order to setup CAN FD, you should first setup the interface with "fd on":
Code: Select all
$ ip link set canx up type can bitrate ... dbitrate ... fd on
Regards,
Stéphane
— Stéphane
-
- Posts: 7
- Joined: Tue 20. Jun 2017, 12:01
Re: Error testing CAN FD frames PEAK CAN USB X6 Device
Hi Stéphane,
I am getting the error " Can: Unknown option dbitrate" while executing the command. How do I fix it ?
My iproute2 version is " ip utility, iproute2-ss131122"
I am getting the error " Can: Unknown option dbitrate" while executing the command. How do I fix it ?
My iproute2 version is " ip utility, iproute2-ss131122"
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: Error testing CAN FD frames PEAK CAN USB X6 Device
Hi,
It looks like your iproute2 is too old to handle CAN FD.
Please try to upgrade your local version:
You can also choose the version you want, by downloading and building the source package by yourself, from
https://www.kernel.org/pub/linux/utils/net/iproute2/
Regards,
Stéphane
It looks like your iproute2 is too old to handle CAN FD.
Code: Select all
$ ip -V
ip utility, iproute2-ss151103
$ ip link help can
Usage: ip link set DEVICE type can
[ bitrate BITRATE [ sample-point SAMPLE-POINT] ] |
[ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1
phase-seg2 PHASE-SEG2 [ sjw SJW ] ]
[ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] |
[ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1
dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ]
[ loopback { on | off } ]
[ listen-only { on | off } ]
[ triple-sampling { on | off } ]
[ one-shot { on | off } ]
[ berr-reporting { on | off } ]
[ fd { on | off } ]
[ fd-non-iso { on | off } ]
[ presume-ack { on | off } ]
[ restart-ms TIME-MS ]
[ restart ]
Where: BITRATE := { 1..1000000 }
SAMPLE-POINT := { 0.000..0.999 }
TQ := { NUMBER }
PROP-SEG := { 1..8 }
PHASE-SEG1 := { 1..8 }
PHASE-SEG2 := { 1..8 }
SJW := { 1..4 }
RESTART-MS := { 0 | NUMBER }
Code: Select all
$ sudo apt-get --only-upgrade install iproute2
https://www.kernel.org/pub/linux/utils/net/iproute2/
Regards,
Stéphane
— Stéphane
-
- Posts: 7
- Joined: Tue 20. Jun 2017, 12:01
Re: Error testing CAN FD frames PEAK CAN USB X6 Device
Hi,
I have upgraded iproute2 to latest version and tried to test CAN FD interface using can-utils but getting the same error result as before with Red Led's blinking . I am Not been able to receive the CAN FD Message at the receiving interface ( can1).
I have enabled CAN FD using the following command:
sudo ip link set can0 up type can bitrate 125000 dbitrate 800000 fd on
sudo ip link set can1 up type can bitrate 125000 dbitrate 800000 fd on
And Tested by sending CAN FD message on can0 interface and receiving on can1 interface connected via physical can bus. following are the screen shots.
How can I test the CAN FD enabled interfaces properly ?
I have upgraded iproute2 to latest version and tried to test CAN FD interface using can-utils but getting the same error result as before with Red Led's blinking . I am Not been able to receive the CAN FD Message at the receiving interface ( can1).
I have enabled CAN FD using the following command:
sudo ip link set can0 up type can bitrate 125000 dbitrate 800000 fd on
sudo ip link set can1 up type can bitrate 125000 dbitrate 800000 fd on
And Tested by sending CAN FD message on can0 interface and receiving on can1 interface connected via physical can bus. following are the screen shots.
How can I test the CAN FD enabled interfaces properly ?
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: Error testing CAN FD frames PEAK CAN USB X6 Device
Hi,
Do you run a Virtual Machine?
Please type:
What kind of driver are you using please? The linux-can (mainline) peak_usb driver or the pcan driver, downloaded from your website?
If pcan is the driver, please type:
If peak_usb is the driver, please type:
Regards,
Stéphane
Do you run a Virtual Machine?
Please type:
Code: Select all
$ uname -a
$ lsusb -d 0c72:
If pcan is the driver, please type:
Code: Select all
$ cat /proc/pcan
Code: Select all
$ dmesg | grep peak_usb
Stéphane
— Stéphane
-
- Posts: 7
- Joined: Tue 20. Jun 2017, 12:01
Re: Error testing CAN FD frames PEAK CAN USB X6 Device
Hi StePhane,
I am Not using a Virtual machine as you can see below: I am using pcan driver and the commands result in the folowing : Just to remind you that I am using PCAN-USB X6 Device for testing CAN FD communication using Can-utils package
Regards,
Jibin
I am Not using a Virtual machine as you can see below: I am using pcan driver and the commands result in the folowing : Just to remind you that I am using PCAN-USB X6 Device for testing CAN FD communication using Can-utils package
Regards,
Jibin
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: Error testing CAN FD frames PEAK CAN USB X6 Device
Hi,
Could you please download then install the last version of the pcan driver from:
http://www.peak-system.com/fileadmin/me ... 4.0.tar.gz
Regards,
Stéphane
Could you please download then install the last version of the pcan driver from:
http://www.peak-system.com/fileadmin/me ... 4.0.tar.gz
Regards,
Stéphane
— Stéphane
-
- Posts: 7
- Joined: Tue 20. Jun 2017, 12:01
Re: Error testing CAN FD frames PEAK CAN USB X6 Device
Hi StePhane,
I have installed the latest pcan driver as shown below:
unfortunately I face the same problem. I am able to test normal CAN frame using can-utils but with CAN FD frame error in transmission ocuurs with Red led Blinking.
Regards,
Jibin
I have installed the latest pcan driver as shown below:
unfortunately I face the same problem. I am able to test normal CAN frame using can-utils but with CAN FD frame error in transmission ocuurs with Red led Blinking.
Regards,
Jibin
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: Error testing CAN FD frames PEAK CAN USB X6 Device
Hi,
There is something wrong somewhere... Could you please do:
and
and
immediately after you have sent the CAN-FD frame (leading to blinked red led)?
Thanks to send us the output.
Stéphane
There is something wrong somewhere... Could you please do:
Code: Select all
$ lspcan -T -t -i
Code: Select all
$ lspcan -T -t -s
Code: Select all
$ dmesg | grep pcan
Thanks to send us the output.
Stéphane
— Stéphane