Giter Club home page Giter Club logo

Comments (7)

ryanbagwell avatar ryanbagwell commented on September 13, 2024

@brendanwhitfield I might be able to help, as I have a car that currently has 4 DTCs. How do I query for the actual DTC codes?

from python-obd.

brendan-w avatar brendan-w commented on September 13, 2024

I've got a branch called dtc going. Either fetch or download it, and install pyserial if you don't have it already. Run this snippet from the repo root to take it for a test drive:

import obd
obd.debug.console = True

o = obd.OBD()
print(o.query_DTC())

Please send me the debug output (the last line should be a list of error codes). There's a lot of development code in here, so if it crashes and burns, the debug should tell me everything I need to know.

Let me know how it goes!

from python-obd.

ryanbagwell avatar ryanbagwell commented on September 13, 2024

Darn, I wish I had seen the dtc branch before I spent a few hours getting this to work. I will run it again tomorrow. I see you made a lot of improvements.

This is a great refactor. Thanks for doing it.

from python-obd.

ryanbagwell avatar ryanbagwell commented on September 13, 2024
>>> conn.query_DTC()
[obd] Sending command: 0101: Status since DTCs cleared
[obd] write: '0101\r\n'
[obd] read: '48 6B 10 41 01 84 07 6D 00 FD \r\r'
[obd] Sending command: 03: Get DTCs
[obd] write: '03\r\n'
[obd] read: '48 6B 10 43 03 00 03 02 03 03 14 \r48 6B 10 43 03 04 00 00 00 00 0D \r\r'
[obd] Recieved multi-frame response. Can't parse those yet
[obd] Failed to retrieve DTCs

I do have two DTCs that are currently being thrown.

from python-obd.

brendan-w avatar brendan-w commented on September 13, 2024

Yeah, I was afraid of that. Protocol abstraction system isn't 100% yet. Apparently, DTCs overflow into more frames (per query), and you had 1 more than it could handle. Now that I have the raw tx/rx data though, I can do tests over here.

Thank you! This helps a lot

from python-obd.

brendan-w avatar brendan-w commented on September 13, 2024

Alright, master (856b5de) should be good to go. I tried it on your debug output and it parsed just fine.

from python-obd.

brendan-w avatar brendan-w commented on September 13, 2024

This decoder now handles multiple DTC messages from all ECU's. Slated for 0.5.0 release.

from python-obd.

Related Issues (20)

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.