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

Inquiry and support for Freematics products
Post Reply
dcolemans
Posts: 5
Joined: Thu Sep 25, 2014 3:06 am

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

Post 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?
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

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

Post by stanley »

We will check this.
Mcsquizzy
Posts: 8
Joined: Fri Oct 10, 2014 11:25 am

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

Post 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
dcolemans
Posts: 5
Joined: Thu Sep 25, 2014 3:06 am

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

Post by dcolemans »

Any progress on this?
nickd3157
Posts: 3
Joined: Wed Dec 24, 2014 3:43 pm

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

Post by nickd3157 »

Mine isn't working either. It also gets hung up on the obd.init() function. I have a 2010 Hyundai Accent.
AzzamAziz
Posts: 6
Joined: Fri Jul 18, 2014 9:22 am

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

Post by AzzamAziz »

Did you ever get this working? Stuck on this for months.
nickd3157
Posts: 3
Joined: Wed Dec 24, 2014 3:43 pm

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

Post 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
nickd3157
Posts: 3
Joined: Wed Dec 24, 2014 3:43 pm

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

Post 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.
Post Reply