OBDII communication
Posted: Sun Oct 19, 2014 6:15 pm
FYI - Moving this project to the Machine Control section of forum 11/2/14, acg2010
I am working on a OBDII Monitoring and Diagnostic schematic/module starting with just the com port module and some logging to experiment with. My set up is a Super-Mini ELM327 Bluetooth OBDII adapter for the car, a laptop with bluetooth and running Flowstone and Hyperterminal. I can connect and communicate with the OBDII adapter with the Hyperterminal and get back responses I would expect. I can connect to the OBDII adapter and sort of communicate using a com port module. However, it doesn't seem to behave as I would expect. First, it was my understanding that the ELM327 communicates utilizing ASCII. However, with the Flowstone com port, I have to have Hex set to true for any communication to work. Also I thought the RXTerminator should be a <CR> (13) but only works with a line feed (10). Also when I send standard "A" ELM327 commands (ATZ, ATI, etc.) I get back a Hex response as I would expect. But when I try a PID command (0101, 101c, etc.), I do not get back a response.
I got the idea for this project from the DSPRobotics Blog here: http://dsprobotics.blogspot.com/2011/09 ... stics.html However, they give little info/details. I have the ELM327 manual, have researched on the internet but can't seem to solve this issue. I thought I had an understanding of the com port module but maybe not. Ultimately I would like to create a software tool Like ScanTool or Torque for realtime monitoring and diagnostics of the vehicle parameters (fuel, RPMs, speed, OX sensr, etc.).
I have attached the fsm. Can't attach a copy of the log generated from it. But here is a portion of it:
10h46m49.765
COM6:Open
Sent 1 bytes of hex : "atz"
Sent 1 bytes of hex : "atz"
Received 50 bytes of hex : "3F0D0D3E2B434F4E4E454354494E473C3C30303A30323A37323A41393A33373A32320D3F0D0D3E4E45435445440D3F0D0D3E"
3F0D0D3E2B434F4E4E454354494E473C3C30303A30323A37323A41393A33373A32320D3F0D0D3E4E45435445440D3F0D0D3E
COM6:Open
Received 30 bytes of hex : "2B434F4E4E454354494E473C3C30303A30323A37323A41393A33373A3232"
2B434F4E4E454354494E473C3C30303A30323A37323A41393A33373A3232
COM6:Open
Received 30 bytes of hex : "2B434F4E4E454354494E473C3C30303A30323A37323A41393A33373A3232"
Received 1 byte of hex : "3F"
10h48m57.479 Sent 1 bytes of hex : "atz"
Sent 1 bytes of hex : "atz"
Received 3 bytes of hex : "3E0A0A"
3E0A0A
Sent 1 bytes of hex : "ati"
3E0A0A
Sent 1 bytes of hex : "ati"
Received 0 bytes of hex : ""
Sent 1 bytes of hex : "atz"
Received 3 bytes of hex : "3E0A0A"
Sent 2 bytes of hex : "atsp0"
Received 0 bytes of hex : ""
10h51m18.201
Sent 2 bytes of hex : "010c"
10h52m13.651
Sent 2 bytes of hex : "0100"
If anyone has any thoughts or suggestions, I would greatly appreciate it.
I am working on a OBDII Monitoring and Diagnostic schematic/module starting with just the com port module and some logging to experiment with. My set up is a Super-Mini ELM327 Bluetooth OBDII adapter for the car, a laptop with bluetooth and running Flowstone and Hyperterminal. I can connect and communicate with the OBDII adapter with the Hyperterminal and get back responses I would expect. I can connect to the OBDII adapter and sort of communicate using a com port module. However, it doesn't seem to behave as I would expect. First, it was my understanding that the ELM327 communicates utilizing ASCII. However, with the Flowstone com port, I have to have Hex set to true for any communication to work. Also I thought the RXTerminator should be a <CR> (13) but only works with a line feed (10). Also when I send standard "A" ELM327 commands (ATZ, ATI, etc.) I get back a Hex response as I would expect. But when I try a PID command (0101, 101c, etc.), I do not get back a response.
I got the idea for this project from the DSPRobotics Blog here: http://dsprobotics.blogspot.com/2011/09 ... stics.html However, they give little info/details. I have the ELM327 manual, have researched on the internet but can't seem to solve this issue. I thought I had an understanding of the com port module but maybe not. Ultimately I would like to create a software tool Like ScanTool or Torque for realtime monitoring and diagnostics of the vehicle parameters (fuel, RPMs, speed, OX sensr, etc.).
I have attached the fsm. Can't attach a copy of the log generated from it. But here is a portion of it:
10h46m49.765
COM6:Open
Sent 1 bytes of hex : "atz"
Sent 1 bytes of hex : "atz"
Received 50 bytes of hex : "3F0D0D3E2B434F4E4E454354494E473C3C30303A30323A37323A41393A33373A32320D3F0D0D3E4E45435445440D3F0D0D3E"
3F0D0D3E2B434F4E4E454354494E473C3C30303A30323A37323A41393A33373A32320D3F0D0D3E4E45435445440D3F0D0D3E
COM6:Open
Received 30 bytes of hex : "2B434F4E4E454354494E473C3C30303A30323A37323A41393A33373A3232"
2B434F4E4E454354494E473C3C30303A30323A37323A41393A33373A3232
COM6:Open
Received 30 bytes of hex : "2B434F4E4E454354494E473C3C30303A30323A37323A41393A33373A3232"
Received 1 byte of hex : "3F"
10h48m57.479 Sent 1 bytes of hex : "atz"
Sent 1 bytes of hex : "atz"
Received 3 bytes of hex : "3E0A0A"
3E0A0A
Sent 1 bytes of hex : "ati"
3E0A0A
Sent 1 bytes of hex : "ati"
Received 0 bytes of hex : ""
Sent 1 bytes of hex : "atz"
Received 3 bytes of hex : "3E0A0A"
Sent 2 bytes of hex : "atsp0"
Received 0 bytes of hex : ""
10h51m18.201
Sent 2 bytes of hex : "010c"
10h52m13.651
Sent 2 bytes of hex : "0100"
If anyone has any thoughts or suggestions, I would greatly appreciate it.