The latest development version of this page may be more current than this released 4.0.0 version.

CANnectivity USB to CAN adapter firmware

Introduction

CANnectivity is an open source firmware for Universal Serial Bus (USB) to Controller Area Network (CAN) adapters.

The firmware implements the Geschwister Schneider USB/CAN device protocol (often referred to as “gs_usb”). This protocol is supported by the Linux kernel SocketCAN gs_usb driver, by python-can, and by many other software packages.

The firmware, which is based on Zephyr RTOS, allows turning your favorite microcontroller development board into a full-fledged USB to CAN adapter.

CANnectivity is licensed under the Apache-2.0 license.

Usage with Zephyr

The CANnectivity firmware repository is a Zephyr module which allows for reuse of its components (i.e. the “gs_usb” protocol implementation) outside of the CANnectivity firmware application.

To pull in CANnectivity as a Zephyr module, either add it as a West project in the west.yaml file or pull it in by adding a submanifest (e.g. zephyr/submanifests/cannectivity.yaml) file with the following content and run west update:

manifest:
  projects:
    - name: cannectivity
      url: https://github.com/CANnectivity/cannectivity.git
      revision: main
      path: custom/cannectivity # adjust the path as needed

Once CANnectivity is added as a Zephyr module, the “gs_usb” implementation can be reused outside of the CANnectivity firmware application by including its header:

#include <cannectivity/usb/class/gs_usb.h>

Please see the header file for the API details.