Page 1 of 1

Ubuntu 14.04 LTS SocketCAN CAN_ERR_CRTL_RX_WARNING

Posted: Mon 9. Mar 2015, 23:19
by dllemon
Hello,

I am using PEAK USB controller on ubuntu 14.04 LTS. Note: I do use the USB controller on a USB 3.0 port. According the documentation it should be compatible.

I have installed peak linux driver 7.14 with netdev support:

Code: Select all

*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20141219_n (7.14.0) Mar  9 2015 22:48:38 --------------
*------------------------- [mod] [par] [usb] [net] --------------------------
*--------------------- 1 interfaces @ major 250 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32    usb   can0 ffffffff 003 0x001c 0000044d 00000000 0000048b 0000044d 0x000c
I am using F/UTP cable as a bus and terminated with 100 ohm resistors (since utp cable is 100 ohm).

On PCAN View for windows everything works as a charm.
As soon as I start sending frames on linux with the SocketCAN API everything seems to work with simple candump:

Code: Select all

 candump can0
  can0  601   [8]  2B 40 60 00 0F 00 00 00
  can0  581   [8]  60 40 60 00 0F 00 00 00
but in reality a lot of error frames are transmitted:

Code: Select all

candump any,0:0,#FFFFFFFF 
 can0  601   [8]  2B 40 60 00 0F 00 00 00
 can0  20000004   [8]  00 04 00 00 00 00 00 00   ERRORFRAME
 can0  20000004   [8]  00 04 00 00 00 00 00 00   ERRORFRAME
 can0  581   [8]  60 40 60 00 0F 00 00 00
 can0  20000004   [8]  00 04 00 00 00 00 00 00   ERRORFRAME
 can0  20000004   [8]  00 04 00 00 00 00 00 00   ERRORFRAME
 can0  20000004   [8]  00 04 00 00 00 00 00 00   ERRORFRAME
 can0  20000004   [8]  00 04 00 00 00 00 00 00   ERRORFRAME
 can0  20000004   [8]  00 04 00 00 00 00 00 00   ERRORFRAME
It results (i think) in nodes not transmitting an acknowledge frame after a while:

Code: Select all

  can0  601   [8]  2B 40 60 00 0F 00 00 00
  can0  581   [8]  60 40 60 00 0F 00 00 00
  can0  602   [8]  2B 40 60 00 0F 00 00 00
  can0  582   [8]  60 40 60 00 0F 00 00 00
  can0  601   [8]  2F 60 60 00 01 00 00 00
  can0  581   [8]  60 60 60 00 01 00 00 00
  can0  602   [8]  2F 60 60 00 01 00 00 00
  can0  582   [8]  60 60 60 00 01 00 00 00
  can0  601   [8]  23 7A 60 00 0F 00 00 00
  can0  581   [8]  60 7A 60 00 0F 00 00 00
  can0  602   [8]  23 7A 60 00 0F 00 00 00
602 message is not acknowledged, but sometimes the complete sequence I set is executed!

Question: do I have a problem with my physical bus (I know 100 ohm resistant cable should actually be 120 ohm), my driver, or any other problem?

Thank you for your help and support!

Re: Ubuntu 14.04 LTS SocketCAN CAN_ERR_CRTL_RX_WARNING

Posted: Tue 10. Mar 2015, 09:35
by dllemon
Update: it seems we get the errors only when the servo's are turned on. The peak controller is placed in the neighbourhood of one server controller, so we think EMC is now the problem. We are reconfiguring the physical setup and shielding.

Iĺl keep you posted....

Re: Ubuntu 14.04 LTS SocketCAN CAN_ERR_CRTL_RX_WARNING

Posted: Thu 12. Mar 2015, 08:50
by dllemon
It seemed indeed faulty wiring/shielding caused the errors. Case closed!