You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My vehicle follow the CAN protocol ISO 15765-4 (according to what is detected by a commercial obd app that successfully read my VIN)
When reading the VIN code by using kotlin-obd-api (connection via a bluetooth obd adapter), the VIN fails to be correctly decoded.
I get the formatted value: @ tcD$4DTdt�#3
instead of expected VIN: WF0DABCDEFGH01234
and the value in the ObdRawResponse is: 09 020140: 49 02 01 57 46 301: 44 41 42 43 44 45 462: 47 48 30 31 32 33 34
I notice that in the implementation Control.kt: parseVIN, there is nothing that discards the first two rows that corresponds to the command and the message bytes count.(if I change the replacement criteria to "^.{7}0:49020.".toRegex(), I get the expected VIN.
I didn't find any documentation that talks about the repeated command (first line 09 02 of the received message), either in the examples of the ELM327 chip documentation there is no mention to that, except that the message format can vary from one vehicle to another.
There is always the command repeated in the received message from my bluetooth interface.
Should I implement this case in this lib or maybe this is specific to my interface so I have to manage it on the bluetooth adapter side?
The text was updated successfully, but these errors were encountered:
Found in the ELM doc
By default echo is on so the ELM always send back our command, that is why i always receive the first line that causes my issue (that is actually not related to VIN Decoding)
Since kotlin-obd-api assumes echo to be set of when it handle the elm responses,
should we think about implementing a default setup method that would allow to reinitialize from scratch the ELM interface?
A sequence of ATZ, E0, and any other setting that is currently implicitely expected?
-> SetEchoCommand(OFF)
AugustinVoiMa
changed the title
VIN decoding for CAN (ISO 15765-4)
Need for an initialization of the ELM to setup expected settings
Feb 12, 2024
Hello,
My vehicle follow the CAN protocol ISO 15765-4 (according to what is detected by a commercial obd app that successfully read my VIN)
When reading the VIN code by using kotlin-obd-api (connection via a bluetooth obd adapter), the VIN fails to be correctly decoded.
I get the formatted value:
@ tcD$4DTdt�#3
instead of expected VIN:
WF0DABCDEFGH01234
The raw data transmitted are
and the value in the ObdRawResponse is:
09 020140: 49 02 01 57 46 301: 44 41 42 43 44 45 462: 47 48 30 31 32 33 34
I notice that in the implementation Control.kt: parseVIN, there is nothing that discards the first two rows that corresponds to the command and the message bytes count.(if I change the replacement criteria to
"^.{7}0:49020.".toRegex()
, I get the expected VIN.I didn't find any documentation that talks about the repeated command (first line 09 02 of the received message), either in the examples of the ELM327 chip documentation there is no mention to that, except that the message format can vary from one vehicle to another.
There is always the command repeated in the received message from my bluetooth interface.
Should I implement this case in this lib or maybe this is specific to my interface so I have to manage it on the bluetooth adapter side?
The text was updated successfully, but these errors were encountered: