I am trying to read vehicles VIN number using CAN Reader and my custom Python Code, following OBD2 specification and I cannot obtain the whole VIN number as I receive only one response back.
I noticed that after sending this:
7DF#0209005555555555
I get the response:
7E8#1014490201574241
When I translate 1014490201574241 into bitarray, I get the following:
>>> Response = "1014490201574241"
>>> ResponseByteArray = bytearray.fromhex(Response)
>>> ResponseByteArray
bytearray(b'\x10\x14I\x02\x01WBA')
Now, "WBA" are only the first 3 out of 17 characters of the VIN number, and I have not received any other messages from ECU.
I found this post: Flow control message while receiving CAN message with ELM327, which explains the concept of "First Frame" and "Flow Control". The post is saying that we have to send a "Flow Control" request to get the rest of the information. It also says that this needs to be sent directly to the address of the main ECU and not on the broadcast address of 7DF. In that example, they stated that the address of the main ECU is 7E0.
Questions:
- How did they know that the address of the main CPU is 7E0? Can that be determined somehow by sending some OBD2 requests?
- Under which standard things like "First Frame" and "Flow Control" are defined? I have not seen that in any of the OBD2 documentation I came across.
I was trying to obtain the VIN number using custom Python Code and CAN Reader connected to OBD2 port. I was expecting to receive the whole VIN number in multiple messages, but I received only the first one.