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 https://github.com/latonita/arduino-canbus-monitor

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

Bus

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

Bases: can.bus.BusABC

slcan interface

Parameters:
  • channel (string) – port of underlying serial or usb device (e.g. /dev/ttyUSB0, COM8, …)
  • 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
:param float timeout
timeout in seconds when reading message

Internals

Todo

Implement and document slcan interface.