1

I am working on an Android app and whenever my client tests the app with his car, he is getting response with different length and it is failing. It so happened in my code that I need to handle the length of the message to proceed further.

Any idea why the OBD II device is getting response with different length

Sample responses from device are:

410100040000410100068000

0101410100040000410100068000

Thanks to all

UVM
  • 9,776
  • 6
  • 41
  • 66

1 Answers1

1

First, what commands are you sending the OBD II device?

My guess is that the vehicles are responding with different protocols. You can check which protocols the vehicles are using by sending the OBD II device the following commands:

ATZ
ATSP0
ATDPN

ATDPN will respond with a single character that tells us what protocol the vehicle is using.

If the vehicles are using different protocols, then you'll have to parse the returned data differently depending on the protocol in use. This spec sheet will help accomplish that:

http://elmelectronics.com/DSheets/ELM327DS.pdf