Code Monkey home page Code Monkey logo

Comments (5)

CSG2019 avatar CSG2019 commented on May 22, 2024 1

Hi pylessard,
Thank you so much for your guidance.
Yes, the DID length is 0x14, so it should be 17 bytes(20 bytes - 3 bytes(62 F1 90)). I didn't understand the example well before, now I can get and print the result I want.
You are right, I made a typo, I mean DID F190, not F194.
This library is very useful to me.
I think this topic can be closed.
thank you again.

from python-udsoncan.

CSG2019 avatar CSG2019 commented on May 22, 2024

Anyone can help on this?
or could you please give me an example to read and print the 22 F1 90 with Vector tool?
thank you

from python-udsoncan.

pylessard avatar pylessard commented on May 22, 2024

Hi,
Sorry, I forgot that issue. The error message is quite clear about the issue. Your server sent data for a DID that you did not request and since the is no Codec defined for that specific DID, it is impossible for the parser to continue parsing.

I wouldn't expect you to get a positive answer from your server or a valid data coming back from the UDS client since you just copy/pasted an example code and kept the demonstration codec as is... it's called MyCustomCodecThatShiftByFour, I made that up, this won't work on any real device.

If you want further assistance, share a raw CAN log

Regards

from python-udsoncan.

CSG2019 avatar CSG2019 commented on May 22, 2024

Hi,
thank you for your assistance and reply.
yes, this is my first time using this library, so i didn't understand well. sorry.
actually, I just try to get and print the DIDF194 response, and that need to translate from hex to ascii format.
below is the code and raw CAN log.
Do I need to define an addition function for DID F190 response?
Could you please guide me how to complete this code?
thank you.

from python-udsoncan.

pylessard avatar pylessard commented on May 22, 2024

Hi,
You're very close to make it work. Looking at your CAN log, you receive 17 bytes of data for your DID. Since you defined that it is a 15 bytes long payload, the parser believe that the two extra bytes are an additional DID receied by the server. That is why it complains that it received an extra DID and doesn't know what to do with it. You have to be strict with DID length, they are not standardized, therefore manufacturer specific, and since no length information is transmitted over CAN, you need prior knowledge of your data length.

Just put 17 instead of 15 in your AsciiCodec and I believe you'll make it work.

Last thing, you mentioned DID F194, but everything seems about F190, so I assumed you made a typo.

Regards.

from python-udsoncan.

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.