stanleyhuangyc / Freematics

Official source code repository for Freematics
https://freematics.com
419 stars 345 forks source link

EV support for Freematic libraries #184

Open PonomarovP opened 1 year ago

PonomarovP commented 1 year ago

Standard OBD-2 protocol is not supported in electric vehicles. Other diagnostic protocols over OBD-socket are used instead, applying longer parameter IDs. Is there a plan to support these protocols in further Freematic software versions?

JeroenVanOort commented 1 year ago

I doubt it's even specific to EV's. It might simply be recent cars in general: they don't support the standard OBD-II PID's, but work using Unified Diagnostic Services instead.

Based on the information in this issue I've been trying some things and these are some of the problems in need of solving in order to support UDS.

  1. Using other services than 01. Currently the service / mode used is hardcoded.
  2. Better response parsing I believe that at this time, only the first line returned by the co-processor (acting as an ELM327) is parsed, while there may be several, as UDS uses ISO-TP in order to handle messages that are larger than the space available in a CAN frame.
  3. Support getting multiple data points from one PID In UDS, it seems common to have one PID with many data fields within it. For example 220101 in Hyundai/KIA vehicles: image source

I do think the lack of UDS support will increasingly be a deal breaker for Freematics products.

stanleyhuangyc commented 11 months ago

We are considering adding ISO-TP.