Can4linux

Can4linux is an open source - CAN device driver for the Linux kernel. Development began in the mid-1990s for the CAN controller chip Philips 82C200 on an ISA board AT -CAN -MINI. The first version was built around 1995 as part of the Linux Lab project at the Free University Berlin in order to use them under Linux the CAN bus in the laboratory automation.

Due to the increasing prevalence of CAN in automation technology especially for embedded systems where, since the turn of the millennium enhanced Linux is also used as the basis for device drivers is higher CAN based protocols such as CANopen, J1939 and DeviceNet. an increased importance.

In addition to the NXP SJA1000 CAN controller, as successor to the Philips 82C200 and the Intel 82527 were from 2005 reinforced adjustments for so-called integrated CAN controller in powerful microcontrollers, the Linux ports exist, created. As examples, here are the Freescale ColdFire processors or ARM derivatives of ATMEL and Freescale but also the Stand-Alone CAN Controller MCP2515 connected via the SPI bus serve. A list can be found on the project page can4linux. The latest version supports a virtual CAN mode in which that applications can exchange messages only via the CAN driver without special CAN hardware. In this mode, the frame format for CAN FD is already implemented, which allows data lengths up to 64 bytes.

Use

The application software opens a CAN Device Descriptor and gets a file descriptor. About this CAN frames are forwarded through the standard operating system functions read () and write () with other participants exchanged on the CAN bus.

The following code is an example that sends a frame and then waits for a frame of a different bus participants. More examples can be found on the project page.

Pictures of Can4linux

160804
de