How to send request?

Hello,
can someone explin to me how can I send request to the car?
if I understand correct I need to send
7DF#0209020000000000
where “7DF” mean question to the “car”?
02 - mean - I want information
0902 - what I’m looking for?

am I right?
can someone maybe give some information about it?

Thanks,

You might want to read up a bit on OBD2 – most of the information is available on the web.

Here’s the breakdown:

7DF: arbitration info, i.e. id of the ECU you want to talk to. In this case: 7DF = functional broadcast = talking to everyone
02: Amount of data bytes following
09: PID 09, Vehicle Information
02: VIN

OK
but can you explain something ?

I have read this page on WiKi
https://en.wikipedia.org/wiki/OBD-II_PIDs

and there I can see there are 3 typs of services 01\02\09
so if I want to get the VIN
I understand I need to use Service 09 and PID 02 (for the vin)
the response is 17 bytes

so what is the first 02 I use in the send?
and also what is the PID answer will be ?
also 7DF? or something else?

for example I have try to send this:
according to the WiKi - 0A 20 ECU name
cansend can0 7DF#02090A
but I get no response from the car
what did I do wrong?
Thanks,

As mentioned, the first 02 is the amount of data bytes which are following (09 02).

This is because OBD2 requests are supposed to be full CAN frames, i.e., padded to 8 bytes.
On the wire, this command leads to:

(1634135175.912238) can0 7DF [3] 02 09 0A

Most ECUs will not answer to that. Instead, you will need to send

(1634135272.796716) can0 7DF [8] 02 09 0A AA AA AA AA AA

To get this, you issue, e.g. cansend can0 7DF#02090AAAAAAAAAAA
Then, you will get the start of the result, which is something like that:

(1634135272.798427) can0 7E8 [8] 10 17 49 0A 01 45 43 4D

Note that you will not get the full response unless you implement ISO-TP, which requires you to send flow-control ACK frames in return.

I see
I will read more about it -
thank you for the easy to understand explain :slight_smile: