All Projects → rberkow → python-can

rberkow / python-can

Licence: LGPL-3.0 License
Copy of python-can from bitbucket for the purposes of new protocol development

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-can

netcore-can-example
SocketCan example on dotnet-core
Stars: ✭ 21 (+5%)
Mutual labels:  can-bus, socketcan
can2mqtt
Bidirectional CAN-Bus to MQTT-Bridge
Stars: ✭ 39 (+95%)
Mutual labels:  can-bus, socketcan
ecu-simulator
OBD-II ECU Simulator
Stars: ✭ 24 (+20%)
Mutual labels:  can-bus, socketcan
pyuavcan
Python implementation of the Cyphal protocol stack.
Stars: ✭ 91 (+355%)
Mutual labels:  can-bus, socketcan
MazdaCANbus
database of known Mazda CAN messages
Stars: ✭ 32 (+60%)
Mutual labels:  can-bus
PSAVanCanBridge
VAN - CAN protocol bridge (V2C) for cars made by PSA Group (Peugeot, Citroen)
Stars: ✭ 67 (+235%)
Mutual labels:  can-bus
pcan cantact
🤖 XCAN firmware for CANtact ( CANable ) or any other similar boards.
Stars: ✭ 192 (+860%)
Mutual labels:  socketcan
Candb
Generate CAN dbc file with OEM defined CAN matrix (*.xls).
Stars: ✭ 36 (+80%)
Mutual labels:  can-bus
RejsaCAN-ESP32
ESP32 board with CAN interface, runs on 12V power (with auto shutdown)
Stars: ✭ 88 (+340%)
Mutual labels:  can-bus
UDTStudio
UniSwarm Tools for UDT interface and CANOpen in Qt5
Stars: ✭ 13 (-35%)
Mutual labels:  can-bus
carhacking
car hacking tools
Stars: ✭ 40 (+100%)
Mutual labels:  can-bus
vscp
VSCP (Very Simple Control Protocol) IoT/m2m framework
Stars: ✭ 47 (+135%)
Mutual labels:  can-bus
bxcan
bxCAN peripheral driver for STM32 chips
Stars: ✭ 22 (+10%)
Mutual labels:  can-bus
public regulated data types
Regulated DSDL definitions for Cyphal (standard and third-party)
Stars: ✭ 62 (+210%)
Mutual labels:  can-bus
SparkFun CAN-Bus Arduino Library
No description or website provided.
Stars: ✭ 132 (+560%)
Mutual labels:  can-bus
openHCAN
Hausautomatisierungsloesung auf CAN-Bus Basis.
Stars: ✭ 16 (-20%)
Mutual labels:  socketcan
Volvo-CAN-Gauge
Reverse engineering the Volvo VIDA protocol and CAN network to gather diagnostic information not available via OBD2 on Volvo cars.
Stars: ✭ 15 (-25%)
Mutual labels:  can-bus
usb-can
USB-CAN Analyzer Linux Support
Stars: ✭ 32 (+60%)
Mutual labels:  can-bus
CAN-Bus Shield
No description or website provided.
Stars: ✭ 75 (+275%)
Mutual labels:  can-bus
HPS2FPGAmapping
SoCFPGA: Mapping HPS Peripherals, like I²C or CAN, over the FPGA fabric to FPGA I/O and using embedded Linux to control them (Intel Cyclone V)
Stars: ✭ 27 (+35%)
Mutual labels:  can-bus

The Controller Area Network is a bus standard designed to allow microcontrollers and devices to communicate with each other. It has priority based bus arbitration, reliable deterministic communication. It is used in cars, trucks, wheelchairs and more. See wikipedia for more info.

python-can

This module provides controller area network support for Python.

Configuration File

In order to use this library a CAN interface needs to be specified. A method to do this is to create a configuration file called can.conf, ~/.canrc or can.ini.

The configuration file sets the default interface and channel:

[default]
interface = <the name of the interface to use>
channel = <the channel to use by default>

Interfaces

The interface available are:

kvaser

Kvaser's CANLib SDK for Windows (also available on Linux)

socketcan

On linux the socketcan interface is exposed via either:

  • socketcan_ctypes
  • socketcan_native

serial

A text based interface. For example use over bluetooth with /dev/rfcomm0

pcan

Peak-System's PCAN-Basic API.

Installation

GNU/Linux dependencies

Reasonably modern Linux Kernels (2.6.25 or newer) have an implementation of socketcan. This version of python-can will directly use socketcan if called with Python 3.3 or greater, otherwise that interface is used via ctypes.

Windows dependencies

Kvaser

To install python-can using the Kvaser CANLib SDK as the backend:

  1. Install the latest stable release of Python.

  2. Install Kvaser's latest Windows CANLib drivers.

  3. Test that Kvaser's own tools work to ensure the driver is properly installed and that the hardware is working.

PCAN

To use the PCAN-Basic API as the backend (which has only been tested with Python 2.7):

  1. Download the latest version of the PCAN-Basic API.

  2. Extract PCANBasic.dll from the Win32 subfolder of the archive or the x64 subfolder depending on whether you have a 32-bit or 64-bit installation of Python.

  3. Copy PCANBasic.dll into the working directory where you will be running your python script. There is probably a way to install the dll properly, but I'm not certain how to do that.

Note that PCANBasic API timestamps count seconds from system startup. To convert these to epoch times, the uptime library is used. If it is not available, the times are returned as number of seconds from system startup. To install the uptime library, run pip install uptime.

Install python-can

You may need to install pip and setuptools first.

Two options, install normally with:

python setup.py install

Or to do a "development" install of this package to your machine (this allows you to make changes locally or pull updates from the Mercurial repository and use them without having to reinstall):

python setup.py develop

On linux you will need sudo rights.

Documentation

The documentation for python-can has been generated with Sphinx they can be viewed online at python-can.readthedocs.org

Generation

With sphinx installed the documentation can be generated locally with:

python setup.py build_sphinx
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].