Create OBD2 MUT scanner by using Java FTDI lib – jd2xx – openport1.3 usb cable

Create OBD2 MUT scanner by using Java FTDI lib – jd2xx – openport1.3 usb cable

First your using a different baud rate to that in the example. The example uses 15625 baud but you are using 38400 baud.

Secondly you are missing some of the setup commands. I am not sure if this will make a difference but its something that is different between your code and the example.

Mitsubishi require you to set the car ECU into diagnostic mode by sending 0x00 at a rate of 5 baud on one of the pins. On the OpenPort 1.3D cable this translates to setting the break to on for 1800 ms and then turning it off. You can see this is done with the ftdimut_init() command from the libftdimut.c file.

      printf(Sending 0x00 at 5 baudn);

      printf(Break on......n);
      ftStatus = FT_SetBreakOn(ftdimut_ftHandle);
      if(ftStatus != FT_OK) return ftStatus;
      ftdimut_msleep(1800);
      printf(Break off......n);
      ftStatus = FT_SetBreakOff(ftdimut_ftHandle);
      if(ftStatus != FT_OK) return ftStatus;

The car ECU will then send you 4 bytes containing the ECU ID. This can then be used to check the ECU correctly entered diagnostic mode. You can see this in libftdimut.c.

      ftStatus = FT_Read(ftdimut_ftHandle, buf, 4, &bytesRead);
      if(ftStatus != FT_OK) return ftStatus;

      if(bytesRead == 4) {
        return FT_OK;
      }

Now assuming that you got the 4 bytes back you can start to send the diagnostic codes such as 0x17 or 0x21.

I just saw your post on my blog, niallm answer is correct, you need to do a 5 baud init first which involves driving the KLine, you can use something like the 5 baud init posted in that answer, more info about the protocol:

http://evoecu.logic.net/wiki/MUT_Protocol

After getting a 4 byte response you can start sending requests at 15625 baud (Im communicating with a 94 3000GT so the CEL light stops blinking), also in my case I send the converted values (0x21 = 33 decimal) as a byte array.

Create OBD2 MUT scanner by using Java FTDI lib – jd2xx – openport1.3 usb cable

Leave a Reply

Your email address will not be published. Required fields are marked *