No announcement yet.

OBMSim on Ubuntu

  • Filter
  • Time
  • Show
Clear All
new posts

  • OBMSim on Ubuntu

    Hello, first of all many thanks for OBDSim, it's a great soft!

    I try to run OBDSim under Ubuntu, but I have some problem to run virtual serial ports. I tried to use socat without any success.

    Have you a tutorial or some tips that can help me to run your program and use it for my development?

    I built your program and ran it with this command:

    ./obdsim -g Logger -s ces2010.db -g Cycle --tty-device=/dev/tty9
    When I try to connect to /dev/tty9 (or /dev/tty8 that is linked with socat), there is no result. On Windows, it is OK but I have to developp under Ubuntu.

    Thanks in advance!

  • #2
    -g Cycle is wrong, it should be -g Logger if you are using a db file to seed. does it work without specifying the --tty-device?
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.


    • #3

      Thank you for your aswer. If I do not specify --tty-device, the program works:

      [email protected] bin $ ./obdsim -g Logger -s ces2010.db
      SimPort name: /dev/pts/2
      Successfully initialised obdsim, entering main loop
      But if I try to test available ports (in Java), I do not find the /dev/pts/2. When I connect my real ELM327, it is detected by my program on /dev/ttyUSB0.

      I think I am testing on the bad port with Java, because on Windows with com0com, for example COM8 is related to COM9, so if I start obdsim on COM8, I have to connect my program on COM9 to communicate with it.

      Is it a thing that I ommit on Ubuntu? Is there a simple way to test that my obdsim is correctly working on ubuntu? On windows putty with a serial configuration works very well.

      Thanks in advance for your help!


      • #4
        Hello, thank you for your answer.

        I tried without specifying --tty-port, it launches the program. I post an example of it this evening, I am not under ubuntu at work!

        My question is: on Windows I use com0com to rely the port COM8 to COM9. I launch obdsim on COM8 and my client program connect on port COM9, it works perfectly.

        On Ubuntu, if I am on /dev/pts/2 with obdsim, I don't know what is the client port..? Is there a software to use virtual serial port on ubuntu? I tried socat, but it is not simple...

        Thanks in advance for your answers, and sorry for my bad english!


        • #5
          On Linux, obdsim uses regular PTY stuff to simulate serial ports. The output that it tells you, where it's on /dev/pts/{number}, that's the serial port you want to connect to. The end of the serial port that obdsim is using doesn't exist, outside of obdsim.

          The ttydevice option is mainly just for people who want to use a real physical serial port, or who have specific requirements for what they need. Most of the time, you'll be fine with the pts that it spits out on startup.

          As for recommended serial terminal software, I always use screen; "screen /dev/pts/6" is a great start. obdsim actually takes a convenience option "-s" to automatically launch screen and attach it to the terminal obdsim creates, while you just want to manually play with it. PuTTY is another excellent piece of software, on linux as well as windows.

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