Open SalvoQuattropani opened 4 years ago
I think you are going to have to dig into this and see what isn't working. Nothing stands out from the log
Can you suggest me a way to investigate more deeply?
Thanks a lot
Start by adding print statements everywhere. See if you can figure out why your message is too short.
The 3-byte response is a "Negative Response Code (NRC)". It indicates that the ECU returned some sort of error in response to the request.
Unfortunately, I don't know what a response code of $7F means. I also don't have access to the latest version of SAE J1979, so it may be a newer code. The version I have is from 2006. Does anyone else have access to the latest version of SAE J1979?
If you can find out what an NRC with a response code of $7F means, it might get you closer to figuring out what is wrong.
It is odd that the CAN ID in the response is $7EC. This is the CAN ID for a response from ECU#5. I would have expected the response to come from ECU#1, which would respond with a CAN ID $7E8.
By default, the ELM327 issues all requests with CAN ID $7DF, which should cause all emissions related ECUs to respond (there could be more than 1.) You could try forcing the CAN ID to $7E0, so that only ECU#1 responds using the ATSH command like this:
AT SH 7E0
You could manually enter this command using a serial terminal, then enter '0100' and see if you get something different.
Otherwise, if you'd prefer to use this library, and you're up to modifying its code, I think you could force the obd library to do the ATSH command for you if you change the init function for the OBD class in obd/obd.py to set the __last_command to something other than '7E0' like this:
def __init__(...
...
self.__last_command = b'7DF'
This should cause the library to issue the ATSH 7E0 command before sending the command to get supported PIDs.
By the way, @alistair23, it seems like the code is assuming that the ELM327 uses a CAN ID of '7E0' by default, which is not true; so I think this is a bug. I'm not sure how to fix it though, because the change I suggested above would only work with 11-bit CAN, and it would break any other protocol.
Thanks guys, I try what you suggested and I will let you know as soon as possible.
I've skimmed through the 2007 version of SAE J1979 and ISO 14229. It appears the response code $7F is for "serviceNotSupportedInActiveSession". Some parameters require SecurityAccess seed/key response from diagnostic equipment. I'm not sure through; I'm just reading through this for the first time.
§9.4 http://read.pudn.com/downloads191/doc/899044/ISO+14229+(2006).pdf
Hi guys, thanks for your support! I have tried everything but to no avail. I'm stuck and don't know how to proceed. Other ideas? In case the key seed is needed, how should I proceed? :( Thanks in advance
7f means -- > Service Not Supported In Active Session This NRC will return by the server if the requested service identifier is not supported in this session.
example document guide :
session mode -->
working example --> sending command -- > 0x10 0x01 in above example you're sendig "10 01" and so following the above document, now I'm in "operation mode session" as I'm sending (0x01) and service I'm requesting (0x10) which lies in operation mode so I'll get the positive response.
Error Not Working Example -- > sending command --> 0x20 0x01 now you are trying to request the service "20" which lies in diagnostic mode. and trying to access it from (0x01) that lies in "operation mode".
So check your document/guide properly from where you're following this code guide. That will solve your problems.
Hi everyone, I'm trying to read data from my mercedes sprinter 2015, I can connect to the vehicle but I always get for every command -> "... is not supported". If I set force = True, I get incorrect values because the elm always returns me 7F 01 7F. Can you help me? I am working on a research project and need to read this information. Strangely, on my Fiat I can read all the information.
Thanks in advance