Support for the CANtact Controller Area Network Devices
Project description
CANtact
Software support for CANtact devices. Includes a driver (see driver/
), APIs, and a cross-platform command line interface.
Getting a Device
CANtact Pro is currently a pre-launch project on CrowdSupply. You can subscribe on the product page to get updates about the hardware release.
This tool should work fine with other CANtact/gs_usb compatible devices such as CANable.
Installing
The CLI and driver are built using cargo
, which can be installed using rustup.
Once cargo
is installed, use it to build and install the can
binary:
git clone https://github.com/linklayer/cantact
cd cantact
cargo install --path .
Command Line Interface
The CLI is invoked using the can
binary:
can help
can 0.1.0
Eric Evenchick <eric@evenchick.com>
Command line utilities for CANtact devices
USAGE:
can [FLAGS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-v, --verbose Print verbose debugging information
-V, --version Prints version information
SUBCOMMANDS:
cfg Set device configurations
dump Receive and display CAN frames
help Prints this message or the help of the given subcommand(s)
send Send a single CAN frame
The can cfg
command is used to set the bitrate and other device settings. Once set, other commands will use these options.
For example, to set channels 0 and 1 to 500000 kbps, then dump all frames on all channels:
can cfg --channel 0 --bitrate 500000
can cfg --channel 1 --bitrate 500000
can dump
Use can help [subcommand]
for additional documentation.
Rust Support
The driver can be used from Rust by installing the cantact-driver
crate.
Documentation for the crate can be found on docs.rs.
Python Support
CANtact supports Python 3.5+ on Windows, macOS, and Linux. The Python modules are hosted on PyPI.
Python end-users should not use this repository directly. Instead, install Python support using pip
:
python3 -m pip install cantact
See the examples/
folder for Python examples. python-can supports
CANtact, and is recommended over using the cantact
module directly.
python3 -m pip install python-can cantact
can_logger.py -i cantact -c 0 -b 500000
Building Python Support
Building Python support is only required if you want to make modifications to the cantact
Python module, or if
you are using a platform that does not have packaged support.
Python support is implemented using PyO3, and is gated by the python
feature.
Thanks to rust-setuptools, the cantact
Python module can be built
like any other Python module using setuptools
. PyO3 requires nightly Rust, which can be configured using rustup override
.
cd driver
rustup override set nightly
python setup.py build
Python builds for Windows, macOS, and manylinux are automated using Github Actions. Tagged releases are automatically pushed to PyPI.
C / C++ Support
C / C++ support is provided by the driver. This is currently used to implement BUSMASTER support on Windows.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for cantact-0.0.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d99f48c6fd6cfcde7178a8ea8ddadb5694b543ab8270a8c2ddb8f95690dbbfb4 |
|
MD5 | af5c1e2744e6c4336da14fa0c862d7a2 |
|
BLAKE2b-256 | 4d9bae12aac8b95bc1e48816317b64e0d7dc67f542fbb597426195197914f919 |
Hashes for cantact-0.0.4-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa6cfa91905ff86bc02ec3202b60a2ce638c8ac3190b150ef1c568f2e6e7ae24 |
|
MD5 | e2efeff2e3be300c57e9cbf34529c8ec |
|
BLAKE2b-256 | 37d16406acb57122068f0bd3e216767864dd8128c3c18d72fc2eeb02164e79a9 |
Hashes for cantact-0.0.4-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8290a216bcd6ec047e2bd5bab7f3b4e56c31fd8c920352808ef4eda6e29bd5ed |
|
MD5 | 8f9618e63eaae8345ad074c138e47ac3 |
|
BLAKE2b-256 | 8a9f931bd8bd3e35f646bdefb3f68d43409a9965bb5a0de0e7d597057609e787 |
Hashes for cantact-0.0.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82dfe7fa4d5996c79da8211910d20d8a889e04db35871f552d3d6b9c50cfbe85 |
|
MD5 | ade68a863932706870c1efc5b87b6885 |
|
BLAKE2b-256 | 9a854b2a3f7fa9091a8cd5a826a3314af4dd283fe204944c216ca4697ab1e4b4 |
Hashes for cantact-0.0.4-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 405bda1f777f352be3085804d179800e23813f101bd8c748931037e55f41556d |
|
MD5 | a16d93d1407786da0c8f3ee88ef67d8f |
|
BLAKE2b-256 | c0b933b25fe7395764b3fcecfdc7d9209979b8673550bbb6b9bae45baa4ca999 |
Hashes for cantact-0.0.4-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d05ff37882a6e7db97da60a11ce562091188d00ce2762908704376cc5bef6419 |
|
MD5 | a375524518ff1659a48ea5ec40d4ba54 |
|
BLAKE2b-256 | 31d1d4a3c3b8c953741fd7b00cf84ce5e8024f13eb9ba14a33d52a6526a79bba |
Hashes for cantact-0.0.4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02561a4a0ceb5cdc5ddab38dc75d6d6b43514d5b6500b968bf21412fb83e952e |
|
MD5 | 0f911ae1981c89986425118669676a57 |
|
BLAKE2b-256 | 8f51cd129409ab782a5dc919519e07350db5d170c016a7d894fb8b0b825a50b9 |
Hashes for cantact-0.0.4-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b524eabea78e232829a84403f1380848396baa008b6e03563b39ed52ce4563a |
|
MD5 | 15d9d448412067595b06cc31f570e331 |
|
BLAKE2b-256 | e83663d0fa6c54aaf62cfdabcb2fe3313d1204103019d56501490d3b1e213b8c |
Hashes for cantact-0.0.4-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 158a8801344293e09173fe051f2243bd5e777d2f521d9f0aff599820be31b4dd |
|
MD5 | ea4cd191f9676493a39009d18bcec763 |
|
BLAKE2b-256 | 2880f5061c66645aa06f78a439488a300bcd122f688153b0dff6cee2be45f914 |
Hashes for cantact-0.0.4-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e263058dad4765ab85924005efd5bab1a3b5b446ba207f13257dd714ba6a9dc7 |
|
MD5 | 22266ce9d8c5950b36eb0dc4659bd3e2 |
|
BLAKE2b-256 | fa63b6261a350f3f4977f2d3d39ea64a197c28040f242e9330add96a54c69cae |
Hashes for cantact-0.0.4-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 442ba550ac87c46e8dfbba884b6d10a232f973204d60cd924b82a2e7d6256295 |
|
MD5 | c696250e5cedef7ec9b685a32ae732ac |
|
BLAKE2b-256 | a33922075965d5263d4c91ac7150d4199e3e456e242c116062bdfc19cf8ce3f7 |