{"id":42019093,"url":"https://github.com/vectorgrp/sil-kit-adapters-vcan","last_synced_at":"2026-01-26T03:30:57.205Z","repository":{"id":180704535,"uuid":"647750549","full_name":"vectorgrp/sil-kit-adapters-vcan","owner":"vectorgrp","description":"A collection of software to connect virtual CAN devices under Linux to the Vector SIL Kit","archived":false,"fork":false,"pushed_at":"2025-12-12T09:18:38.000Z","size":318,"stargazers_count":11,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-13T18:40:11.136Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vectorgrp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-31T12:51:34.000Z","updated_at":"2025-12-12T09:16:44.000Z","dependencies_parsed_at":"2024-03-28T10:26:14.963Z","dependency_job_id":"52e3b52b-7a7a-4655-9691-228acaf25cf6","html_url":"https://github.com/vectorgrp/sil-kit-adapters-vcan","commit_stats":null,"previous_names":["vectorgrp/sil-kit-adapters-vcan"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/vectorgrp/sil-kit-adapters-vcan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorgrp%2Fsil-kit-adapters-vcan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorgrp%2Fsil-kit-adapters-vcan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorgrp%2Fsil-kit-adapters-vcan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorgrp%2Fsil-kit-adapters-vcan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vectorgrp","download_url":"https://codeload.github.com/vectorgrp/sil-kit-adapters-vcan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorgrp%2Fsil-kit-adapters-vcan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28765881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:19:35.311Z","status":"ssl_error","status_checked_at":"2026-01-26T03:19:13.815Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-26T03:30:57.146Z","updated_at":"2026-01-26T03:30:57.198Z","avatar_url":"https://github.com/vectorgrp.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vector SIL Kit Adapter for virtual CAN (Linux only)\n[![Vector Informatik](https://img.shields.io/badge/Vector%20Informatik-rgb(180,0,50))](https://www.vector.com/int/en/)\n[![SocialNetwork](https://img.shields.io/badge/vectorgrp%20LinkedIn®-rgb(0,113,176))](https://www.linkedin.com/company/vectorgrp/)\\\n[![ReleaseBadge](https://img.shields.io/github/v/release/vectorgrp/sil-kit-adapters-vcan.svg)](https://github.com/vectorgrp/sil-kit-adapters-vcan/releases)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/vectorgrp/sil-kit-adapters-vcan/blob/main/LICENSE)\n[![Linux Builds](https://github.com/vectorgrp/sil-kit-adapters-vcan/actions/workflows/build-linux-release.yml/badge.svg)](https://github.com/vectorgrp/sil-kit-adapters-vcan/actions/workflows/build-linux-release.yml)\\\n[![SIL Kit](https://img.shields.io/badge/SIL%20Kit-353b42?logo=github\u0026logoColor=969da4)](https://github.com/vectorgrp/sil-kit)\n[![SocketCAN](https://img.shields.io/badge/SocketCAN-353b42?logo=linux)](https://docs.kernel.org/networking/can.html)\n\nThis collection of software is provided to illustrate how the [Vector SIL Kit](https://github.com/vectorgrp/sil-kit/)\ncan be attached to a virtual CAN (Controller Area Network) interface [SocketCAN](https://docs.kernel.org/networking/can.html) running in Linux kernel.\n\nThis repository contains instructions to build the adapter and set up a minimal working development environment.\n\nThe main contents are working examples of necessary software to connect the running system to a SIL Kit environment,\nas well as complimentary demo applications for some communication to happen.\n\nThose instructions assume you use a Linux OS (or a virtual machine running a Linux image) for building and running the adapter and use ``bash`` as your interactive\nshell. \n\n**Note:** WSL/WSL2 are excluded from this context as their standard kernels don't support SocketCAN.   \n\n## a) Getting Started with self-built Adapter and Demos\n\nThis section specifies steps you should do if you have just cloned the repository.\n\nFirst, change your current directory to the top-level in the ``sil-kit-adapters-vcan``\nrepository:\n\n    cd /path/to/sil-kit-adapters-vcan\n\n### Fetch Third Party Software\nThe first thing that you should do is initializing the submodules to fetch the required third party software:\n\n    git submodule update --init --recursive\n\nOtherwise clone the standalone version of asio manually:\n\n    git clone --branch asio-1-24-0 https://github.com/chriskohlhoff/asio.git third_party/asio\n\n### Build the Adapter\nTo build the adapter, you'll need an ubuntu SIL Kit package ``SilKit-x.y.z-$ubuntu``. You can download it directly from [Vector SIL Kit Releases](https://github.com/vectorgrp/sil-kit/releases). The easiest way would be to download it with your web browser, unzip it and place it on your file system, where it also can be accessed by ``bash``.\n\nThe adapter and demos are built using ``cmake``:\n\n    mkdir build\n    cmake -S. -Bbuild -DSILKIT_PACKAGE_DIR=/path/to/SilKit-x.y.z-$ubuntu/ -D CMAKE_BUILD_TYPE=Release\n    cmake --build build --parallel\n\n**Note 1:** If you have a self-built or pre-built version of SIL Kit, you can build the adapter against it by setting SILKIT_PACKAGE_DIR to the path, where the bin, include and lib directories are.\n\n**Note 2:** If you have SIL Kit installed on your system, you can build the adapter against it, even by not providing SILKIT_PACKAGE_DIR to the installation path at all.\n\n**Note 3:** If you don't provide a specific path for SILKIT_PACKAGE_DIR and there is no SIL Kit installation on your system, a SIL Kit release package (the default version listed in CMakeLists.txt) will be fetched from github.com and the adapter will be built against it.\n\nThe adapter and demo executables will be available in the ``bin`` directory.\nAdditionally the ``SilKit`` shared library is copied to the ``lib`` directory next to it automatically.\n\n### Build the adapter for Android environments \nYou can use the [Android NDK](https://developer.android.com/ndk) to cross-build the adapter for Android environments. \n\nBegin by cloning the SIL Kit repo and building SIL Kit using the cmake toolchain file provided by Android NDK and generating a package as follows: \n\n    cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=/path/to/android-ndk/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 -DSILKIT_HOST_PLATFORM=android -DANDROID_PLATFORM=android-33 -DSILKIT_BUILD_TESTS=OFF -DSILKIT_BUILD_DEMOS=OFF\n\n    cmake --build build --parallel --target package\n\nUnzip the package that was generated and use the same toolchain file to cross-build the adapter, ensuring it is built against the unzipped package. \n\n    cmake -S.  -Bbuild -DCMAKE_TOOLCHAIN_FILE=/path/to/android-ndk/build/cmake/android.toolchain.cmake  -DANDROID_ABI=x86_64 -DCMAKE_BUILD_TYPE=Release -DSILKIT_HOST_PLATFORM=android  -DSILKIT_PACKAGE_DIR=/path/to/SilKit-*-Linux-x86_64-clang-Release/  -DSilKit_DIR=/path/to/SilKit-*-Linux-x86_64-clang-Release/lib/cmake/SilKit -DANDROID_PLATFORM=android-33\n\n    cmake --build build --parallel\n\n\nLastly, update the LD_LIBRARY_PATH in your Android environment to point to the location of the SIL Kit shared library, which can be found in the generated lib folder.\n\n## b) Getting Started with pre-built Adapter and Demos\nDownload a preview or a release of the adapter directly from [Vector SIL Kit Adapter for virtual CAN Releases](https://github.com/vectorgrp/sil-kit-adapters-vcan/releases).\n\nYou should also download a SIL Kit Release directly from [Vector SIL Kit Releases](https://github.com/vectorgrp/sil-kit/releases). You will need this for being able to start a sil-kit-registry.\n\n## Install the sil-kit-adapter-vcan (optional)\nIf you call the following command (can be done for self-built and pre-built package after cmake configure) ``sil-kit-adapter-vcan`` can be called from everywhere without defining a path:  \n\n    sudo cmake --build build --target install\n\nThe default installation path will be ``/usr/local/bin``. Be aware that SIL Kit itself also needs to be installed to make this work.\n\n## Run the sil-kit-adapter-vcan\nThis application allows the user to attach virtual CAN interfaces (``SocketCAN``) running in Linux environment to the\nSIL Kit.\n\nBefore you start the adapter there always needs to be a sil-kit-registry running already. Start it e.g. like this:\n\n    ./path/to/SilKit-x.y.z-$ubuntu/SilKit/bin/sil-kit-registry --listen-uri 'silkit://0.0.0.0:8501'\n\nIt is also necessary that a virtual CAN interface is already opened and running in Linux kernel before you run the adapter. This can be done using the following terminal commands: \n\n    sudo modprobe vcan\n    ip link add dev can0 type vcan\n    ip link set up can0\n\n**Note:** These commands will open a virtual CAN interface with the name ``can0``.\n\nNow you can run the adapter from terminal. \n\nThe application *optionally* takes the following command line arguments:\n\n    sil-kit-adapter-vcan [--name \u003cparticipant name{SilKitAdapterVcan}\u003e]\n        [--configuration \u003cpath to .silkit.yaml or .json configuration file\u003e]\n        [--registry-uri silkit://\u003chost{localhost}\u003e:\u003cport{8501}\u003e]\n        [--log \u003cTrace|Debug|Warn|{Info}|Error|Critical|Off\u003e]\n        [--can-name \u003cvcan device name{can0}\u003e]\n        [--network \u003cSIL Kit CAN network{CAN1}\u003e]\n        [--help]\n**Note:** SIL Kit-specific CLI arguments will be overwritten by the config file specified by ``--configuration``.\n\n## SocketCAN Demo\nThe aim of this demo is to showcase a simple adapter that forwards CAN traffic from Linux terminal running a virtual CAN interface through to\nVector SIL Kit. \n\nThis demo is further explained in [SocketCAN/README.md](SocketCAN/README.md).\n\n## QEMU Demo\nThis demo is a step-by-step guide on how to use the adapter to link a QEMU image with an exposed SocketCAN interface to a SIL Kit CAN network, as well as some instructions to setup the QEMU image with an exposed SocketCAN interface.  \n\nThis demo is further explained in [QEMU/README.md](QEMU/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorgrp%2Fsil-kit-adapters-vcan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectorgrp%2Fsil-kit-adapters-vcan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorgrp%2Fsil-kit-adapters-vcan/lists"}