Announcement

Collapse
No announcement yet.

Affordable OBD Simulator?

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

  • Affordable OBD Simulator?

    All,

    Thus far, I've been going down to my car to work on my software whenever I need to actually, you know, *try* it, and it's starting to get old.

    Can anyone suggest an affordable OBD simulator? This is purely for my open-source project OBD GPS Logger, whose budget is essentially zero. I sprung for OBD and GPS devices, but that wasn't much; hell, I considered the OBD device to be part of the cost of the car itself.

    Looking around, I came across this page: http://www.obd2cables.com/products/o...nt/simulators/, but they seem... well... "expensive".

    Of the cheaper options on that page, that's still an awful lot of money for me, and I don't really know which one I should get if I can only get one. Can anyone suggest either more affordable options, or which of those is my best bet? I'd presume it's CAN, but my current car is CAN, and I'd like to have other devices to test... but really, I'm just confused.

    Any advice would be great

    Thank-you very much,
    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  • #2
    I wrote a simple software simulator to emulate an ELM chip connected to a car. It works for a couple basic PIDS and allows you to change or "sweep" values. Fairly simple, but if you're looking for software I can upload a copy somewhere.
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

    Comment


    • #3
      That would be interesting for a start!

      Which platforms does the program run on?

      Thank-you very much,
      Gary (-;
      OBDGPSLogger, for logging OBDII and/or GPS data
      OBDSim, an OBDII/ELM327 software simulator
      mp3car forums: obdgpslogger, obdsim

      Comment


      • #4
        It runs on windows and linux, it's Qt based. To run in windows you need com0com serial port loopback emulator, and to run in linux you need something equivalant. ubuntu has them built in, but fedora does not. I'll try to get it usable so I can upload the source somewhere.
        "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
        RevFE
        My Shop

        Comment


        • #5
          Wow, that sounds awesome, thank-you!

          Gary (-;
          OBDGPSLogger, for logging OBDII and/or GPS data
          OBDSim, an OBDII/ELM327 software simulator
          mp3car forums: obdgpslogger, obdsim

          Comment


          • #6
            You should totally post it, like, right now so I don't have to walk downstairs to test the awesome new feature I just put in

            Gary (-;
            OBDGPSLogger, for logging OBDII and/or GPS data
            OBDSim, an OBDII/ELM327 software simulator
            mp3car forums: obdgpslogger, obdsim

            Comment


            • #7
              Attached is the source code, just extract, run qmake in the folder (you'll need qt-dev package) then compile using make as normal. I will upload a windows binary later if you want as compiling Qt apps on windows is a terror unless you have an environment all setup like I happen to for my frontend CarPal(shamless plug here). If you can't get it to compile I can also post ubuntu binaries. I'll try to put in some comments and clean up the code to make it easier to understand so you can add new PIDs if you want
              Attached Files
              "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
              RevFE
              My Shop

              Comment


              • #8
                Heh. Few hours too late, I walked down to my car instead. FLTK's graph widget doesn't quite do what I thought it does, so there's more development to be done before I reveal my awesome new feature [can you guess what it is? can you, can you, can you?]

                I will upload a windows binary later if you want as compiling Qt apps on windows is a terror
                Heh, heh. Silly windows users. One of these days I'll get round to making my stuff work properly on windows. I still haven't decided whether I want to rely on cygwin [grrr tcsetattr grrrr], or whether I want to port to the windows serial api and use mingw. I strongly feel that mingw is the better way to go, but that means committing some serious time to learning windows serial APIs.

                Either way, I gotta hunt down a windows laptop that doesn't make me want to stab myself to use it.

                If you can't get it to compile I can also post ubuntu binaries.
                Well, I didn't give it a good look yet, but... I tried compiling it, and in the Serial class header, you have
                Code:
                #include <windows.h>
                ...
                HANDLE portHandle
                Looking at the implementation code, I'm almost certain you just wanna #ifdef Q_OS_WIN32 wrap the include, and then change the handle declaration to
                Code:
                #ifdef Q_OS_WIN32
                HANDLE portHandle;
                #else
                int portHandle;
                #endif
                I'm at work now, so I can't really look at it in more detail.

                Can you explain a little of how it works? Do I open the same serial port device in the emulator and the client program? Do you run it on a separate machine, connected via a serial port? Can I use a fifo to do the same thing?

                Thanks,
                Gary (-;
                OBDGPSLogger, for logging OBDII and/or GPS data
                OBDSim, an OBDII/ELM327 software simulator
                mp3car forums: obdgpslogger, obdsim

                Comment


                • #9
                  Also what I meant to say was "Thank-you very much, that's great" rather than a long string of issues :-)

                  Gary (-;
                  OBDGPSLogger, for logging OBDII and/or GPS data
                  OBDSim, an OBDII/ELM327 software simulator
                  mp3car forums: obdgpslogger, obdsim

                  Comment


                  • #10
                    Haha no problem, issues are good, because issues solve well... issues.

                    You run it on the same machine as the client program. You need to open the port first, THEN have the client open theirs. I believe on ubuntu the server port would be /dev/ptys0 and the client port would be /dev/ttys0

                    And you're right, the #ifdef would indeed fix that. I have an ubuntu box here, let me see if I can't get it to compile rightoff

                    Edit: you can run it on a seperate machine connected via crossover serial cable if you want. not neccesary though if you have ptys ports.

                    New code uploaded, should compile just fine on linux. you still need to edit the port name though
                    Attached Files
                    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
                    RevFE
                    My Shop

                    Comment


                    • #11
                      Hrm. I can't find anything about ptys0. I see pts/0, is that likely to be it?

                      Gary (-;
                      OBDGPSLogger, for logging OBDII and/or GPS data
                      OBDSim, an OBDII/ELM327 software simulator
                      mp3car forums: obdgpslogger, obdsim

                      Comment


                      • #12
                        Hum, that might be it. Oh ubuntu 9.04 it looks like pts/0 is it, on 8.10 it was /dev/ptys0

                        That should link to ttyS0, try it. Look above for new source.
                        "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
                        RevFE
                        My Shop

                        Comment


                        • #13
                          Ah, ok. I only have 9.04 here at work; at home [where I actually do my development work] I'm using 8.10

                          Gary (-;
                          OBDGPSLogger, for logging OBDII and/or GPS data
                          OBDSim, an OBDII/ELM327 software simulator
                          mp3car forums: obdgpslogger, obdsim

                          Comment


                          • #14
                            Alright, the simulator should open /dev/ptmx and the program you're testing should open /dev/pts/1
                            "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
                            RevFE
                            My Shop

                            Comment


                            • #15
                              Originally posted by chunkyks View Post
                              All,

                              Looking around, I came across this page: http://www.obd2cables.com/products/o...nt/simulators/, but they seem... well... "expensive".

                              Of the cheaper options on that page, that's still an awful lot of money for me, and I don't really know which one I should get if I can only get one. Can anyone suggest either more affordable options, or which of those is my best bet? I'd presume it's CAN, but my current car is CAN, and I'd like to have other devices to test... but really, I'm just confused.
                              Gary, what would you consider "affordable"? And what sort of features are you looking for?

                              Vitaliy
                              OBDLink MX: world's smallest, fastest, most advanced OBD/Bluetooth adapter with SW and MS CAN support. Read the review to learn more.
                              Need to look up a diagnostic trouble code? Try the most up-to-date, free DTCsearch.com!

                              You cannot send me a private message using this forum. Use my email instead: vitaliy[@]scantool.net.

                              Comment

                              Working...
                              X