2

I've a USB to can device but I don't know how to driver it on my linux system. The usb2can device uses Cortex M3 micro-controller(STM32F205) with internal CAN controller, which supports CAN protocols 2.0A and 2.0B , but only supply windows driver. Where can I find the similar driver to use. How to write the driver for such device?

Thanks in advance.

artless noise
  • 21,212
  • 6
  • 68
  • 105
YeYang
  • 43
  • 6
  • Does your device support ASCII protocol, i.e. 'O', 'C' etc. commands? If yes you can use slcand from [can-utils](https://github.com/linux-can/can-utils). See this [tutorial](http://elinux.org/Bringing_CAN_interface_up#SLCAN_based_Interfaces). – yegorich Mar 18 '16 at 14:35

1 Answers1

0

If your Linux is configured to support SocketCAN, the USB2CAN device should be supported.

Mainline Linux has supported this interface since kernel version 3.9, via the usb_8dev driver.

I am using both the rev.1 and rev.2 USB2CAN adapters with out of the box Ubuntu 18.04 and 20.04 distributions.

$ lsmod | egrep 'can|8dev'
Module                  Size  Used by
can_raw                20480  0
can                    24576  1 can_raw
usb_8dev               20480  0
can_dev                28672  1 usb_8dev
spaceKelan
  • 67
  • 7
Ned Konz
  • 21
  • 2