| Author |
Message |
timi82 Guest
Free account, no CAN development support
|
13-01-2011, 19:27 Subject: OBD2 Simulator: PID00 Response Explained |
Quote |
|
Hello everyone,
I'm currently working on the topic of OBD2 with the goal of building an OBD2 simulator (CAN protocol), essentially simulating a vehicle.
I once connected a CAN-to-PC device to the connector of a diagnostic tool for testing purposes. I received the following message:
7DF 02 01 00 00 00 00 00 00
According to OBD-II PIDs, this message means the following:
7DF -> CAN ID, message originates from the diagnostic device.
02 -> The following are 2 data bytes.
01 -> Mode 01
00 -> PID00, Request: Supported PIDs [01 - 20]
... -> remaining bytes without any meaning.
Are we expecting the supported PIDs to be within the range of 01-20?
Based on the OBD-II PIDs, the response might look like this:
7E8 06 41 00 xx xx xx xx 00
7E8 -> CAN ID, message originates from the engine control unit.
06 -> The following are 6 data bytes.
41 -> Mode 01
00 -> PID00, Response: Supported PIDs [01 - 20]
xx xx xx xx -> Support PIDs.
00 -> no meaning.
Is this approach correct?
What is xx xx xx xx composed of? According to Wikipedia: Bit encoded [A7..D0] == [PID 0x01..PID 0x20].
Assuming I have a list of existing PIDs, do I set the corresponding bit for each one? For example, if PID01 is being transmitted, would I set bit A7 to 1?
It would be great if someone could help me with that.
Best regards,
Translated on 20-09-2026, 19:48.
|
|
| Back to top |
|
 |
svensation Guest
Free account, no CAN development support
|
02-02-2011, 23:15 Subject: OBD2 Simulator: Response to PID00 |
Quote |
|
Hello Timi,
dein Ansatz ist soweit richtig.
The response, using 0x40 + x, confirms the requested mode and repeats the PID. Then, for each PID (0x00, 0x20, 0x40, 0x60, ...), there are 4 bytes of bit-encoded information indicating which PIDs are supported in that mode. With PID 0x00, you request the range from 0x01 to 0x1F plus PID 0x20 , which is 31 valid PIDs, and additionally, you receive information about whether you should also request the subsequent key-PID (0x20). If this bit is 1, further supported PIDs in the higher ranges will follow.
Did I then set the corresponding bit for each existing PID, for example, if PID01 is transmitted, would bit A7 be set to 1?
No. Since this is a response, you don't need to add anything. However, you can see which PIDs are supported and then request them.
7DF 02 01 0D
for the vehicle speed. You can even have multiple...
PIDs in einer Anfrage haben, aber da weiß ich die genaue Anfrage jetzt nicht.
Best regards,
Sven.Best regards,
Translated on 20-09-2026, 19:52.
|
|
| Back to top |
|
 |
|