CAN over Serial / SLCAN

A text based interface: compatible to slcan-interfaces (slcan ASCII protocol) should also support LAWICEL direct. These interfaces can also be used with socketcan and slcand with Linux. This driver directly uses the serial port, it makes slcan-compatible interfaces usable with Windows also. Hint: Arduino-Interface could easyly be build

Usage: use port[@baurate] to open the device. For example use /dev/ttyUSB0@115200 or COM4@9600


class can.interfaces.slcan.slcanBus(channel, ttyBaudrate=115200, timeout=1, bitrate=None, **kwargs)[source]

Bases: can.bus.BusABC

slcan interface

  • channel (string) – port of underlying serial or usb device (e.g. /dev/ttyUSB0, COM8, …) Must not be empty.
  • ttyBaudrate (int) – baudrate of underlying serial or usb device
  • bitrate (int) – Bitrate in bits/s
  • poll_interval (float) – Poll interval in seconds when reading messages
  • timeout (float) – timeout in seconds when reading message



Document internals of slcan interface.