Port Linux CAN can4linux / CANopen Driver

The universal LINUX CAN device driver can4linux supports a broad range of CAN interfaces. ports AT-CAN-MINI is supported as well as a a bunch of interfaces from other manufacturers. Source code of the software is available. It compiles for Kernels 2.0, 2.2 2.4 and latest 2.6.

An derived version for embedded Linux-devices using micro controllers with integrated CAN or with external stand alone CAN controllers is available too. This one is configured at compile time for a specific hardware architecture.

can4linux is an universal LINUX™ device driver. It can be used to control ISA or PCI interface boards with CAN interface, or embedded CAN controller solutions. The GPLed sources are currently supporting CAN controllers (Philips SJA1000, Intel 82527, Infineon SAK82C900 and Motorola FlexCAN, TwinCAN). The driver can be compiled for all LINUX™ kernel versions 2.4 to 2.6. (older version for kernel versions 2.0 to 2.2 are available.)

Application

The can4linux Project started already in 1997 in cooperation with the LINUX™ LLP project to control laboratory or automation devices via CAN. Derived from this driver is the new can4linux version line 2.x and follow-up. Designed to be used in embedded applications as well as on the desktop this version is configured at compile time for the right hardware. Originally with support only for SJA1000 there is now support for Intels 82527 and new support for Infineons TwinCAN. Within the scope of the uClinux project a version supporting Motorolas FlexCAN was created.

Driver Interface

Using the LINUX™ kernels /proc interface, the driver is highly configurable. The driver is controlled by the standard driver functions open(), close(), read(), write() and ioctl().
Any number of CAN interfaces can be accessed using the device nodes /dev/can0 ... /dev/cann. can4linux uses the device major number 91.

Hardware

The driver supports different interface boards, ISA, PCI or PC-104, with one or two channels.

  • port AT-CAN-MINI (PeliCAN mode 29bit)
  • EMS CPC-PCI
  • IXXAT PCI03 (only SJA1000)
  • Advantech Pcm-3680 (PC 104)
  • DIL-NET TRM/816
  • DigiTec PCMatic® Feldbusmodul FC-CAN
  • ESD PC104/200
  • Blackfin BF534/536

Originally the driver worked only on Intel-based PCs. In the mean time we have gained experiences with porting this driver also to embedded LINUX™ architectures. One is a PowerPC 863e with two Intel 82527 controllers, the other is ARM based with an external SJA1000, the microcontroller XC164CS with TwinCAN controller or the NetARM 150 with its four internal CAN channels.

Available Products

can4linux can be used as CAN interface for different products of port. Some of these tools are available as demo versions, to be downloaded from our web site.

The simplest application with access to the CAN layer-2, that means transmit and receive CAN messages, is horch. It can be started interactively within an xterm or in the background as TCP/IP Server. For this server a graphical and programmable CAN-analyzer application CAN-REport is available too.

To implement CANopen protocols for devices in CANopen networks, an ANSI-C communication library is available for development of own applications. Based on the library code, a so-called CANopen Server application is available. The Server provides easy access to CANopen services through a TCP/IP socket interface.

More view

Technical Support

Tecnologix offers support which is directly handled by development team. Do not hesitate to get in touch with our experts.

Just ask here