Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Engine Management, OBD-II, Engine Diagnostics, etc.


Reply
 
Share Thread Tools Display Modes
Old 06-21-2008, 02:35 PM   #1
Newbie
 
Join Date: Apr 2008
Posts: 20
thunderfox5 is an unknown quantity at this point
OBD2 / Elm327 Developers - Please Aid

Okay here's the thing. I'm programming my own car PC software and I'm almost done with every feature except for the OBD2 protocol.

I will be using the ELM327 for my program, and what I'm searching for is either a library (compatible with C#) for my program, which will manage the connection to the ELM and data retrieving, or someone who can provide me a small explanation of how the ELM327 works (mainly how it is initialized, and how data is sent / received through the COM stream).

So if anyone can help, please feel free to do so on this thread or add me on MSN:

thunderfox5<at>hotmail<dot>com

Cheers!
thunderfox5 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 06-21-2008, 03:40 PM   #2
Newbie
 
Join Date: Jun 2008
Posts: 38
techbod is an unknown quantity at this point
ill try to explain, say your car is KWP2000 ( thats the protocol for engine management ) as said before and works in ASCII or OBDII/EOBD now CAN bus its a protocol on its own so basicly ELM327 has 2 interfaces built into it and works best with USB2 because its a faster network but you can use the serial side but as said by another member it has to be buffered because serial is too slow thats why is has the XON/XOFF and has to be turned on in your device manager if your going to use serial connection,
hopefully this will shed a little light on the subject as this is where people tend to go wrong
techbod is offline   Reply With Quote
Old 06-21-2008, 05:22 PM   #3
Newbie
 
Join Date: Apr 2008
Posts: 20
thunderfox5 is an unknown quantity at this point
Quote: Originally Posted by techbod View Post
ill try to explain, say your car is KWP2000 ( thats the protocol for engine management ) as said before and works in ASCII or OBDII/EOBD now CAN bus its a protocol on its own so basicly ELM327 has 2 interfaces built into it and works best with USB2 because its a faster network but you can use the serial side but as said by another member it has to be buffered because serial is too slow thats why is has the XON/XOFF and has to be turned on in your device manager if your going to use serial connection,
hopefully this will shed a little light on the subject as this is where people tend to go wrong

That, I already know. What I need to know is how to initialize the ELM, in this case, for both interfaces. Basically a brief description of the ELM327 communication protocol.
thunderfox5 is offline   Reply With Quote
Old 06-21-2008, 07:24 PM   #4
Constant Bitrate
 
Join Date: Mar 2007
Location: Rutherford, Australia
Posts: 150
Lukeyson is an unknown quantity at this point
The ELM327 datasheet lists all the commands necessary to select the protocol, issue commands and receive data. The ELM can only operate using one protocol at a time, unlike a lot of other tools.

As for a library, the only thing that comes close is the source the Scantool software at scantool.net.

Cardix is an SDK that was adding support for ELM at some point. At the moment I think it's primarily J2534.


Lukeyson
Lukeyson is offline   Reply With Quote
Old 06-21-2008, 07:43 PM   #5
Newbie
 
Join Date: Apr 2008
Posts: 20
thunderfox5 is an unknown quantity at this point
That I know too. The problem is that the command table on the ELM327 ref sheet does not tell how they are to be used (i.e. order for initialization, how data is retrieved, etc), it only lists the commands.
thunderfox5 is offline   Reply With Quote
Old 06-21-2008, 07:56 PM   #6
Maximum Bitrate
 
colin's Avatar
 
Join Date: Dec 2006
Posts: 620
colin will become famous soon enoughcolin will become famous soon enough
This is in perfect timing for me, I'd like to know how to use the ELM327 as well.

Apparently Scantool.net is open source so you can check out how they do it, however it's much much simpler to just follow some instructions and send the commands rather than decode someones source in a different language.
colin is offline   Reply With Quote
Old 06-21-2008, 08:03 PM   #7
glm
Banned
 
Join Date: Apr 2008
Posts: 20
glm is an unknown quantity at this point
If you haven't already got it, as Lukeyson pointed out the datasheet from Elm Electronics is a good place to start for the Elm AT commands, but to know what to send and how to interpret the responses you'll need a copy of SAE J1939 or ISO 150310-5 to proceed further.

Graham McKechnie
GLM Software
www.glmsoftware.com

Last edited by glm; 06-22-2008 at 03:00 AM. Reason: Typo J1939 should have been J1979
glm is offline   Reply With Quote
Old 06-21-2008, 09:41 PM   #8
North of the land of Hey Huns
 
Join Date: Jun 2004
Location: Westminster, MD
Posts: 1,038
malcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to all
I'm working on a c++ OBD2 (ISO) interface library, however its based off of the ELM from here: http://www.obdpros.com/ Not sure if that is compatable with what you are working with, but I can port it to c# when I'm finished if it is.
malcom2073 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 06-22-2008, 01:46 AM   #9
Newbie
 
Join Date: Jun 2008
Posts: 38
techbod is an unknown quantity at this point
im an old tech and these new systems intrigue me because the dealers are screwing us in costs for very basic none fault codes thinking we are dumb now im starting to learn more since I retired and using it to help those who cant afford dealer prices,
im no programmer so just got basic knowledge in this area but when it comes to diagnosing and fixing cars that's my area of expertise so its a need to know thing with me in fact I think I'm getting obsessed with it lol ( your never too old to learn ) my father told me that many years ago and its taken over my life "not much else to do at my age" but it keeps my mind busy so I don't turn into an old fossil, I glad to see so much enthusiasm on this subject it really helps
techbod is offline   Reply With Quote
Old 06-22-2008, 02:52 AM   #10
Constant Bitrate
 
