can-utils icon indicating copy to clipboard operation
can-utils copied to clipboard

Send > 8 hex characters with Canable

Open mbilloo opened this issue 4 years ago • 1 comments

Hi,

When I try to send greater than 8 hex characters on a Canable, cansend returns with the following error:

CAN interface is not CAN FD capable - sorry

It looks like the tool checks the MTU setting of the interface and if it's not equal to the size of a canfd_frame struct, it returns the above message. When I try to manually set the MTU, using ip link/ifconfig, it returns "Invalid argument".

Is there a workaround to this (using a different can-utils utility or configuring the kernel), or is it a limitation of the hardware (I would need to understand how the kernel chooses which struct - a "regular" can_frame or a canfd_frame - to associate with the interface)?

Thanks

mbilloo avatar Jan 15 '21 01:01 mbilloo

Hey @mbilloo,

you need a CAN-FD capable Hardware (and driver). I'm think the original Canable doesn't speak CAN-FD.

You also need to configure the CAN-FD data bitrate and activate CAN-FD on the device, before sending CAN-FD frames.

sudo ip link set can0 up type can bitrate 500000 dbitrate 5000000 fd on

marckleinebudde avatar Jan 15 '21 07:01 marckleinebudde