If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
OBDII communication
11 posts
• Page 1 of 2 • 1, 2
OBDII communication
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.
- Attachments
-
- ComPort_OBDII_Start9.fsm
- (180.21 KiB) Downloaded 1261 times
-
- odbii.png (18.24 KiB) Viewed 27913 times
Last edited by acg2010 on Sun Nov 02, 2014 7:50 pm, edited 2 times in total.
- acg2010
- Posts: 80
- Joined: Tue Oct 05, 2010 3:18 am
Re: OBDII communication
For comparison, here is the Hyperterminal capture:
ati
ELM327 v1.5
>atsp0
OK
>0100
SEARCHING...
41 00 BF 9F B9 90
>0102
NO DATA
>0905
STOPPED
>010c
41 0C 0D DA
>09025
STOPPED
>0105
STOPPED
>ati
ELM327 v1.5
>atsp0
OK
>
0100
SEARCHING...
STOPPED
>
ati
ELM327 v1.5
>atsp0
OK
>0100
SEARCHING...
41 00 BF 9F B9 90
>0102
NO DATA
>0905
STOPPED
>010c
41 0C 0D DA
>09025
STOPPED
>0105
STOPPED
>ati
ELM327 v1.5
>atsp0
OK
>
0100
SEARCHING...
STOPPED
>
- acg2010
- Posts: 80
- Joined: Tue Oct 05, 2010 3:18 am
Re: OBDII communication
if you use the setting "Hex" with true,
your message must be in hex format,
from your log it seems that you are sending it as a string.
and the preparation command ATSP0 return nothing, not OK, so it can't read.
however, here I found a datashet for the chip and protocol.
http://elmelectronics.com/DSheets/ELM327DS.pdf
and it would seem that the LineFeed can be enabled or disabled, or change the character assigned.
your message must be in hex format,
from your log it seems that you are sending it as a string.
and the preparation command ATSP0 return nothing, not OK, so it can't read.
however, here I found a datashet for the chip and protocol.
http://elmelectronics.com/DSheets/ELM327DS.pdf
and it would seem that the LineFeed can be enabled or disabled, or change the character assigned.
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: OBDII communication
Thanks Tronic,
As I mentioned in my original post, I already had the ELM327 manual that you referenced. But your comments prompted me to try some things:
I tried adding a string to ASCII module in-between the text box input and the data connector on the com port. Then tried several different combinations of turning hex on/off, null to true/false but that did not work.
Then I tried the string to Hex module same combinations but also did not work. The only time I can receive back data is when I send a string only with the Hex on the com port set to true. I can connect to the ELM327 adapter but don't seem to have something set up properly.
Hyperterminal readout demonstrates that I can talk to the ELM327 and I have used the android phone app "Torque" (free version) and was able to pull up all the vehicle parameters so I know there is not an issue with the ELM 327 adapter or the Bluetooth connection.
Again, thanks for the suggestions Tronic. I will continue working on it.
As I mentioned in my original post, I already had the ELM327 manual that you referenced. But your comments prompted me to try some things:
I tried adding a string to ASCII module in-between the text box input and the data connector on the com port. Then tried several different combinations of turning hex on/off, null to true/false but that did not work.
Then I tried the string to Hex module same combinations but also did not work. The only time I can receive back data is when I send a string only with the Hex on the com port set to true. I can connect to the ELM327 adapter but don't seem to have something set up properly.
Hyperterminal readout demonstrates that I can talk to the ELM327 and I have used the android phone app "Torque" (free version) and was able to pull up all the vehicle parameters so I know there is not an issue with the ELM 327 adapter or the Bluetooth connection.
Again, thanks for the suggestions Tronic. I will continue working on it.
- acg2010
- Posts: 80
- Joined: Tue Oct 05, 2010 3:18 am
Re: OBDII communication
I think you can send strings directly, you do not need the hex mode,
and I think you forgot to add the line-end character to your messages.
however, I have attached the schematic, and a link to arduino implementation.
https://code.google.com/p/opengauge/sou ... bduino.pde
and I think you forgot to add the line-end character to your messages.
however, I have attached the schematic, and a link to arduino implementation.
https://code.google.com/p/opengauge/sou ... bduino.pde
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: OBDII communication
Tronic you are a Genius!
I stripped down the com port tester to its bare bones to eliminate any issues with the logging modules, added the integer module and ascii to string module as you suggested, set RXTerminator and control character in the interger module to 13 for <CR>,and Wha La! I was able to get back the same responses as the hyperterminal gave (see export below). IT WORKS! Woo Hoo! I had been working on this for a couple of weeks and getting no where till your help. Thank you so much.
Now I have to develop the complete communication to get the PID output, apply the math to convert to the hex output to float values then use the float values to drive gauges and dials to indicate the car parameters. Your link to the arduino project will help greatly with this.
Exported output from Flowstone com port
COM6:Open
Received 30 bytes : "+CONNECTING<<00:02:72:A9:37:22"
Received 1 byte : "?"
Received 0 bytes : ""
Received 8 bytes : ">NNECTED"
Received 1 byte : "?"
Received 0 bytes : ""
Sent 4 bytes : "ati
"
Received 4 bytes : ">ati"
Received 11 bytes : "ELM327 v1.5"
Received 0 bytes : ""
Sent 6 bytes : "atsp0
"
Received 6 bytes : ">atsp0"
Received 2 bytes : "OK"
Received 0 bytes : ""
Sent 5 bytes : "0100
"
Received 5 bytes : ">0100"
Received 12 bytes : "SEARCHING..."
Received 18 bytes : "41 00 BF 9F B9 90 "
Received 0 bytes : ""
I stripped down the com port tester to its bare bones to eliminate any issues with the logging modules, added the integer module and ascii to string module as you suggested, set RXTerminator and control character in the interger module to 13 for <CR>,and Wha La! I was able to get back the same responses as the hyperterminal gave (see export below). IT WORKS! Woo Hoo! I had been working on this for a couple of weeks and getting no where till your help. Thank you so much.
Now I have to develop the complete communication to get the PID output, apply the math to convert to the hex output to float values then use the float values to drive gauges and dials to indicate the car parameters. Your link to the arduino project will help greatly with this.
Exported output from Flowstone com port
COM6:Open
Received 30 bytes : "+CONNECTING<<00:02:72:A9:37:22"
Received 1 byte : "?"
Received 0 bytes : ""
Received 8 bytes : ">NNECTED"
Received 1 byte : "?"
Received 0 bytes : ""
Sent 4 bytes : "ati
"
Received 4 bytes : ">ati"
Received 11 bytes : "ELM327 v1.5"
Received 0 bytes : ""
Sent 6 bytes : "atsp0
"
Received 6 bytes : ">atsp0"
Received 2 bytes : "OK"
Received 0 bytes : ""
Sent 5 bytes : "0100
"
Received 5 bytes : ">0100"
Received 12 bytes : "SEARCHING..."
Received 18 bytes : "41 00 BF 9F B9 90 "
Received 0 bytes : ""
- Attachments
-
- ComPort_OBDII_Start12.fsm
- (176.91 KiB) Downloaded 1271 times
- acg2010
- Posts: 80
- Joined: Tue Oct 05, 2010 3:18 am
Re: OBDII communication
Thanks you're too kind,
So, have fun ...
So, have fun ...
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: OBDII communication
Sweet! For OBDII, the biggest hurdle for me was understanding the COM port communication -which is way over my head. I'll have to break it down some using your file. I would love to make some custom tools in FS.
*Edit
Picked up the interface and bluetooth adapter. Pretty cheap!
*Edit
Picked up the interface and bluetooth adapter. Pretty cheap!
-
FluxCapacitance - Posts: 14
- Joined: Sun Feb 02, 2014 2:47 am
Re: OBDII communication
Yes, I had trouble with the com port communication too but Tronic sorted it out for me.
Yeah I seen some adapters for like $6 (not including shipping). I chose the adapter I ordered because its suppose to read all protocols and the compact size should fit in almost all vehicle ODBII connectors. I'll be posting updates as the project progresses. Hope you will too.
Yeah I seen some adapters for like $6 (not including shipping). I chose the adapter I ordered because its suppose to read all protocols and the compact size should fit in almost all vehicle ODBII connectors. I'll be posting updates as the project progresses. Hope you will too.
- acg2010
- Posts: 80
- Joined: Tue Oct 05, 2010 3:18 am
Re: OBDII communication
Definitely. I'll be following along.
-
FluxCapacitance - Posts: 14
- Joined: Sun Feb 02, 2014 2:47 am
11 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 14 guests