Join Date: Mar 2007
Location: Rutherford, Australia
Posts: 150
Lukeyson is an unknown quantity at this point
Actually, if you're at the point of issuing commands to get data out of modules, you might be beyond the mere scope of the tools and into the realms of the standards.

J1979 - is the first standard - it's across all cars but only gets basic stuff out of the PCM.
J2190 - is very bloody useful, and outlines the standards by which modules can be manipulated.

14229-1 would be useful - Universal Diagnostics. ie diagnostics on your protocol
15765-3 is also useful - diagnostics on CAN.

These are a bit of a re-hash on J2190, but are still useful as well.

As for the rest - well, you have to get through the big black door. All of the data in these modules is considered prioritary and confidential, so is not released to the public. But you can subscribe to ETI if you're rich and can access vendor data that way. If you want to write commerical software you have to licence the proprietary data from a manufacturer - and that ain't cheap either. Just ask Brian from PalmerPerformance!


Lukeyson
Lukeyson is offline   Reply With Quote
Old 06-22-2008, 03:30 AM   #11
Newbie
 
Join Date: Jun 2008
Posts: 38
techbod is an unknown quantity at this point
actually I understand what your saying there and its opening doors for me because the protocol is the interesting part and how the manufacturers manipulate this stuff so its only a matter of time before walls are broken down, CAN isn't new its been around for many years its just that there wasn't the need for me to understand it purely because it was in industry use but now its officially in cars that makes things different.

edit: im still into the old way of probing the ECU via a breakout box (bob) which is still the most direct way in as long as the values are known and I have software thats give me this information and many garages use it, it just takes longer and the new way sounds pretty good and a time saver as long as the data can be relied on ( software being the issue ) and thats where costs come into it

Last edited by techbod; 06-22-2008 at 03:59 AM.
techbod is offline   Reply With Quote
Old 06-22-2008, 07:37 AM   #12
Newbie
 
Join Date: Nov 2007
Posts: 11
Himszy is an unknown quantity at this point
http://www.mp3car.com/vbulletin/engi...vb6-class.html
Himszy is offline   Reply With Quote
Old 06-22-2008, 11:13 AM   #13
Newbie
 
Join Date: Jun 2008
Posts: 5
hypest is an unknown quantity at this point
Maybe this will help you start:

I'm using a bluetooth based ELM327 on my 2007 Citroen C4. The ELM communication is simply ASCII so the following can be tested even using a simple terminal program, like HyperTerminal which comes with Windows XP (character case is not important):

- after opening the port, send "atz" to initialize the ELM. Actually, this init is optional, but do it just to be sure. In more advanced scenarios, "atz" may be unwanted so "atws" can be used to "warm start" the ELM.
- Issue "ATL1" to enable the line feeds when using Hyperterminal so the results will be easier read.
- now you can send "almost raw" hex numbers that correspond to the OBD2 mode and PID you want to access. The "tricky" part here is that you actually send the ASCII chars of the bytes! Example:
To read the mode 1, PID 0 data that are the bitmask of the supported PIDs from 00-20, you need to send "0100" (without "AT"... this is not an AT command). So, 4 ascii chars must be send to the serial: "0" (ascii 48), "1" (ascii 49), "0" (ascii 48) and "0" (ascii 48). the answer from ELM will be 6 "hex bytes" (in ascii form!). Check also http://en.wikipedia.org/wiki/OBD-II_PIDs for a list of PIDs and answers.

so, no special initialization is needed for simple usage.
hypest is offline   Reply With Quote
Old 06-25-2008, 07:07 AM   #14
AZ1
Newbie
 
Join Date: Feb 2008
Posts: 4
AZ1 is an unknown quantity at this point
Good day,



Jus a quick note to let you know that I have built circuit in Page 49 RS232 figure 9 using PCB given in your side, to communicate with the vehicle, am currently having a concern / problem with the chip responding with unknown values, chip responds with something like this: ÿ þ and þþ or responds þþ ¾ þþ if u query about the vehicle VIN no whereby Scantool ELM5 gives correct VIN.

my VB software is working 100% I have tested it with ELM5 hardware from Scantool. And communicates with my vehicle (CAN Bus) well.

RS232 Tx and Rx LEDs flash but my OBD-II Tx and Rx LEDs only flash first time you power it up: I have jumped pin 28 and the ground as explianed in page 39, but didn’t help



Didn’t touch any of PP commands / AT commands or baud rate settings, please now that chip is in defualt





Please advise



Thanks



Zaki
AZ1 is offline   Reply With Quote
Old 06-25-2008, 08:11 AM   #15
Maximum Bitrate
 
colin's Avatar
 
Join Date: Dec 2006
Posts: 620
colin will become famous soon enoughcolin will become famous soon enough
Hijacked much?
colin is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Ice and Nghost looking for developers wirelessdreamer LinuxICE 5 08-16-2009 07:05 AM
Can someone confirm that i can use the Bluetooth ELM327 Scan Tool Scanner OBD2 OBD-II lucegunz Engine Management, OBD-II, Engine Diagnostics, etc. 2 05-05-2008 06:25 AM
VB6 Source and Elm327 for OBD2 planethax Engine Management, OBD-II, Engine Diagnostics, etc. 16 04-05-2008 05:47 PM
"Revolutionary" Product CaffeineAddict Off Topic 5 06-16-2002 04:06 AM



All times are GMT -5. The time now is 05:28 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics