Giter Club home page Giter Club logo

Comments (5)

iwanders avatar iwanders commented on August 13, 2024

Start by toggling on the debug printing here.

If possible and you have the hardware, attach a logic analyzer, compare with another OBD reader.

from obd9141.

Ashok12698 avatar Ashok12698 commented on August 13, 2024

Before magic 5 baud.
Before setting port.
After setting port.
Timeout on read 0x55.
init_success:0
Looping
Before magic 5 baud.
Before setting port.
After setting port.
Timeout on read 0x55.
init_success:0

I am reading buffer[0] = 57 instead of 55 and buffer[1] = 0

from obd9141.

iwanders avatar iwanders commented on August 13, 2024

No, you're getting a timeout; this line returns false.

Are you sure this is the correct initialisation procedure for this ECU? Does it need the 5 baud init or KWP? Ideally confirm with another OBD reader what initialisation is necessary for this ECU.

Check if your software serial port actually works, can you receive anything on this serial port? Does it need pullup resistors?

from obd9141.

Ashok12698 avatar Ashok12698 commented on August 13, 2024

Yes, I agree, [this line] returns false. basically my ECU is a simulator and I can set the modes using switches to KWP and ISO9141-2. So I am trying with init() and initKWPSlow(). both needs the 5 baud init. I tested it with another obd reader it detect the KWP and ISO9141-2. Also I compared the wakeup signal from obd reader and what I am getting. Its similar, but after that it doesn't show any data signals (like 1st byte which should be 0x55).
I checked the serial port signal on Rx (its same as on K-line with voltage level 5v).

from obd9141.

iwanders avatar iwanders commented on August 13, 2024

Hmm, well that's an intriguing setup.

I wonder what the timing looks like with another OBD reader. A wild guess is that the simulator responds very quickly, effectively responding with the 0x55 in between these calls, so perhaps the 0x55 is sent while we are still in the delay(200) and the serial port is not yet enabled?

You could try to remove that last delay, it shouldn't affect the initialisation procedure since the line is already high, but it may just setup the bus fast enough to be able to catch the 0x55?

If at all possible, hook up a logic analyser and record a handshake from another OBD reader and compare it with what the handshake from your microcontroller & this library looks like, that is by far the easiest way to diagnose any issues around it.

from obd9141.

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.