Skip to main content

Decode CAN messages

Project description

Caneton
=======

Python 3 project under BSD license to decode CAN messages (also called frames).

To decode a CAN message, you must provide the message ID, the message data
(payload) and the DBC file which describes the format of the data on the CAN
bus.

Caneton can be used as Python module:

```python
import json
import caneton

with open('dbc.json') as dbc_file:
dbc_json = json.loads(dbc_file.read())
message_length, message_data = caneton.hex_ascii_to_bytes('01780178010000')
message = caneton.message_decode(message_id=0x701,
message_length=message_length, message_data=message_data,
dbc_json=dbc_json)
print(message)
```

The project [libcanardbc](https://github.com/Polyconseil/libcanardbc) can
convert a CAN DBC file to JSON.

Caneton provides a CLI tool to decode CAN message:

```caneton-decode dbc.json 0x701 0x01780178010000```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caneton-1.0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

caneton-1.0.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file caneton-1.0.1.tar.gz.

File metadata

  • Download URL: caneton-1.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for caneton-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d44a440cf517c9be8177eee8633914db70d7f976b35d6800042a855f4372a9a8
MD5 b76c5ed14c453c317162ea38f4a858f4
BLAKE2b-256 40fd8feb2c4bad4a4b46c4912b4bc9dc48a4b761b88c30bab92aef4efd35a62d

See more details on using hashes here.

File details

Details for the file caneton-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for caneton-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 61516a6f0b58f8a491567fbcf2a1de783bbc473c4110c404c86597762b5337c7
MD5 3cae03bcb341260b923b58bb48d0f7e0
BLAKE2b-256 4bc8eccef8d38464afe5487cf42ef496c57f8dcd66b5d47c94715fd0681e1e04

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page