Skip to main content

Channel Compatibility (PCAN + slcan + Damiao Serial Bridge)

  • Linux SocketCAN uses interface names directly: can0, can1, slcan0.
  • For USB-serial CAN adapters, bring up slcan0 first: sudo slcand -o -c -s8 /dev/ttyUSB0 slcan0 && sudo ip link set slcan0 up.
  • Damiao-only serial bridge transport is also available in CLI (--transport dm-serial --serial-port /dev/ttyACM0 --serial-baud 921600).
  • On Linux SocketCAN, do not append bitrate in --channel (for example can0@1000000 is invalid).
  • On Windows (PCAN backend), can0/can1 map to PCAN_USBBUS1/2; optional @bitrate suffix is supported.
For full cross-platform diagnostics (Linux slcan + Windows pcan), see can_debugging.md. This guide explains how to ship and consume motorbridge on Windows.

Artifact Matrix

  • Python users:
    • install .whl (motorbridge-<ver>-cp3xx-...-win_amd64.whl)
  • C/C++ users:
    • use ABI .zip (motorbridge-abi-<ver>-windows-x86_64.zip)
  • Linux-only package:
    • .deb is for Ubuntu/Linux and is not installable on Windows
  • MSI:
    • optional convenience installer, not required for SDK usage

Runtime Dependencies

  • PEAK PCAN driver installed
  • PCANBasic.dll available from PCAN-Basic runtime

Build Windows ABI Locally

Expected output:
  • target/release/motor_abi.dll
  • target/release/motor_abi.lib

Build Windows Python Wheel Locally

Notes:
  • The wheel build now embeds the ABI DLL automatically.
  • If the ABI DLL cannot be found, wheel build fails fast with a clear error.

Install and Verify Python SDK

Install and Verify C/C++ ABI

  1. Download motorbridge-abi-<ver>-windows-x86_64.zip.
  2. Extract include/lib to your dependency folder.
  3. Link motor_abi.dll + import lib in your project.
Minimal ctypes verification:

Channel and Bitrate Conventions on Windows

  • can0 maps to PCAN_USBBUS1
  • can1 maps to PCAN_USBBUS2
  • Add bitrate as suffix: can0@1000000