linux-can / can-utils

Linux-CAN / SocketCAN user space applications
2.3k stars 696 forks source link

unable to transmit CAN frames with ixxat USB-to-CAN v2 #515

Closed josselinL69 closed 1 month ago

josselinL69 commented 2 months ago

Hello,

Subject : I try to set up a CAN connection between an STM32U5 and my computer using an USB-to-CAN v2.

Currently i'm able to receive data from the STM32 in my computer with candump. But when i try to send data to the STM from my computeur, there is error in communication.

I tried to send data in loopback mod in order to see sended data in candump but nothing is shown.

I have successfully installed the driver for ixxat USB-to-CAN in the kernel and there is no error when i do this command for initialization :

sudo ip link set down can0
sudo ip link set can0 type can bitrate 1000000
sudo ip link set can0 type can loopback on
sudo ip link set up can0

driver : ix_usb_can_2.0.367-MOD

here the result of ip -details link show can0 before sending data : image

here the result of ip -details link show can0 after sending data : image

Thanks per advance for any kind of help !

marckleinebudde commented 2 months ago

Which driver are you using for the USB-to-CAN v2?

josselinL69 commented 2 months ago

I use this driver : IXXAT_SocketCAN_2_0_378_Modified_2023-11-22Beta (copy).zip

marckleinebudde commented 2 months ago

This is not a mainline Linux CAN driver. Please ask the authors of this driver for support.

marckleinebudde commented 2 months ago

If you configure the driver for loopback mode you cannot send any data. If it's correctly implemented by the driver and USB firmware.

marckleinebudde commented 2 months ago

If you device is in ERROR_PASSIVE, it's likely that the your STM has no received the data correctly.

marckleinebudde commented 1 month ago

Feel free to reopen, if you have any issues.