Announcement

Collapse
No announcement yet.

OBD2 / Elm327 Developers - Please Aid

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #2
    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

    Comment


    • #3
      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.

      Comment


      • #4
        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

        Comment


        • #5
          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.

          Comment


          • #6
            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.
            2001 Mustang Convertible Worklog
            Indigo Custom Frontend (Flash/Delphi)
            Blog

            Qube v1.3 Now Available at the mp3Car Store!!!!!!
            The simplest IO controller you'll ever use!

            Comment


            • #7
              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

              Comment


              • #8
                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.
                "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
                RevFE
                My Shop

                Comment


                • #9
                  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

                  Comment


                  • #10
                    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

                    Comment


                    • #11
                      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

                      Comment


                      • #12
                        http://www.mp3car.com/vbulletin/engi...vb6-class.html

                        Comment


                        • #13
                          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.

                          Comment


                          • #14
                            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

                            Comment


                            • #15
                              Hijacked much?
                              2001 Mustang Convertible Worklog
                              Indigo Custom Frontend (Flash/Delphi)
                              Blog

                              Qube v1.3 Now Available at the mp3Car Store!!!!!!
                              The simplest IO controller you'll ever use!

                              Comment

                              Working...
                              X