Announcement

Collapse
No announcement yet.

J2534 programming in VB.Net

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

  • J2534 programming in VB.Net

    Hello,

    If this is in the wrong section, please move.

    I'm seeking advice on (you guessed it) programming with a J2534 PassThru adaptor in VB.Net. More specifically, It's a FEPS enabled Ford Mongoose from DrewTech that I want to use to (at the moment) read PIDs from my ECU and then log them into a database. I'm quite confident that I can accomplish adding data to the database, however I cannot do this without being able to request PID data and this is where I'm doing my head in trying to get this to work.

    Using the VB6 source code from the DrewTech website, I can get the program to open the connection to the Mongoose through the DLL and then establish the proper communication settings or at least I think it does because the red light flashes when I connect/disconnect to the device and the green light changes from flashing fast to slow. Though as far as requesting PID data, I'm not having any luck.

    Also, previously I had an ELM 327, however I foolishly tried to extend the OBDII cable using two null modem cables, causing permanent damage to the ELM. I can still read data using PCMSCAN or DataPro with the Mongoose (however I can only get a few PIDs to work, and only slowly), but I want to have my own program do this.

    Here is a link to the program so far:
    www.qantec.net/Downloads/Mongoose.zip

    Sorry for the long post, I want to be as detailed as necessary.

    If anybody could tell me how to request PID data or at least what I'm doing wrong I would be most greatful.

    Stiff

    Edit: forgot to add url for DrewTech VB6 source code
    http://www.qantec.net/Downloads/Drew...SourceCode.zip

  • #2
    Hello..

    have a read of this http://en.wikipedia.org/wiki/OBD-II_PIDs#Query and
    http://digitaldeviation.com/content/...on-source-code

    good luck, let us know how you get one.

    D

    Comment


    • #3
      J2534 is not the same as ELM, though.

      Stiff, have a look at http://www.openecu.org/index.php?title=J2534
      It's really sparse, but it's the only thing I know of.

      Comment


      • #4
        Sorry for the delay, due to time constraints I have decided to use an ELM 327, however I will hopefully be adding support for J2534 devices in the near future.

        For those that are interested, here is a link to my program:
        http://rapidshare.com/files/14677248...rv0.4.exe.html

        Currently your elm needs to be on COM4 for the program to work and you cannot change the serial port settings.
        To connect, click on connection and then connect.
        It will log data by pressing "button2", however that is all it does for right now, no conversion from hexadecimal or displaying of data.
        You can however display data without logging it if you press "button1", a word of warning though - the data you will see will be raw data, no conversion from hexadecimal or kind of formatting.
        I'll try to remember to post back when I get more of it completed.

        Thanks for the help.

        Stiff

        Comment


        • #5
          Heya Stiff,
          A long shot, I know, but did you succeed in adding support for J2534?

          Appreciate your feedback
          F6 Tornado Project Log ; HP Blackbird Watercooled Server

          Beta Tester for Centrafuse and 3dConnexion (No business affiliation with either)

          Comment


          • #6
            J2534 .net library

            Hey guys,
            If you're still trying to use J2534 in .net, I uploaded a library I wrote that simplifies it a little bit. Take a look at the sample code (it's in C#, but feel free to email me if you have any questions).
            https://github.com/mkelly/J2534DotNet

            Comment


            • #7
              link to drewtech vb6 dead

              Comment


              • #8
                Originally posted by planethax View Post
                link to drewtech vb6 dead
                The sample code with the library I linked to will auto-detect all installed J2534 devices, and includes examples of sending OBD-II commands. I tested it on a DrewTech Mongoose and a Dearborn Group Gryphon.

                Comment


                • #9
                  May need to learn .Net, but everything else I have done is in VB6
                  Still looking for the VB6 source

                  Comment


                  • #10
                    Originally posted by planethax View Post
                    link to drewtech vb6 dead
                    Nothing special... just visit http://www.drewtech.com/downloads/ and download the "J2534-1 Tool". The installer gives you a *.exe and puts the full source code along with it under c:\Program Files. It's a little messy though; you could probably do better yourself once you get the hang of things.

                    Comment


                    • #11
                      Originally posted by mkelly View Post
                      Hey guys,
                      If you're still trying to use J2534 in .net, I uploaded a library I wrote that simplifies it a little bit. Take a look at the sample code (it's in C#, but feel free to email me if you have any questions).
                      https://github.com/mkelly/J2534DotNet
                      What version Visual Studio use to bulid this project?

                      Comment


                      • #12
                        Originally posted by witwat View Post
                        What version Visual Studio use to bulid this project?
                        VS 2010, but it could easily be ported to previous versions.

                        Comment


                        • #13
                          Thank you mkelly i bulid this project it is very helpful for me to learn how programing J2534. I want write program to read and write flash ECU .

                          Comment


                          • #14
                            Originally posted by witwat View Post
                            Thank you mkelly i bulid this project it is very helpful for me to learn how programing J2534. I want write program to read and write flash ECU .
                            I'm glad you found it useful. Feel free to contact me if you have any questions.

                            Comment


                            • #15
                              mkelly I'd like ask what mybe reason error " Error reading vin.Error:ERR_INVALID_CHANEL_ID "when i try read vin.I tried in several models using your project.
                              Last edited by witwat; 04-08-2012, 03:01 AM.

                              Comment

                              Working...
                              X