mickeyl / LTSupportAutomotive

An iOS / watchOS / macOS support library for OBD2, VIN-Decoding, and more.
MIT License
212 stars 59 forks source link

Adapter<->Vehicle Communication sometimes not successful #11

Open mickeyl opened 6 years ago

mickeyl commented 6 years ago

Sometimes I receive reports where the OBD2 adapter gets recognized successfully, but for some reason the adapter<->vehicle can't negotiate on a common protocol. I wonder whether there's anything we can do about it.

We already try manual protocol selection if the automatic fails – perhaps we should improve the init sequence?

Here is a sample log:

ATD
OK

>ATZ
ATZ

ELM327 v1.5

>ATE0
ATE0
OK

>ATRV
13.9V

>ATSP0
OK

>ATE0
OK

>ATL1
OK

>ATH1
OK

>ATI
ELM327 v1.5

>ATS1
OK

>ATIGN
ON

>0100
SEARCHING...
...UNABLE TO CONNECT

>ATTP1
OK

>0100
NO DATA

>ATTP2
OK

>0100
NO DATA

>ATTP3
OK

>0100
BUS INIT: ...ERROR

>ATTP4
OK

>0100
BUS INIT: ...ERROR

>ATTP5
OK

>0100
BUS INIT: ERROR

>ATTP6
OK

>0100
NO DATA

>ATTP7
OK

>0100
NO DATA

>ATTP8
OK

>0100
NO DATA

>ATTP9
OK

>0100
NO DATA

>
mickeyl commented 6 years ago

Chances are our init sequence is correct, and it's rather a faulty adapter (of which there are literally thousands…).

See also https://github.com/brendan-w/python-OBD/issues/22

It is also possible that most of these issues are due to electrical problems (such as incorrect seating of the adapter in the socket), or missing ignition. It is – unfortunately – impossible to programmatically decide whether ignition is on or off. ATIGN is not doing what it is supposed to. It returns ON as soon as the adapter has power.

hirurgaa commented 10 months ago

@mickeyl I’m currently testing with OBDLink CX and it always returns that ignition is off, where clearly its on- tested with car scanner and etc.

mlawlerau commented 5 months ago

I wonder if we can tell anything from the voltage read via ATRV. Perhaps if the engine is running, we might have a higher voltage? But I guess it doesn't help with detecting the ignition being ON but the engine not running.