Announcement

Collapse
No announcement yet.

Trouble compiling under OSX 10.6

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

  • Trouble compiling under OSX 10.6

    I just received an OBD USB cable and am trying to get things up and running.

    I managed to compile the latest version without the GUI and it seemed to be communicating with gpsd but I was getting a no-response from command 0x00 from the OBD (which seems fixable with some source tweaking).

    I then decided to download fltk to use the gui and discovered it won't compile in 64 bit. Set -arch=1386 and that seemed to work.

    Then obdgpslogger won't link to fltk since it was originally compiled for 64bit. re-ran ccmake to set i386 for the odbgpslogger build.

    Now I can't create the gpsd .dylib and I'm trying everything to get a 32bit version to work :/

    Was the precompiled OSX binary 32bit or 64bit?

    I'll try the precompiled version again - but I think I was having trouble with the baud rate - I think the OBD cable I have is 38400.

  • #2
    Could you post the output of the no-response from 0x00 bit? A good start would be the entire output of obdgpslogger when you add the "-p" flag.

    The 64-bit stuff... erm, I don't know. I don't have a 64-bit mac :-(. Could you post the entire build log for obdgpslogger on that machine? I work with fltk 1.3, I haven't tried 2.0 yet.

    I did give one short answer in your other thread about the .dylib, but I don't know if it'll resolve your problem, given the huge 64-32-bit-mess that appears to be going on.

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

    Comment


    • #3
      Defaulting to 64bit is a PITA. There must be some easy way to set the build env to 32bit.

      I've got obdgpslogger to compile and this is the output I get:

      Opening serial port /dev/cu.usbserial-A600cfCX, this can take a while
      Baudrate: 38400
      Successfully connected to serial port. Will log obd data
      Your OBD Device claims to support PIDs:
      PID: [column] human_name
      Couldn't get obd bytes for cmd 00
      00: [unknown] PIDs supported 00-20

      But, now I'm not convinced the cheap chinese OBD adaptor is working like it should or the 64-bittedness of the executable is a problem. I'll try plugging the OBD cable into a PC and run scantool to confirm the hardware is actually talking to my Audi like it should.

      --

      Jon

      Comment


      • #4
        Perhaps when you build in cmake, you could try adding "-m32" to your C and CXX flags? [use ccmake or cmake-gui]

        It's possible that your device's baudrate is 9600 rather than 38400. I haven't written the baudrate sniffing code yet, so it's not even *Trying* to guess right now.

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

        Comment


        • #5
          I had cmake compiling 32 bit but that's when I started having problems linking with the gps libs When you upgrade to 10.6 you'll be in for a world of hurt

          As for the ODB cable I just tried scantool and vag-com from a PC and both are reporting problems connecting to the car so either the cable is busted or there's a problem with the OBD port. Apparently some aftermarket stereo adaptors on audi's can connect the "k line" to +12v :/ easy to check with a voltmeter on pin 7.

          Comment


          • #6
            It might just be a baudrate-related thing. Use your favorite serial terminal software [screen] with various baudrates.

            For each baudrate, hit enter, then type "ATZ", hit enter, and see what happens. If you see ">" prompts and then something like "ELM1.3a compatible", you know at least the dongle is kinda "alive", even if it can't talk to your car.

            Once you figure out that, type "0100" and hit enter. That your base "communicate with the car". You might see an "INIT..." line, then some kind of output. Probably 41 00 AB CD EF 12 [41 00 is what you expect, the stuff after will vary based on your car]

            As far as how to test baudrate, I go with screen:
            [code]screen /dev/cu.usbserial-A600cfCX 9600[/url]

            Obviously try it at 9600, then switch to, say, 38400, and a few other of the usual suspects.

            To exit screen, hit ctrl-a, then k

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

            Comment


            • #7
              Originally posted by b26354 View Post
              Apparently some aftermarket stereo adaptors on audi's can connect the "k line" to +12v :/ easy to check with a voltmeter on pin 7.
              FWIW Normally a K line is pulled up to vbat (+12) through a 500-600 ohm resistor. Then each talker (test tool, ecu, etc.) communicates by pulling the line low using a transistor. Otherwise, it is basically a UART signal.

              -jjf

              Comment


              • #8
                It's def 38400 and if I do ATZ I get

                ELM 1.35

                but after 0100 I get "SEARCHING" followed by "UNABLE TO CONNECT"

                so the ELM is alive but it can't, as I suspected, find the car.

                and... I just found this link:

                http://www.glmsoftware.com/OBDLinkWarningForm.aspx

                so the cable I have probably isn't compatible with my Audi

                So - obdgpslogger probably is os-x 10.6 compatible (except for the fltk issue) since it looks like it was doing all the right things up until the ELM couldn't figure out there was a car attached to it

                --

                Jon

                Comment


                • #9
                  I have yet to have any problems with my OBDLink. That's actually what's living in my car right now.

                  That's probably very different to the problem that you found; if you have a cheap chinese ebay'd ELM, it might just be a crappy dongle. I'd either return if [if you can], or crack it open and check that the solder joints are ok.

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

                  Comment

                  Working...
                  X