Page 1 of 1

OBD-II Adapter (I2C) doesn't work on ISO9141-2

Posted: Mon Oct 06, 2014 1:24 am
by dcolemans
I tried posting this problem to the topic about the UART adapter but it was removed. I am trying posting again in its own topic. I've connected the V2 Adapter to my 2004 Porsche Boxster S 986 and it works for a few seconds and then stops. I am running the test Arduino sketch that turns on the LED when RPM is over 3000. I start the car, plug in the unit, the adapter blue LED flashes for a few seconds and then stops flashing. Sometimes it stays connected long enough that I can rev the car to 3000 and see the Arduino pin 13 LED turn on, so I know it it close to working. Stanley, can you help me?

Re: OBD-II Adapter (I2C) doesn't work on ISO9141-2

Posted: Thu Oct 09, 2014 8:29 pm
by stanley
We will check this.

Re: OBD-II Adapter (I2C) doesn't work on ISO9141-2

Posted: Sat Oct 18, 2014 7:57 am
by Mcsquizzy
If it's any help, I am using the I2C version of the adapter, on a 2002 Subaru (ISO9141-2 protocol) and, using the megalogger sketch, I can't get the OBD to connect

Re: OBD-II Adapter (I2C) doesn't work on ISO9141-2

Posted: Sun Oct 19, 2014 12:30 am
by dcolemans
Any progress on this?

Re: OBD-II Adapter (I2C) doesn't work on ISO9141-2

Posted: Wed Dec 24, 2014 3:48 pm
by nickd3157
Mine isn't working either. It also gets hung up on the obd.init() function. I have a 2010 Hyundai Accent.

Re: OBD-II Adapter (I2C) doesn't work on ISO9141-2

Posted: Fri Dec 26, 2014 10:05 am
by AzzamAziz
Did you ever get this working? Stuck on this for months.

Re: OBD-II Adapter (I2C) doesn't work on ISO9141-2

Posted: Mon Jan 12, 2015 1:52 pm
by nickd3157
stanley wrote:We will check this.


Have you figured out anything for this yet? I've been trying to get this working since September.

Thanks

Re: OBD-II Adapter (I2C) doesn't work on ISO9141-2

Posted: Wed Jan 28, 2015 1:42 pm
by nickd3157
Hello everyone. I've been working on this for months and thought I had ISO9141-2, but either way, my adapter would not auto-connect. I was messing around with it some more recently and figured out how to get mine working. It turns out I actually have CAN-11B-500K, but this fix may still work for you guys if you just put whatever protocol you have in the argument.

I modified OBD.h on line 211 where it calls the init() function.

Code: Select all

class COBDI2C : public COBD {
public:
    void begin();
   void end();
    bool init(OBD_PROTOCOLS protocol = PROTO_CAN_11B_500K);//PROTO_AUTO); //PROTO_CAN_11B_500K <==Works for me
    bool read(byte pid, int& result);
    void write(const char* s);
    // Asynchronized access API
    void setPID(byte pid);
    void applyPIDs();
    void loadData();
    uint16_t getData(byte pid, int& result);
    // GPS API
    bool gpsQuery(GPS_DATA* gpsdata);
    void gpsSetup(uint32_t baudrate, const char* cmds = 0);
protected:
    bool sendCommand(byte cmd, uint8_t data = 0, byte* payload = 0, byte payloadBytes = 0);
    byte receive(char* buffer, int timeout = OBD_TIMEOUT_SHORT);
    byte m_addr;
    PID_INFO obdInfo[MAX_PIDS];
    byte obdPid[MAX_PIDS];
};


You can see where I commented out "PROTO_AUTO" and just put the name of my protocol in place of it. The list of protocols is just above between lines 78 and 87. I'll list them below for convenience.

Code: Select all

typedef enum {
    PROTO_AUTO = 0,
    PROTO_ISO_9141_2 = 3,
    PROTO_KWP2000_5KBPS = 4,
    PROTO_KWP2000_FAST = 5,
    PROTO_CAN_11B_500K = 6,
    PROTO_CAN_29B_500K = 7,
    PROTO_CAN_29B_250K = 8,
    PROTO_CAN_11B_250K = 9,
} OBD_PROTOCOLS;


Hope this helps some of you guys.