All Projects → kobolt → usb-can

kobolt / usb-can

Licence: MIT license
USB-CAN Analyzer Linux Support

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to usb-can

Cannelloni
a SocketCAN over Ethernet tunnel
Stars: ✭ 141 (+340.63%)
Mutual labels:  can-bus
CanFestival
No description or website provided.
Stars: ✭ 42 (+31.25%)
Mutual labels:  can-bus
public regulated data types
Regulated DSDL definitions for Cyphal (standard and third-party)
Stars: ✭ 62 (+93.75%)
Mutual labels:  can-bus
Arduino Canbus Monitor
Can bus monitoring tool based on arduino and can bus shield. Implements CAN ASCII/SLCAN protocol compatible with Lawicel CAN232/CANUSB. Can be used for monitoring low speed CAN (interior can bus of most cars, less than 500kbps). For higher speeds serial port can become a bottleneck in case data density is high.
Stars: ✭ 163 (+409.38%)
Mutual labels:  can-bus
TractorHacking.github.io
Tractor Hacking GHPages
Stars: ✭ 34 (+6.25%)
Mutual labels:  can-bus
strados
Transform OBD2 data from your car into human readable data
Stars: ✭ 27 (-15.62%)
Mutual labels:  can-bus
Can Bootloader
The bootloader used to flash our CAN-connected boards
Stars: ✭ 93 (+190.63%)
Mutual labels:  can-bus
pyuavcan
Python implementation of the Cyphal protocol stack.
Stars: ✭ 91 (+184.38%)
Mutual labels:  can-bus
MCP CAN lib
MCP_CAN Library
Stars: ✭ 567 (+1671.88%)
Mutual labels:  can-bus
Candb
Generate CAN dbc file with OEM defined CAN matrix (*.xls).
Stars: ✭ 36 (+12.5%)
Mutual labels:  can-bus
Python Udsoncan
Python implementation of UDS (ISO-14229) standard.
Stars: ✭ 209 (+553.13%)
Mutual labels:  can-bus
M5Stack-NMEA-2000-Display-CAN-BUS
This repository shows how to use the M5Stack as NMEA 2000 Display and WiFi Gateway.
Stars: ✭ 29 (-9.37%)
Mutual labels:  can-bus
J1939-Framework
Framework to work with J1939 Frames used in CAN bus in bus, car and trucks industries
Stars: ✭ 123 (+284.38%)
Mutual labels:  can-bus
Libcanard
A compact implementation of the UAVCAN/CAN protocol in C for high-integrity real-time embedded systems
Stars: ✭ 151 (+371.88%)
Mutual labels:  can-bus
PSAVanCanBridge
VAN - CAN protocol bridge (V2C) for cars made by PSA Group (Peugeot, Citroen)
Stars: ✭ 67 (+109.38%)
Mutual labels:  can-bus
Sapog
Sapog - advanced multiplatform ESC firmware
Stars: ✭ 139 (+334.38%)
Mutual labels:  can-bus
asysbus
Arduino System Bus
Stars: ✭ 23 (-28.12%)
Mutual labels:  can-bus
cantools
CAN bus tools.
Stars: ✭ 1,266 (+3856.25%)
Mutual labels:  can-bus
vscp
VSCP (Very Simple Control Protocol) IoT/m2m framework
Stars: ✭ 47 (+46.88%)
Mutual labels:  can-bus
specification
The Cyphal specification documents are maintained here.
Stars: ✭ 38 (+18.75%)
Mutual labels:  can-bus

USB-CAN Analyzer Linux Support

This is a small C program that dumps the CAN traffic for one these adapters: alt text

These adapters can be found everywhere on Ebay nowadays, but there is no official Linux support. Only a Windows binary file stored directly on GitHub.

When plugged in, it will show something like this:

Bus 002 Device 006: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

And the whole thing is actually a USB to serial converter, for which Linux will provide the 'ch341-uart' driver and create a new /dev/ttyUSB device. So this program simply implements part of that serial protocol.

Build

canusb.c can be compile just by running make or with:

$ gcc canusb.c -o canusb

Usage

$ ./canusb -h
Usage: ./canusb <options>
Options:
  -h          Display this help and exit.
  -t          Print TTY/serial traffic debugging info on stderr.
  -d DEVICE   Use TTY DEVICE.
  -s SPEED    Set CAN SPEED in bps.
  -b BAUDRATE Set TTY/serial BAUDRATE (default: 2000000).
  -i ID       Inject using ID (specified as hex string).
  -j DATA     CAN DATA to inject (specified as hex string).
  -n COUNT    Terminate after COUNT frames (default: infinite).
  -g MS       Inject sleep gap in MS milliseconds (default: 200 ms).
  -m MODE     Inject payload MODE (0 = random, 1 = incremental, 2 = fixed).

Example commands:

# dump CAN bus traffic from 1 Mbit CAN bus
$ ./canusb -t -d /dev/ttyUSB0 -s 1000000 -t

# send the bytes 0xBEEE from ID 005 on at 1 Mbit CAN bus
$ ./canusb -d /dev/ttyUSB0 -s 1000000 -t -i 5 -j BEEE
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].