Git Product home page Git Product logo

vpw_analyzer's Introduction

VPW Analyzer

A visual J1850 VPW analyzer written in Python

Requires Tkinter, Pandas, serial, and Python3 These can be installed with pip or a package manager.

pip3 install tk pandas serial

Running the program is as simple as pointing the python3 executable to the vpw_analyzer.py file with

python3 vpw_analyzer.py

How to use

Any ELM327 device should be compatible with this, as it uses only basic AT commands to listen to the bus.

You need to enter the serial port into the "OBD Device Serial Port" box. For Windows, this is typically a "COM1" name. Check device manager to get the actual COM port. For Linux, you need to specify the full /dev/tty device path. Once the serial device is entered, press the "Read" button to connect and begin listening to the bus.

There are 2 boxes in main window. The bottom box shows the messages that were received in order. The top box shows unique messages. For example, if duplicate messages are received, then you would see it twice in the bottom box, but only once in the top box. By changing the "Compare First # Bytes" dropdown changes how many bytes of a data payload are compared to determine if a message is unique or not. Most data responses contain 2 bytes that are an acknowledgement and an ID confirmation.

To export a log to a text file, click the "Export Logs" button. To import a log (or any text file with 1 message per line), enter the path (relative to vpw_analyzer.py or absolute both work) to the text file into the OBD Device Serial Port box and press "Read" button.

Clear Message Logs button will clear out the messages.

Known Issues

  • Sending messages does not work

vpw_analyzer's People

Contributors

jonofmac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vpw_analyzer's Issues

Doesn't work with OBDLink MX

No data is received with OBDLink MX bluetooth devices.

The issue is because the OBDLink MX device does not seem to have new lines enabled by default.

Sending messages is broken

Currently vpw_analyzer does not have the ability to send messages.

This is primarily due to the fact that the ELM327 command set does not allow a graceful way to send a message without risking losing a message incoming.

The basic process to send a message while datalogging with a ELM327 device is this:

  1. Configure device
  2. Enter AT MA (monitor all) mode to see all bus traffic (vpw_analyzer's primary mode)
  3. Cancel AT MA mode
  4. Configure desired headers
  5. Send message
  6. Device waits some amount of time to see if it gets a response to the specified headers (ignoring other traffic)
  7. Enter AT MA mode to continue seeing messages

Steps 3-6 mean that there's a window of time that messages can (and most probably will) be dropped. This is an inherent weakness with the standard ELM327 commands.

Some more advanced devices (OBDX VT Pro) offer additional modes to allow transmission while receiving messages. The decision needs to be made to support both modes or only the safer OBDX modes.

Crashes when closed

Trying to close the script often times causes the program to crash or hang.

I believe this is due to the serial thread not receiving the command to close and causing a hang-up.

Replace direct function calls to UI thread with a queue

Right now the forked thread directly calls the UI thread's functions. Normally this would cause issues, but somehow it works in python... The correct way would be to use a queue to safely pass data between the threads. This should also improve performance.

VPW Message Class

Create a VPW message class to store messages in, rather than these convoluted arrays

Message numbers incorrectly tagged

Seems to be an issue where duplicate messages are not always properly getting recognized as duplicates or the message pointer from the summary to the message ID field is incorrect.

ELM commands are not verified

Right now, the software opens the port and sends off commands. Sleep delays help with higher latency connections. Need to write functions to check the response from these requests to improve responsiveness and do some error checking

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.