Unofficial C userspace and Linux kernel driver for the low cost USB analyzer "Canalyst-II" by Chuangxin Technology.
Uses libusb library for USB support on Windows and Linux.
This driver is based on black box reverse engineering made by projectgus of the USB behaviour of the proprietary software, and reading the basic data structure layouts in the original python-can canalystii source.
Currently, the following things are not supported and may not be possible based on the known USB protocol:
- CAN bus error conditions. There is a function
ocii_get_status()
that seems to provide access to some internal device state, not clear if this can be used to determine when errors occured or invalid messages seen; - Receive buffer hardware overflow detection;
- ACK status of sent CAN messages;
- Failure status of sent CAN messages. If the device fails to get bus arbitration after some unknown amount of time, it will drop the message silently;
- Configuring whether messages are ACKed by Canalyst-II. This may be possible, see
ocii_init
acc_code
andacc_mask
.
- Install PlatformIO Core
- Сlone this repository
- Run these commands:
# Build project
$ pio run
# Run tests
$ pio test -vvv -e linux_x64
# Clean build files
$ pio run --target clean