Robotell CAN-USB interface#

An USB to CAN adapter sold on Aliexpress, etc. with the manufacturer name Robotell printed on the case. There is also a USB stick version with a clear case. If the description or screenshots refer to EmbededDebug or EmbededConfig the device should be compatible with this driver. These USB devices are based on a STM32 controller with a CH340 serial interface and use a binary protocol - NOT compatible with SLCAN

See for some background on these devices.

This driver directly uses either the local or remote (not tested) serial port. Remote serial ports will be specified via special URL. Both raw TCP sockets as also RFC2217 ports are supported.

Usage: use port or URL[@baurate] to open the device. For example use /dev/ttyUSB0@115200 or COM4@9600 for local serial ports and socket:// or rfc2217:// for remote ports.


class can.interfaces.robotell.robotellBus(channel, ttyBaudrate=115200, bitrate=None, rtscts=False, **kwargs)[source]#

robotell interface

  • channel (str) – port of underlying serial or usb device (e.g. /dev/ttyUSB0, COM8, …) Must not be empty. Can also end with @115200 (or similarly) to specify the baudrate.

  • ttyBaudrate (int) – baudrate of underlying serial or usb device (Ignored if set via the channel parameter)

  • bitrate (int) – CAN Bitrate in bit/s. Value is stored in the adapter and will be used as default if no bitrate is specified

  • rtscts (bool) – turn hardware handshake (RTS/CTS) on and off


Get serial number of the slcan interface.


timeout (int | None) – seconds to wait for serial number or None to wait indefinitely


None on timeout or a str object.

Return type:

str | None

send(msg, timeout=None)[source]#

Transmit a message to the CAN bus.

Override this method to enable the transmit path.

  • msg (Message) – A message object.

  • timeout – If > 0, wait up to this many seconds for message to be ACK’ed or for transmit queue to be ready depending on driver implementation. If timeout is exceeded, an exception will be raised. Might not be supported by all interfaces. None blocks indefinitely.


CanOperationError – If an error occurred while sending


auto_man (bool) – Enable/disable automatic bus management


retrans_flag (bool) – Enable/disable automatic retransmission of unacknowledged CAN frames


ValueError – if bitrate is greater than 1000000


bitrate (int) – Bitrate in bit/s

set_hw_filter(filterid, enabled, msgid_value, msgid_mask, extended_msg)[source]#

ValueError – if filterid is not between 1 and 14

  • filterid (int) – ID of filter (1-14)

  • enabled (bool) – This filter is enabled

  • msgid_value (int) – CAN message ID to filter on. The test unit does not accept an extented message ID unless bit 31 of the ID was set.

  • msgid_mask (int) – Mask to apply to CAN messagge ID

  • extended_msg (bool) – Filter operates on extended format messages


serial_bps (int) – Set the baud rate of the serial port (not CAN) interface


Called to carry out any interface specific cleanup required in shutting down a bus.

This method can be safely called multiple times.