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.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf2c327d789f1366a5e1fb8e909d89b703faeae5ffdea4e349d7395f7df8edb9 |
|
MD5 | 23e2a5ec8a917c88a616a6fe40e458fd |
|
BLAKE2b-256 | 4f1484ea75415972445c85cf3634d2e77130d90721998d1a79acddb2c7e2c252 |
Hashes for cantact-0.0.5-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6caeb1bfceed73ae7fd50bfd0a12e48673c207685a1985a8ff1db7c16f1ab82 |
|
MD5 | 03e48536c55cea28491475d560a76bfe |
|
BLAKE2b-256 | d35ef2ecc1a93383155c3923460b3e58ec8ab1d78ccb4266408185c6932732df |
Hashes for cantact-0.0.5-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d0df03bd9cb55a900f36b963e2cabc76e8eaa7ae439e28dd823c3d979fcef20 |
|
MD5 | 3abae410a3d243f8f2e04d9ecc6d6294 |
|
BLAKE2b-256 | d14003a66af33125f5e528a2b1b2cec44e1f80898ed4a1b22eaae9802051387a |
Hashes for cantact-0.0.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e558672bf4c566a238f3cd54590e6c62bb94fc4f78b17e7f372de19fc7f22cbf |
|
MD5 | 117e56dda8d36e371dc87f0d9a8ac4a3 |
|
BLAKE2b-256 | 735e4589fa9bf3a42c6ec446b2027de7ad62567b6b63f28b4ef52474498ff0e4 |
Hashes for cantact-0.0.5-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07ed2bf94ce6ba64820f5cae4c81945c901e58d0c2facb73688ce0612d068f63 |
|
MD5 | 96a5481533d9ad2c9b1a785f5bb5dde7 |
|
BLAKE2b-256 | 5298589af1e0eb0cd798cdecac371a24ff997bea50fa2b627aac3601df7891ac |
Hashes for cantact-0.0.5-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b01587ddc735bb187bda0978455531b2b2dd26cf8a4e9ad2ef601e6e9558151a |
|
MD5 | f1e10e7d4f97da87962eea416d50a0f5 |
|
BLAKE2b-256 | 8cb639242396ec2363b778989b39b4f1c1c6eb885598716e856947f593182691 |
Hashes for cantact-0.0.5-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d72bda903b94eb35983c058b53193ea445cb2d0239a1f3c2ae36ea0b4ae6560d |
|
MD5 | 8153d7fcb491f69e017a28de26063d7c |
|
BLAKE2b-256 | b5605c2d55e2b29d9b637385120694801b4dba3f46bb1f4dd27fa760337052e0 |
Hashes for cantact-0.0.5-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aed1c6e4e1eca5485543ece0a81db31827ac33fbbf08792c848a61e518d5d66 |
|
MD5 | 32baeebd2e1d8c4bcd98fab1df1448cd |
|
BLAKE2b-256 | 37eeafee131686f91f539e1176c46c373e3256c912e09e95616c67e0cbe51a7c |
Hashes for cantact-0.0.5-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1db03e7f5ae5a9a3913d77f769b4000f2cda452d3e3100ee478c356a20ed2ba |
|
MD5 | 2dae99ac9f6c2c6ccc700b07372f1705 |
|
BLAKE2b-256 | dd03e5f6e39e8bff3fdfd861fb34d29dd345f1906eb90ada3e3476abee49fe4e |
Hashes for cantact-0.0.5-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 659147a1a7176dc76b6c6cf93295794a27110ccc8aae2c45dad894f46bf9b836 |
|
MD5 | cca17294830b0de9091dd20ca6824665 |
|
BLAKE2b-256 | 6d8fc3b210ab5167486ed8a34522bf8b0ec390fd9812d6f0d8a0dbaf78086e33 |
Hashes for cantact-0.0.5-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f72ee201099ffa3d6d2f4960f7a3194a3f0b387832fc026c553dfee0b21fc2f1 |
|
MD5 | 14ea882bb17ce4c903a637cee8517de3 |
|
BLAKE2b-256 | 0fcc029e1617deb208f7d2a4f76167c45481052299017270e1d0fb2ec62c4eb1 |
Hashes for cantact-0.0.5-cp35-cp35m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 009d6fddd4234637f81b2b90daa21e189ca5c3609ef1589366cac7a38a71b50f |
|
MD5 | 2d6d29dd5ca41b7af176062e00319444 |
|
BLAKE2b-256 | b154ea6764d32549e62fc3df62456d0adf1d575b9b6702bbaed2d3659261b2ea |