GithubHelp home page GithubHelp logo

candump-database's Introduction

candump-database

Using a Database to Decode J1939 Messages

Python script written to decode a CAN data dump from a J1939 Network. The goal of the program is to decode messages on the J1939 communications bus present in the vehicle.

Assumptions:

The reader knows about J1939. In a nut shell, J1939 is a standard created by the Society of Automotive Engineers that standardizes serial communications between electronic control units in commercial vehicles. J1939 uses a Controller Area Network (CAN) at 250kbps.

The reader understands that the same number can be written in different bases. We will be using decimal (base 10), hexadecimal (base 16), and binary (base 2) when discussing messages. Converting between bases is quite simple with the built-in Windows calculator in programmer mode. For example, 0xFEF1 is the hexadecimal number for 65265, as shown below.

Importing the data

The python script should turn the log file into Python data structures. This code should produce the following output: *Example 8 18ffa53d 8 18ffaa01 8 18ffab01 8 18ffac01 8 1ce8ff00 8 1cebff00 8 1cebff0f 8 1cecff00 8 1cecff0f 8 1cfe9201 8 cf00300 8 cf00400 8 cf00421 8 cf00a01 8 Number of Unique IDs: 108

*Now the data is in Python data structures within memory. The next step is to make meaning from it using the J1939 Standard.

#Parsing the data There are two things that are needed to make meaning of the data. First, a set of rules that tell us how to decode the information, and second, the logic to do so. We'll start with the rules (standards) to decode the data.

candump-database's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.