9 destinations

← CAN bus guides

SLCAN vs gs_usb for SocketCAN

Compare serial-line CAN and native gs_usb paths, identify the connected firmware and driver, and record capture evidence before choosing an adapter.

SLCAN and gs_usb can both lead to SocketCAN, but they reach the Linux network stack through different host and firmware paths. Identify that path before comparing adapters.

1. Two paths to a CAN network interface

SLCAN carries CAN commands and frames over a serial device. On Linux, the slcand utility can attach that TTY to the kernel’s serial-line CAN driver and expose a CAN network interface. The stock CANable firmware is one published example of this route.

gs_usb is a USB CAN protocol used by the Linux gs_usb driver. Compatible candleLight firmware can enumerate as a CAN network interface without the serial daemon. The candleLight project documents compatibility with several STM32-based adapters, while also publishing hardware and timestamp limitations.

Both paths can end at tools such as candump and cansend. That shared endpoint does not make the transport, buffering or firmware behavior identical.

2. Identify hardware and firmware first

lsusb
dmesg --follow
ls -l /dev/ttyACM* /dev/ttyUSB* 2>/dev/null
ip -details link show type can

A new /dev/ttyACM0 or /dev/ttyUSB0 suggests a serial path, but confirm the USB descriptors and vendor documentation. A new can0 may indicate a native CAN driver such as gs_usb. Do not flash firmware just to make the name match a tutorial; record the original revision and recovery method first.

3. Bring up a documented SLCAN device

The linux-can slcand usage maps named speed codes to CAN bitrates. Use the code specified by the adapter documentation; do not copy a command without confirming the intended bitrate and serial device.

sudo slcand -o -c -f -s6 /dev/ttyACM0 can0
sudo ip link set can0 up
ip -details -statistics link show can0
candump -L can0

The example above follows the published slcand form and uses -s6, commonly documented as 500 kbit/s by compatible device projects. Your firmware may use a different command set or serial bitrate. If frames are missing, capture the TTY identity, daemon command, CAN state and adapter firmware before changing several variables at once.

4. Bring up a gs_usb device

sudo ip link set can0 down
sudo ip link set can0 type can bitrate 500000 restart-ms 100
sudo ip link set can0 up
ip -details -statistics link show can0
candump -L can0

SocketCAN configures CAN interfaces through the Linux networking stack. The interface statistics can expose dropped packets, errors and state changes that a graphical trace alone may hide. Driver presence still does not prove that every firmware feature is implemented correctly.

CAN FD must be verified separately. The CANable site, for example, states that CANable 2.0 supports FD through an initial SLCAN path while its candleLight firmware currently does not support FD frames. That is why “same hardware, different firmware” can change the supported frame set.

5. Compare the path, not the acronym

On a narrow screen, scroll the comparison horizontally.

Question SLCAN path gs_usb path
Host endpoint before attach Serial TTY USB CAN device
Linux bridge slcand / SLCAN driver gs_usb driver
SocketCAN endpoint CAN netdevice after attach CAN netdevice after enumeration
Main evidence TTY, UART settings, daemon and firmware USB ID, driver, firmware and kernel
CAN FD Firmware-specific Hardware- and firmware-specific
Capture quality Must be measured under the same traffic, host and loss-detection method

A repeatable evaluation record

  • adapter model, PCB revision, serial number and firmware hash;
  • USB identifiers and Linux kernel version;
  • exact bring-up commands and CAN bitrate;
  • traffic generator, bus load, run duration and expected frame count;
  • received count, drops, error frames, bus state and timestamp method;
  • disconnect, reconnect and recovery behavior.

Choose the driver path before the enclosure

Continue with the python-can backend buyer guide, Linux SocketCAN setup or missing-frame diagnostic tree. The MallMars pilot asks for the exact driver and firmware path before claiming compatibility.

Primary references