Difference between revisions of "CAN Bus"
(Add SocketCAN related tutorials) |
(Update kvaser_pciefd device list) |
||
(72 intermediate revisions by 16 users not shown) | |||
Line 9: | Line 9: | ||
Decreasing the bit rate allows longer network distances (e.g., 500 m at 125 kbit/s). | Decreasing the bit rate allows longer network distances (e.g., 500 m at 125 kbit/s). | ||
(Jeremiah J. Flerchinger [[media:avc-lan.pdf|Source]]) | (Jeremiah J. Flerchinger [[media:avc-lan.pdf|Source]]) | ||
+ | Controllers supporting CAN FD, an enhanced CAN version with frames up to 64 byte and bit rates up to 4 Mbit/s, | ||
+ | will be available in the second half of 2014. A can4linux version supportig CAN FD on a [http://www.ifi-pld.de/IP/CANFD/canfd.html IFI CAN] is ready to be used. | ||
Although developed as car communication network CAN is used in many other areas, industrial, medical, maritime laboratory and more. | Although developed as car communication network CAN is used in many other areas, industrial, medical, maritime laboratory and more. | ||
− | Most often with a CAN based higher layer protocol like [ | + | Most often with a CAN based higher layer protocol like [http://en.wikipedia.org/wiki/CANopen CANopen] on top of it. |
+ | |||
Additional information can be found at: | Additional information can be found at: | ||
: | : | ||
:http://en.wikipedia.org/wiki/CAN_bus | :http://en.wikipedia.org/wiki/CAN_bus | ||
− | |||
− | |||
: | : | ||
:CiA [http://www.can-cia.org CAN in Automation] CAN user association | :CiA [http://www.can-cia.org CAN in Automation] CAN user association | ||
:[http://www.can-wiki.info CAN Wiki] | :[http://www.can-wiki.info CAN Wiki] | ||
− | |||
=== CAN Support in Linux === | === CAN Support in Linux === | ||
CAN is supported by Linux device drivers. Mainly two types exist. Character device based drivers and network socket based drivers. The Linux kernel supports CAN with the SocketCAN framework. | CAN is supported by Linux device drivers. Mainly two types exist. Character device based drivers and network socket based drivers. The Linux kernel supports CAN with the SocketCAN framework. | ||
− | * [ | + | * [https://www.kernel.org/doc/html/latest/networking/can.html SocketCAN Documentation] |
* [http://vger.kernel.org/vger-lists.html#linux-can mailing list for Linux Kernel CAN development] | * [http://vger.kernel.org/vger-lists.html#linux-can mailing list for Linux Kernel CAN development] | ||
− | * [ | + | * [https://git.kernel.org/cgit/linux/kernel/git/mkl/linux-can.git linux-can git repository] |
− | * [ | + | * [https://git.kernel.org/cgit/linux/kernel/git/mkl/linux-can-next.git linux-can-next git repository] |
One of the character based drivers is can4linux. | One of the character based drivers is can4linux. | ||
− | * [http://sourceforge.net/projects/can4linux/ SourceForge project page] | + | * [http://www.can-wiki.info/can4linux/man/ can4linux documentation] |
+ | * [https://gitlab.com/hjoertel/can4linux GitLab project page] (Old: [http://sourceforge.net/projects/can4linux/ SourceForge project page]) | ||
* [http://de.wikipedia.org/wiki/Can4linux German Wikipedia article] | * [http://de.wikipedia.org/wiki/Can4linux German Wikipedia article] | ||
* [http://en.wikipedia.org/wiki/Can4linux English Wikipedia article] | * [http://en.wikipedia.org/wiki/Can4linux English Wikipedia article] | ||
Line 53: | Line 54: | ||
* TIs SoCs | * TIs SoCs | ||
* Serial/network devices utilizing ASCII protocol (slcan driver) | * Serial/network devices utilizing ASCII protocol (slcan driver) | ||
+ | |||
+ | {| class="wikitable sortable" | ||
+ | |- | ||
+ | !Vendor !! Device Name !! Driver Module Name !! Controller !! Kconfig Option !! Linux Mainline !! Remarks | ||
+ | |- | ||
+ | |[http://vscom.de VScom] || [http://www.vscom.de/ethernet-to-can.htm NetCAN Plus 110] || slcan || (unknown) || CONFIG_CAN_SLCAN || 2.6.38 || needs slcand and socat | ||
+ | |- | ||
+ | |[http://vscom.de VScom] || [http://www.vscom.de/usb-to-can.htm USB-CAN Plus] || slcan || SJA1000T || CONFIG_CAN_SLCAN || 2.6.38 || needs slcand | ||
+ | |- | ||
+ | |[http://www.lawicel-shop.se LAWICEL] || [http://www.can232.com/?page_id=14 CAN232] || slcan || (unknown) || CONFIG_CAN_SLCAN || 2.6.38 || needs slcand | ||
+ | |- | ||
+ | |[http://www.lawicel-shop.se LAWICEL] || [http://www.can232.com/?page_id=16 CANUSB] || slcan || (unknown) || CONFIG_CAN_SLCAN || 2.6.38 || needs slcand | ||
+ | |- | ||
+ | |[http://www.titan.tw TITAN] || [https://www.titan.tw/product-category/all/can-bus-adapters/ USB-CAN] || slcan || (unknown) || CONFIG_CAN_SLCAN || 2.6.38 || needs slcand | ||
+ | |- | ||
+ | |[http://www.peak-system.com PEAK] || [http://www.peak-system.com/PCAN-PCI.207.0.html PCAN-PCI] || peak_pci || sja1000 || CONFIG_CAN_PEAK_PCI || 3.2 || supports all PCAN-[mini]PCI[e][104] variants | ||
+ | |- | ||
+ | |[http://www.peak-system.com PEAK] || [http://www.peak-system.com/PCAN-USB.199.0.html PCAN-USB] || peak_usb || (unknown) || CONFIG_CAN_PEAK_USB || 3.4 || supports PCAN-USB[pro][hub] (no LIN support) | ||
+ | |- | ||
+ | |[https://www.kvaser.com/ Kvaser] || [https://www.kvaser.com/products-services/our-products/#?descriptors=product_groups&product_groups=pc-104,pci PCIcanx] || kvaser_pci || sja1000 || CONFIG_CAN_KVASER_PCI || 2.6.31 || supports all PCI-[mini]PCI[e][104] variants | ||
+ | |- | ||
+ | |[https://www.kvaser.com/ Kvaser] || [https://www.kvaser.com/products-services/our-products/#?descriptors=product_groups&product_groups=mini-pci-express,pcie PCIe products] || kvaser_pciefd || Kvaser kcan || CAN_KVASER_PCIEFD || [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/Kconfig?h=v5.4#n123 5.4] <br><br><br><br><br><br>[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/Kconfig?h=v6.6#n153 6.6] <br><br><br><br><br> || PCIEcan 4xHS<br>PCIEcan 2xHS v2<br>PCIEcan HS v2<br>Mini PCI Express HS v2<br>Mini PCI Express 2xHS v2<br> <br> PCIEcan 1xCAN v3 <br> PCIEcan 2xCAN v3 <br> PCIEcan 4xCAN v2 <br> Mini PCI Express 1xCAN v3 <br> Mini PCI Express 2xCAN v3 | ||
+ | |||
+ | |- | ||
+ | |[https://www.kvaser.com/ Kvaser] || [https://www.kvaser.com/products-services/our-products/#/?pc_int=usb USB products] || kvaser_usb || (unknown) || CONFIG_CAN_KVASER_USB || [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/usb/Kconfig?h=v3.8#n16 3.8] <br><br><br><br><br><br><br>[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/usb/Kconfig?h=v3.16#n24 3.16] <br><br><br><br> [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/usb/Kconfig?h=v4.0#n24 4.0] <br><br><br> [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/usb/Kconfig?h=v4.7#n25 4.7] <br><br><br> [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/usb/Kconfig?h=v4.19#n31 4.19] <br><br><br><br><br><br><br> [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/usb/Kconfig?h=v5.11#n32 5.11] <br><br><br><br> [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/usb/Kconfig?h=v5.12#n32 5.12] <br><br> [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/usb/Kconfig?h=v5.14#n42 5.14] || | ||
+ | Leaf Light<br> | ||
+ | Leaf Professional {HS,LS,SWC,LIN}<br> | ||
+ | Leaf SemiPro {HS,LS,SWC}<br> | ||
+ | USBcan {Professional,R}<br> | ||
+ | Memorator {II, Professional} HS/HS<br> | ||
+ | Blackbird<br> | ||
+ | <br> | ||
+ | Leaf Light v2<br> | ||
+ | Memorator HS/{HS,LS}<br> | ||
+ | Mini PCI Express HS<br> | ||
+ | <br> | ||
+ | USBcan II HS/{HS,LS}<br> | ||
+ | USBcan R<br> | ||
+ | <br> | ||
+ | Mini PCI Express 2xHS<br> | ||
+ | USBcan Light 2xHS<br> | ||
+ | <br> | ||
+ | Leaf Pro HS v2<br> | ||
+ | Hybrid {,Pro} 2xCAN/LIN<br> | ||
+ | Memorator 2xHS v2<br> | ||
+ | Memorator Pro {2,5}xHS v2<br> | ||
+ | USBcan Light 4xHS<br> | ||
+ | USBcan Pro {2,5}xHS v2<br> | ||
+ | <br> | ||
+ | USBcan R v2<br> | ||
+ | Leaf Light R v2<br> | ||
+ | U100{,P,S}<br> | ||
+ | <br> | ||
+ | USBcan Pro 4xHS<br> | ||
+ | <br> | ||
+ | Hybrid {,Pro} CAN/LIN | ||
+ | |- | ||
+ | |[http://www.ems-wuensche.com EMS Wünsche] || [http://www.ems-wuensche.com/product/datasheet/html/can-pccard-laptop-notebook-adapter-cpccard.html CPC-Card] || ems_pcmcia || sja1000 || CONFIG_CAN_EMS_PCMCIA || 3.2 || discontinued | ||
+ | |||
+ | |- | ||
+ | |[http://www.ems-wuensche.com EMS Wünsche] || [http://www.ems-wuensche.com/product/datasheet/html/can-usb-adapter-converter-interface-cpcusb.html CPC-USB/ARM7] || ems_usb || (unknown) || CONFIG_CAN_EMS_USB || 3.2 || | ||
+ | |||
+ | |- | ||
+ | |[http://www.ems-wuensche.com EMS Wünsche] || [http://www.ems-wuensche.com/product/datasheet/html/can-pci-plugincard-multiple-channels-cpcpci.html CPC-PCI/PCIe] || ems_pci || sja1000 || CONFIG_CAN_EMS_PCI || 3.2 || up to four channel | ||
+ | |||
+ | |- | ||
+ | |[http://www.ems-wuensche.com EMS Wünsche] || [http://www.ems-wuensche.com/product/datasheet/html/can-pci-104-passive-plugincard-cpc104p.html CPC-PC104P] || ems_pci || sja1000 || CONFIG_CAN_EMS_PCI || 3.2 || up to four channel on a PC104+ board | ||
+ | |||
+ | |- | ||
+ | |[http://8devices.com 8devices] || [http://8devices.com/usb2can USB2CAN] || usb_8dev || (STR750FV2) || CONFIG_CAN_8DEV_USB || 3.9 || [https://github.com/krumboeck/usb2can STR750FV2 Firmware] | ||
+ | |||
+ | |- | ||
+ | |[http://www.softing.com Softing] || [http://automotive.softing.com/en/products/communication-interfaces-can.html CANcard2] || softing_cs || sja1000 or NEC-005(?) || CONFIG_CAN_SOFTING_CS || 2.6.38 || Supports {CAN,EDIC}card{,SJA,2} PCMCIA cards | ||
+ | Needs firmware [http://www.gitorious.org/linux-can/can-misc softing-fw-4.6-binaries.tar.gz] | ||
+ | |||
+ | |- | ||
+ | |[http://www.microchip.com Microchip] || [http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=APGDT002 CAN BUS Analyzer Tool] || mcba_usb || PIC18F2680 || CONFIG_CAN_MCBA_USB || 4.12 || [https://github.com/rkollataj/mcba_usb SocketCAN driver] | ||
+ | [https://github.com/rkollataj/mcba_firmware Improved firmware] | ||
+ | |||
+ | |- | ||
+ | |[http://www.fel.cvut.cz/en FEE CTU] || [http://canbus.pages.fel.cvut.cz/ctucanfd_ip_core/doc/Datasheet.pdf CTU CAN FD Core] || ctucanfd || [https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core CTU CAN FD Core] || CONFIG_CTUCANFD || [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/ctucanfd/Kconfig 5.19] || Open Source VHDL CAN FD IP Core - tested on | ||
+ | * [https://gitlab.fel.cvut.cz/canbus/zynq/zynq-can-sja1000-top Xilinx Zynq-7000] | ||
+ | * [https://gitlab.fel.cvut.cz/canbus/intel-soc-ctucanfd Intel Cyclone V DE0-Nano-SoC] | ||
+ | * [https://gitlab.fel.cvut.cz/canbus/pcie-ctucanfd Intel EP4CGX15 based DB4CGX15 PCIe board] | ||
+ | |||
+ | |- | ||
+ | |[https://linux-automation.com Linux Automation GmbH] <br> et al. || [https://linux-automation.com/en/products/candlelight.html candleLight] || [https://elixir.bootlin.com/linux/latest/source/drivers/net/can/usb/gs_usb.c gs_usb] || [https://www.st.com/en/microcontrollers-microprocessors/stm32f0-series.html STM32F07] || CONFIG_CAN_GS_USB || 3.16 || [https://github.com/HubertD/candleLight Open Hardware project by Hubert Denkmair] ([https://github.com/linux-automation/candleLight LXA variant]), with [https://github.com/candle-usb/candleLight_fw open source firmware] | ||
+ | |||
+ | |- | ||
+ | |[https://shop.dieselschrauber.org/en/can-usb-interface-kit-p-313.php CANhack RKS+CAN] || [https://www.canhack.de/viewtopic.php?t=2023 RKS+CAN] || slcan || sja1000 compatible || CONFIG_CAN_SLCAN || all || needs slcand<br><br>https://github.com/kaufmannr/dieselschrauber-can-rks-wrapper-for-csharp | ||
+ | |||
+ | |} | ||
==== SocketCAN Support in Programming Languages/Environments ==== | ==== SocketCAN Support in Programming Languages/Environments ==== | ||
Line 58: | Line 151: | ||
* [[Java]] | * [[Java]] | ||
* [[Python_Can | Python]] | * [[Python_Can | Python]] | ||
+ | * [https://github.com/rscada/libcanopen/ Python library for CAN] | ||
+ | * [http://lintarget.sourceforge.net/can_bus/index.html Matlab/Simulink blocks to send and receive CAN messages] | ||
+ | * [[TTCN | TTCN]] | ||
==== can4linux Supported Controllers ==== | ==== can4linux Supported Controllers ==== | ||
+ | * [http://linux-sunxi.org/A20 Allwinner A20] with integrated CAN (on the popular [http://www.lemaker.org/ BananaPi] single-board computer, BananaPi-Pro, Banana-Mberry, Olimex Olinux-A20) | ||
* Analog Devices BlackFin BF537 | * Analog Devices BlackFin BF537 | ||
* Atmel AT91 SoCs | * Atmel AT91 SoCs | ||
− | * Freescale FlexCAN (ColdFire 5282, i.MX25, i.MX28, i.MX35) | + | * [http://www.freescale.com/ Freescale] FlexCAN (ColdFire 5282, i.MX25, i.MX28, i.MX35) |
+ | * Intel 82527 (the replacement Bosch CC770 should work) | ||
* Microchip Stand Alone CAN MCP2515 | * Microchip Stand Alone CAN MCP2515 | ||
− | * NXP Stand Alone CAN SJA1000 (on different ISA or PCI/PCIe boards) | + | * NXP Stand Alone CAN [http://www.nxp.com/documents/data_sheet/SJA1000.pdf SJA1000] (on different ISA or PCI/PCIe boards) |
− | * Xilinx Zynq with XCAN | + | * [http://www.xilinx.com/products/intellectual-property/DO-DI-CAN.htm Xilinx] Zynq with XCAN |
* 'virtual' CAN mode without CAN hardware | * 'virtual' CAN mode without CAN hardware | ||
+ | * 'virtual' CAN mode supporting [http://www.can-wiki.info/doku.php?id=can_faq:can_fd CAN FD] | ||
+ | * [http://www.ifi-pld.de/IP/CANFD/canfd.html IFI CAN] FPGA IP, in classic CAN mode and CAN FD mode | ||
+ | * [https://www.kvaser.com/ KVASER] [https://www.kvaser.com/product/kvaser-pciecan-4xhs/ PCICan-4HS] with up to four classic CAN mode and CAN FD mode | ||
==== can4linux Support in Programming Languages/Environments ==== | ==== can4linux Support in Programming Languages/Environments ==== | ||
− | * [ | + | * C - many examples and useful applications are provided with the package, check can4linux-examples/ |
− | * [[ | + | * [https://en.wikipedia.org/wiki/Tcl Tcl/Tk] also in can4linux-examples/ |
+ | * [https://en.wikipedia.org/wiki/Python_(programming_language) Python] also in can4linux-examples/ | ||
+ | |||
+ | ==== CAN Controllers Emulation ==== | ||
+ | * SJA1000 CAN controller based PCI board emulation for QEMU | ||
+ | ** Cards models provided: | ||
+ | *** Kvaser PCIcan-S single I/O mapped SJA1000 model compatible with kvaser_pci Linux driver on guest side | ||
+ | *** Advantech PCM-3680i PCI CAN (dual SJA1000 channel) | ||
+ | *** MIOe-3680 PCI CAN (dual SJA1000 channel) | ||
+ | ** The emulated CAN buses can be connected to virtual or physical SocketCAN interface if Linux is used as host system | ||
+ | ** The work has been integrated into QEMU mainline and will be included in QEMU 3.0 release | ||
+ | ** Documentation of CAN Bus emulation is included in the QEMU manual [https://www.qemu.org/docs/master/system/devices/can.html CAN Bus Emulation Support] chapter | ||
+ | ** Original project repository: [https://gitlab.fel.cvut.cz/canbus/qemu-canbus https://gitlab.fel.cvut.cz/canbus/qemu-canbus] branch [https://gitlab.fel.cvut.cz/canbus/qemu-canbus/-/tree/can-pci can-pci] | ||
+ | ** Work started by 2013 GSoC project when RTEMS project donated its slot to work on QEMU CAN support - see [https://devel.rtems.org/wiki/Developer/Simulators/QEMU/CANEmulation RTEMS related page] for more info and use instructions | ||
+ | ** RTLWS 17 article introducing [http://cmp.felk.cvut.cz/~pisa/can/doc/rtlws-17-pisa-qemu-can.pdf QEMU CAN emulation] | ||
+ | ** [https://www.linuxdays.cz/2017/ LinuxDays 2017] presentation [https://www.linuxdays.cz/2017/video/Pavel_Pisa-CAN_canopen.pdf GNU/Linux, CAN and CANopen in Real-time Control Applications] includes description how to emulate PCI GPIO cards and PCI CAN interface in QEMU system and interconnect that all through [https://www.comedi.org/ COMEDI] and [http://ortcan.sourceforge.net/ OrtCAN] compoanents to implement complete virtual CANopen node | ||
+ | * CTU CAN FD core emulation and CAN FD host SoketCAN support | ||
+ | ** Development version ctu-canfd of [https://gitlab.fel.cvut.cz/canbus/qemu-canbus/-/tree/ctu-canfd https://gitlab.fel.cvut.cz/canbus/qemu-canbus] repository | ||
+ | ** [https://git.qemu.org/?p=qemu.git;a=commit;h=aa406e8b7ecde584dd75fc545c41d28db7fd1082 Accepted] in QEMU mainline | ||
+ | ** [https://docs.kernel.org/networking/device_drivers/can/ctu/ctucanfd-driver.html CTU CAN FD Driver Documentation] | ||
+ | ==== SocketCAN Bechmarking ==== | ||
+ | * [https://canbus.pages.fel.cvut.cz/can-latester/ Daily Mainline and Preempt-RT Kernel CAN (FD) Latency Results] | ||
+ | * [https://gitlab.fel.cvut.cz/canbus/can-benchmark/can-latester CTU CAN Bus Latency Tester Tools Project] | ||
+ | * Old stalled projects [http://rtime.felk.cvut.cz/can/benchmark/3.0/ CAN gateway timing analysis] and [http://rtime.felk.cvut.cz/gitweb/can-benchmark.git repository with old benchmark infrastructure] | ||
==== SocketCAN Tutorials ==== | ==== SocketCAN Tutorials ==== | ||
+ | * [[Bringing CAN interface up]] | ||
* [[can-utils]] | * [[can-utils]] | ||
* [[libsocketcan]] | * [[libsocketcan]] | ||
* [[libnl]] | * [[libnl]] | ||
+ | |||
+ | === CAN tools === | ||
+ | * [https://github.com/GENIVI/CANdevStudio CANdevStudio] is a Qt based tool that aims to provide easy to use and comprehensive CAN bus simulation environment. Supports variety of different CAN controllers. Works on Linux, Windows and macOS. | ||
[[Category:Networking]] | [[Category:Networking]] | ||
+ | [[Category:Automotive]] |
Latest revision as of 03:34, 12 March 2024
Contents
- 1 Overview
- 2 CAN Support in Linux
- 2.1 SocketCAN Supported Protocols
- 2.2 SocketCAN Supported Controllers
- 2.3 SocketCAN Support in Programming Languages/Environments
- 2.4 can4linux Supported Controllers
- 2.5 can4linux Support in Programming Languages/Environments
- 2.6 CAN Controllers Emulation
- 2.7 SocketCAN Bechmarking
- 2.8 SocketCAN Tutorials
- 3 CAN tools
Overview
The CAN bus is an ISO standard bus originally developed for vehicles. It manages the Chassis Electrical System Control and is responsible for critical activities like engine electrical, and skid control. This system is also used to provide vehicle diagnostic information for maintenance. A multi-star configuration seems typical of this bus with a primary bus line that branches into sub bus lines at its extremities then attaches to multiple device nodes. Differential voltage is applied over twisted pair at 1.5 to 2.5V and 2.5 to 3.5V for noise resistant signaling. Bit rates up to 1 Mbit/s are possible at network lengths below 40 m. Decreasing the bit rate allows longer network distances (e.g., 500 m at 125 kbit/s). (Jeremiah J. Flerchinger Source) Controllers supporting CAN FD, an enhanced CAN version with frames up to 64 byte and bit rates up to 4 Mbit/s, will be available in the second half of 2014. A can4linux version supportig CAN FD on a IFI CAN is ready to be used.
Although developed as car communication network CAN is used in many other areas, industrial, medical, maritime laboratory and more. Most often with a CAN based higher layer protocol like CANopen on top of it.
Additional information can be found at:
- http://en.wikipedia.org/wiki/CAN_bus
- CiA CAN in Automation CAN user association
- CAN Wiki
CAN Support in Linux
CAN is supported by Linux device drivers. Mainly two types exist. Character device based drivers and network socket based drivers. The Linux kernel supports CAN with the SocketCAN framework.
- SocketCAN Documentation
- mailing list for Linux Kernel CAN development
- linux-can git repository
- linux-can-next git repository
One of the character based drivers is can4linux.
- can4linux documentation
- GitLab project page (Old: SourceForge project page)
- German Wikipedia article
- English Wikipedia article
SocketCAN Supported Protocols
- RAW: send & receive raw CAN frames
- BCM: Broadcast manager, offload repetitive work to the Linux kernel
- ISOTP ...
- SAE J1939
SocketCAN Supported Controllers
- Microchip MCP251x
- Atmel AT91 SoCs
- ESD 331 CAN Cards
- NXP (Philips) SJA1000
- Freescale MPC52xx SoCs
- Bosch CC770
- Intel AN82527
- TIs SoCs
- Serial/network devices utilizing ASCII protocol (slcan driver)
Vendor | Device Name | Driver Module Name | Controller | Kconfig Option | Linux Mainline | Remarks |
---|---|---|---|---|---|---|
VScom | NetCAN Plus 110 | slcan | (unknown) | CONFIG_CAN_SLCAN | 2.6.38 | needs slcand and socat |
VScom | USB-CAN Plus | slcan | SJA1000T | CONFIG_CAN_SLCAN | 2.6.38 | needs slcand |
LAWICEL | CAN232 | slcan | (unknown) | CONFIG_CAN_SLCAN | 2.6.38 | needs slcand |
LAWICEL | CANUSB | slcan | (unknown) | CONFIG_CAN_SLCAN | 2.6.38 | needs slcand |
TITAN | USB-CAN | slcan | (unknown) | CONFIG_CAN_SLCAN | 2.6.38 | needs slcand |
PEAK | PCAN-PCI | peak_pci | sja1000 | CONFIG_CAN_PEAK_PCI | 3.2 | supports all PCAN-[mini]PCI[e][104] variants |
PEAK | PCAN-USB | peak_usb | (unknown) | CONFIG_CAN_PEAK_USB | 3.4 | supports PCAN-USB[pro][hub] (no LIN support) |
Kvaser | PCIcanx | kvaser_pci | sja1000 | CONFIG_CAN_KVASER_PCI | 2.6.31 | supports all PCI-[mini]PCI[e][104] variants |
Kvaser | PCIe products | kvaser_pciefd | Kvaser kcan | CAN_KVASER_PCIEFD | 5.4 6.6 |
PCIEcan 4xHS PCIEcan 2xHS v2 PCIEcan HS v2 Mini PCI Express HS v2 Mini PCI Express 2xHS v2 PCIEcan 1xCAN v3 PCIEcan 2xCAN v3 PCIEcan 4xCAN v2 Mini PCI Express 1xCAN v3 Mini PCI Express 2xCAN v3 |
Kvaser | USB products | kvaser_usb | (unknown) | CONFIG_CAN_KVASER_USB | 3.8 3.16 4.0 4.7 4.19 5.11 5.12 5.14 |
Leaf Light |
EMS Wünsche | CPC-Card | ems_pcmcia | sja1000 | CONFIG_CAN_EMS_PCMCIA | 3.2 | discontinued |
EMS Wünsche | CPC-USB/ARM7 | ems_usb | (unknown) | CONFIG_CAN_EMS_USB | 3.2 | |
EMS Wünsche | CPC-PCI/PCIe | ems_pci | sja1000 | CONFIG_CAN_EMS_PCI | 3.2 | up to four channel |
EMS Wünsche | CPC-PC104P | ems_pci | sja1000 | CONFIG_CAN_EMS_PCI | 3.2 | up to four channel on a PC104+ board |
8devices | USB2CAN | usb_8dev | (STR750FV2) | CONFIG_CAN_8DEV_USB | 3.9 | STR750FV2 Firmware |
Softing | CANcard2 | softing_cs | sja1000 or NEC-005(?) | CONFIG_CAN_SOFTING_CS | 2.6.38 | Supports {CAN,EDIC}card{,SJA,2} PCMCIA cards
Needs firmware softing-fw-4.6-binaries.tar.gz |
Microchip | CAN BUS Analyzer Tool | mcba_usb | PIC18F2680 | CONFIG_CAN_MCBA_USB | 4.12 | SocketCAN driver |
FEE CTU | CTU CAN FD Core | ctucanfd | CTU CAN FD Core | CONFIG_CTUCANFD | 5.19 | Open Source VHDL CAN FD IP Core - tested on |
Linux Automation GmbH et al. |
candleLight | gs_usb | STM32F07 | CONFIG_CAN_GS_USB | 3.16 | Open Hardware project by Hubert Denkmair (LXA variant), with open source firmware |
CANhack RKS+CAN | RKS+CAN | slcan | sja1000 compatible | CONFIG_CAN_SLCAN | all | needs slcand https://github.com/kaufmannr/dieselschrauber-can-rks-wrapper-for-csharp |
SocketCAN Support in Programming Languages/Environments
- Android
- Java
- Python
- Python library for CAN
- Matlab/Simulink blocks to send and receive CAN messages
- TTCN
can4linux Supported Controllers
- Allwinner A20 with integrated CAN (on the popular BananaPi single-board computer, BananaPi-Pro, Banana-Mberry, Olimex Olinux-A20)
- Analog Devices BlackFin BF537
- Atmel AT91 SoCs
- Freescale FlexCAN (ColdFire 5282, i.MX25, i.MX28, i.MX35)
- Intel 82527 (the replacement Bosch CC770 should work)
- Microchip Stand Alone CAN MCP2515
- NXP Stand Alone CAN SJA1000 (on different ISA or PCI/PCIe boards)
- Xilinx Zynq with XCAN
- 'virtual' CAN mode without CAN hardware
- 'virtual' CAN mode supporting CAN FD
- IFI CAN FPGA IP, in classic CAN mode and CAN FD mode
- KVASER PCICan-4HS with up to four classic CAN mode and CAN FD mode
can4linux Support in Programming Languages/Environments
- C - many examples and useful applications are provided with the package, check can4linux-examples/
- Tcl/Tk also in can4linux-examples/
- Python also in can4linux-examples/
CAN Controllers Emulation
- SJA1000 CAN controller based PCI board emulation for QEMU
- Cards models provided:
- Kvaser PCIcan-S single I/O mapped SJA1000 model compatible with kvaser_pci Linux driver on guest side
- Advantech PCM-3680i PCI CAN (dual SJA1000 channel)
- MIOe-3680 PCI CAN (dual SJA1000 channel)
- The emulated CAN buses can be connected to virtual or physical SocketCAN interface if Linux is used as host system
- The work has been integrated into QEMU mainline and will be included in QEMU 3.0 release
- Documentation of CAN Bus emulation is included in the QEMU manual CAN Bus Emulation Support chapter
- Original project repository: https://gitlab.fel.cvut.cz/canbus/qemu-canbus branch can-pci
- Work started by 2013 GSoC project when RTEMS project donated its slot to work on QEMU CAN support - see RTEMS related page for more info and use instructions
- RTLWS 17 article introducing QEMU CAN emulation
- LinuxDays 2017 presentation GNU/Linux, CAN and CANopen in Real-time Control Applications includes description how to emulate PCI GPIO cards and PCI CAN interface in QEMU system and interconnect that all through COMEDI and OrtCAN compoanents to implement complete virtual CANopen node
- Cards models provided:
- CTU CAN FD core emulation and CAN FD host SoketCAN support
- Development version ctu-canfd of https://gitlab.fel.cvut.cz/canbus/qemu-canbus repository
- Accepted in QEMU mainline
- CTU CAN FD Driver Documentation
SocketCAN Bechmarking
- Daily Mainline and Preempt-RT Kernel CAN (FD) Latency Results
- CTU CAN Bus Latency Tester Tools Project
- Old stalled projects CAN gateway timing analysis and repository with old benchmark infrastructure
SocketCAN Tutorials
CAN tools
- CANdevStudio is a Qt based tool that aims to provide easy to use and comprehensive CAN bus simulation environment. Supports variety of different CAN controllers. Works on Linux, Windows and macOS.