EricSmekens / node-serial-obd

Node package for communication with serial OBD connectors.
Other
64 stars 23 forks source link

Due to the VIN is 17 ASCII chars, add a function to convert it to a char #6

Closed Joouis closed 9 years ago

Joouis commented 9 years ago

Due to the VIN is 17 ASCII chars, add a function to convert it to a char: As the example given in datasheet, the input is "31 44 34 47 50 30 30 52 35 35 42 31 32 33 34 35 36" And the output should be "1 D 4 G P 0 0 R 5 5 B 1 2 3 4 5 6" So I add this function to do this job

Change the name of pin01 in Mode9 refer to the manual: Mode 9 01 01 VIN message count 02 02 VIN (vehicle identification number)

EricSmekens commented 9 years ago

This looks good and usefull. Do you have any reference on how OBD2 works like this? (Just interested).

Joouis commented 9 years ago

http://elmelectronics.com/DSheets/ELM327DS.pdf The page 42 gives an example that request for the 17 digit VIN.

EricSmekens commented 9 years ago

I will try to test it soon, and then maybe release a new version if necessary.

If you have the time and you want it, you can submit the same PR on node-bluetooth-obd, otherwise I will merge this PR soon.