Giter Club home page Giter Club logo

Comments (6)

mickeyl avatar mickeyl commented on July 29, 2024

Let me show you an example, here's communication over protocol 7:

I ask for 03 and get the following rawResponse:

(lldb) po self.rawResponse
<__NSArrayM 0x28150cbd0>(
18DAF110100A430401100148,
18DAF1102101700210000000
)

Stripping the ECU IDs and reassembling the fragments gives me the following cookedResponse:

(lldb) po self.cookedResponse
{
    10 =     (
        4,
        1,
        16,
        1,
        72,
        1,
        112,
        2,
        16,
        0,
        0,
        0
    );
}

We are seeing ECU #10 responding with 12 bytes. To my knowledge, every DTC is encoded as 2 bytes and the first byte of the whole response to 03 and 07 is the actual number of encountered DTCs, i.e. in this example we are seeing 4 DTCs where as the actual values are P0110, P0148, P0170, and P0210.

If you think this is wrong, could you show me example data from your car?

from ltsupportautomotive.

mukulpandey57 avatar mukulpandey57 commented on July 29, 2024

Hello @mickeyl , I am getting "P2800" from this Library, but other apps or wired scanner reads "P1628".
Please suggest or If I'll change the index to 0 will fix it as above mentioned by @JRJian
In NSRange codeRange = NSMakeRange(1, bytes.count-1);
NSArray<NSNumber*>* codeBytes = [bytes subarrayWithRange:codeRange];
MicrosoftTeams-image (13)
screen shot of wired scanner.( what is mod $12 i don't familiar with)

from ltsupportautomotive.

mukulpandey57 avatar mukulpandey57 commented on July 29, 2024

NSRange codeRange = NSMakeRange(1, bytes.count-1);
NSArray<NSNumber*>* codeBytes = [bytes subarrayWithRange:codeRange];

@JRJian @thdankert @mickeyl , is this code correct or have to change the RangeIndex to 0?
Please Help. (Not getting ABS fault codes specifically "U0102" )

from ltsupportautomotive.

mickeyl avatar mickeyl commented on July 29, 2024

Thanks for opening this issue, I think you are up to something. My implementation of the DTC parsing code is based on SAE J1979_201408, which is the reference, but I may have mixed up some of the tables depicted in there (granted, it's quite a confusing spec in some places). I have developed the DTC-implementation against an OBD2 Simulator (since I do not possess so many cars with actual failures), it might be possible that this Simulator has a broken implementation of the DTC answer. I will double check with the spec later this week and report ASAP.

from ltsupportautomotive.

mickeyl avatar mickeyl commented on July 29, 2024

I may have spoken too soon. Upon my inquiry, the simulator developer just got back to me and claims that for all CAN-protocols, the answer to 03 has to report the number of DTCs before the actual codes. For all other protocols, this number will be omitted.

Can anyone confirm or deny that?

from ltsupportautomotive.

mickeyl avatar mickeyl commented on July 29, 2024

See also the accepted answer to https://mechanics.stackexchange.com/questions/51226/obd2-mode-3-wrong-response – I trust these folks, as they have a lot of experience in seeing "real world" values.

from ltsupportautomotive.

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.