Comments (5)
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.
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.
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.
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.
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)
- DID codec behavior for DIDs not in DidConfig HOT 25
- ReadDataByIdentifier.py TimeoutException Did not receive response in time HOT 2
- send uds req with suppress postive response bit failed HOT 3
- Allow requesting a did without decoding it HOT 11
- Unexpected UDS Authentication message byte order(Subfunction 0x05,0x6) HOT 12
- IsoTPSocketConnection can not be closed with tpsock in blocking mode HOT 5
- struct.error on change_session interpret_response HOT 9
- PythonIsoTpConnection [cilent.py]send_request() tigger TimeoutException,then ISOTP rxthread_task run isotp_send() HOT 7
- IsoTPSocketConnection doesn't work with can-isotp versions 2 and up HOT 9
- Performance tests HOT 16
- When using CAN as a diagnostic channel,other application messages are sent periodically on the bus, calling the client.change_session interface will block at the self.conn.empty_rxqueue() interface. HOT 3
- cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py) HOT 8
- Act as server and parse python-can messages HOT 6
- No data received: [TimeoutException] Problem HOT 12
- ReadDataByIdentifier: no codec.encode() ? HOT 6
- Security access SAPR response not correctly interpreted HOT 3
- WriteDataByIdentifier service execution returned a negative response IncorrectMessageLengthOrInvalidFormat (0x13) when data length is correct HOT 4
- Adding parameter to Communication Control Service(0x28) HOT 10
- SecurityAccess mishandes a level value of 0 HOT 3
- SocketConnection cannot be closed HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-udsoncan.