Skip to content

cyborg-dynamics-engineering/win-can-utils

Windows CAN Utils

Windows CAN Utils provides a Windows-compatible equivalent of can-utils, offering command-line tools to interact with CAN devices via USB-to-CAN adapters.

Currently supported adapters include:

⚠️ Note: If this project interests you, check out our related project CyderVis for CAN data visualization.

Table of Contents

Installation

  1. Download the latest .msi installer from the Releases page.
  2. Run the installer and follow the setup prompts.
  3. If using a PEAK-System adapter, install the optional PCANBasic.dll runtime dependency (see PCAN-Basic Dependency).

Tip: Run the installer with administrator privileges to avoid driver or permission issues.

PCAN-Basic Dependency

PEAK-System CAN adapters require the PCAN-Basic API runtime library.
Other adapters do not require this dependency.

To install:

  1. Download the latest PCAN-Basic package from PEAK-System.
  2. Accept the End User License Agreement (EULA).
    • Installing or using PCANBasic.dll implies acceptance of the terms.
  3. Extract PCANBasic.dll and place it in:
    • The same directory as the Windows CAN Utils executables, or
    • Any directory included in your system PATH.
  4. Restart Windows CAN Utils processes to ensure the DLL is loaded.

Disclaimer: Windows CAN Utils is not affiliated with or endorsed by PEAK-System Technik GmbH. Ensure compliance with their license terms.

Usage

CAN Server

Opens a CAN connection to a USB-to-CAN adapter and exposes it via a Windows pipe.
The interface can be auto-detected or specified manually. Bitrate usually must be specified unless supported auto-detect exists.

Usage: canserver <driver> [--channel <channel> --bitrate <bitrate>]
Example: canserver gsusb --bitrate 1000000

Supported drivers:

  • gsusb → CANable / candleLight adapters (gs_usb protocol)
  • slcan → Serial-line CAN adapters
  • pcan → PEAK PCAN-USB/PCI/LAN adapters (requires PCAN-Basic Dependency)

CAN Dump

Displays real-time CAN traffic from an open CAN pipe.

Usage: candump <port>
Example: candump can0

⚠️ Requires an active CAN server instance for the target port.

CAN Send

Sends the given CAN frame to an open CAN pipe.

Usage: cansend <port> <ID#DATA>
Example: cansend COM5 055#00

⚠️ Requires an active CAN server instance for the target port.

Canable Firmware Installation

Some Canable devices may not ship with the correct firmware.
We provide a flashing tool for devices using the STM32F072 microcontroller (e.g., the DSD Tech SH-C30A).

⚠️ Both tools rely on WebDFU, which is supported only in Google Chrome.

Flashing Steps

  1. Unplug the adapter from your PC.

  2. Toggle the boot switch to On (see picture).

  3. Plug the adapter back in.

  4. Open the Canable Flasher and flash the firmware.

  5. Wait for the flash to complete. (Ignore non-critical error messages.)

  6. Set the boot switch back to Off.

  7. Unplug and reconnect the adapter.

  8. Test by starting a can_server session to verify success.

Installing WinUSB Driver for Canable Devices

Canable devices on Windows use the WinUSB driver.
This may need to be installed manually, especially when in bootloader mode.

Steps

  1. Open Device Manager

    • Press Win+R, type devmgmt.msc, and press Enter.
  2. Locate the device

    • If missing a driver, it will appear under Other devices.

    Device Manager - Other Devices

  3. Install WinUSB

    • Right-click device → Update Driver
    • Choose:
      Browse my computer → Let me pick → Universal Serial Bus devices → WinUsb Device → Next

    Update Driver - WinUSB Selection

  4. Verify installation

    • The device should now appear under Universal Serial Bus devices.

License

Windows CAN Utils is dual-licensed under:

You may choose either license.

Developers

Contribution

By submitting a contribution, you agree it will be dual-licensed under the same terms (Apache 2.0 and MIT), without additional restrictions.

Install from Source (Cargo)

cd win_can_utils
cargo install --path .

Generating an MSI Installer

  1. Install cargo-wix:
cargo install cargo-wix
  1. Download WiX3 binaries from: https://github.com/wixtoolset/wix3/releases
  • Extract (e.g., C:\Program Files\WiX Toolset v4.0\bin\)
  • Add the bin directory to your PATH environment variable
  1. Generate the MSI file:
cargo wix

About

Windows CAN utilities for serial CAN ports

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE.rtf
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •  

Languages