Differences
This shows you the differences between two versions of the page.
carberry:cmds:subsys:obd:query_new:query [2017/06/29 17:00] |
carberry:cmds:subsys:obd:query_new:query [2019/09/30 13:44] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== OBD QUERY ===== | ||
+ | This command, can be used to query informations from OBD\\ | ||
+ | Please refer to [[https://en.wikipedia.org/wiki/OBD-II_PIDs|OBD-II PIDs]] | ||
+ | OBD query replies are managed in multi-frame format if data payload exceeds 7 bytes. | ||
+ | |||
+ | Starting from firmware version v1.17 is possible to trasmit requests over K-line connecting the LIN wire to K-line. | ||
+ | To directing the messages on K-line use the format OBD QUERY K. | ||
+ | |||
+ | |||
+ | ==== Synopsis ==== | ||
+ | |||
+ | OBD QUERY CH<1/2>|K <mode><PID> | ||
+ | |||
+ | ==== Arguments ==== | ||
+ | |||
+ | ^Param ^Description^Range^ | ||
+ | |<mode>|mode for placing query value.|0x00 - 0xFF| | ||
+ | |<PID>|PID of which query value.|0x00 - 0xFFFFFFFFFFFF (1 to 6 bytes)| | ||
+ | |||
+ | |||
+ | ==== Return ==== | ||
+ | |||
+ | Then the ECU in the car, replies with its message containing requested data.\\ | ||
+ | Query command returns OBD data values returned by the vehicle.\\ | ||
+ | If the response len is max 7 bytes then the format of the data returned to user terminal is the following: | ||
+ | |||
+ | <VAL> [<VAL>] [<VAL>] [<VAL>] | ||
+ | OK | ||
+ | |||
+ | For CAN bus connection if the response len is greater than 7 bytes then the format of the data returned to user terminal is the following: | ||
+ | <len> ( 3 HEX chars ) | ||
+ | 0: <VAL><VAL><VAL><VAL><VAL><VAL> | ||
+ | [n: <VAL><VAL><VAL><VAL><VAL><VAL>] a number of indexed rows to reach len qty | ||
+ | OK | ||
+ | |||
+ | The reply contain bytes always represented in HEX notation and separed by one ASCII space. | ||
+ | |||
+ | ==== Examples ==== | ||
+ | |||
+ | Query air temperature (CAN bus): | ||
+ | |||
+ | OBD QUERY CH1 010F | ||
+ | 03 64 | ||
+ | OK | ||
+ | | ||
+ | Query engine RPMs (CAN bus): | ||
+ | |||
+ | OBD QUERY CH1 010C | ||
+ | 13 25 | ||
+ | OK | ||
+ | |||
+ | Query engine RPMs (K-line): | ||
+ | |||
+ | OBD QUERY K 010C | ||
+ | 13 25 | ||
+ | OK | ||
+ | |