DarthAffe / OBD.NET

C#-Library to read data from car through an ELM327-/STN1170-Adapter
GNU General Public License v2.0
184 stars 83 forks source link

Trying on Tesla Model3 #23

Open Clodo76 opened 3 years ago

Clodo76 commented 3 years ago

Anyone here have a working sample with Tesla Model3?

I'm using this connector: https://e-mobility-driving-solutions.com/produkt/diagnostics-cable-tesla-m3-01-2019-bundle/?lang=en

Windows 10, VS2019, Download this git repo, configure the bluetooth dongle and map to com3, run ODB.NET.ConsoleClient with "com3" as argument, below the output.

Seem working ("Response: 'ELM327 v2.2'"), but no data fetched. I'm interested in fetching SteeringAngle and similar data, reported here: https://docs.google.com/spreadsheets/d/1ijvNE4lU9Xoruvcg5AhUNLKr7xYyHcxa8YSkTxAERUw/edit#gid=150828462 but the ID 0x129 is more than a byte, so it's not the PID for dev.RequestData(byte pid) ... what i'm missing?

Thanks for any feedback.

output:

05/09/2021 20:33:45 -  Debug -  Opened Serial-Connection!
05/09/2021 20:33:45 -  Debug -  Initializing ...
05/09/2021 20:33:45 -  Debug -  Resetting Device ...
05/09/2021 20:33:45 -  Verbose -  Queuing Command: 'ATZ''
05/09/2021 20:33:45 -  Debug -  Turning Echo Off ...
05/09/2021 20:33:45 -  Verbose -  Queuing Command: 'ATE0''
05/09/2021 20:33:45 -  Debug -  Turning Linefeeds Off ...
05/09/2021 20:33:45 -  Verbose -  Queuing Command: 'ATL0''
05/09/2021 20:33:45 -  Debug -  Turning Headers Off ...
05/09/2021 20:33:45 -  Verbose -  Queuing Command: 'ATH0''
05/09/2021 20:33:45 -  Debug -  Turning Spaced Off ...
05/09/2021 20:33:45 -  Verbose -  Queuing Command: 'ATS0''
05/09/2021 20:33:45 -  Debug -  Setting the Protocol to 'Auto' ...
05/09/2021 20:33:45 -  Verbose -  Queuing Command: 'ATSP0''
05/09/2021 20:33:45 -  Verbose -  Writing Command: 'ATZ''
05/09/2021 20:33:46 -  Verbose -  Response: 'ELM327 v2.2'
05/09/2021 20:33:46 -  Verbose -  Writing Command: 'ATE0''
05/09/2021 20:33:46 -  Verbose -  Response: 'ATE0'
05/09/2021 20:33:46 -  Verbose -  Response: 'OK'
05/09/2021 20:33:46 -  Verbose -  Writing Command: 'ATL0''
05/09/2021 20:33:46 -  Verbose -  Response: 'OK'
05/09/2021 20:33:46 -  Verbose -  Writing Command: 'ATH0''
05/09/2021 20:33:46 -  Verbose -  Response: 'OK'
05/09/2021 20:33:46 -  Verbose -  Writing Command: 'ATS0''
05/09/2021 20:33:46 -  Verbose -  Response: 'OK'
05/09/2021 20:33:46 -  Verbose -  Writing Command: 'ATSP0''
05/09/2021 20:33:46 -  Verbose -  Response: 'OK'
05/09/2021 20:33:46 -  Debug -  Requesting Type FuelType ...
05/09/2021 20:33:46 -  Debug -  Requesting PID 51 ...
05/09/2021 20:33:46 -  Verbose -  Queuing Command: '0151''
05/09/2021 20:33:46 -  Verbose -  Writing Command: '0151''
05/09/2021 20:33:46 -  Debug -  Requesting Type EngineRPM ...
05/09/2021 20:33:46 -  Debug -  Requesting PID 0C ...
05/09/2021 20:33:46 -  Verbose -  Queuing Command: '010C''
05/09/2021 20:33:46 -  Debug -  Requesting Type VehicleSpeed ...
05/09/2021 20:33:46 -  Debug -  Requesting PID 0D ...
05/09/2021 20:33:46 -  Verbose -  Queuing Command: '010D''
05/09/2021 20:33:46 -  Verbose -  Response: 'SEARCHING...'
05/09/2021 20:33:47 -  Debug -  Requesting Type EngineRPM ...
05/09/2021 20:33:47 -  Debug -  Requesting PID 0C ...
05/09/2021 20:33:47 -  Verbose -  Queuing Command: '010C''
05/09/2021 20:33:47 -  Debug -  Requesting Type VehicleSpeed ...
05/09/2021 20:33:47 -  Debug -  Requesting PID 0D ...
05/09/2021 20:33:47 -  Verbose -  Queuing Command: '010D''
05/09/2021 20:33:48 -  Debug -  Requesting Type EngineRPM ...
05/09/2021 20:33:48 -  Debug -  Requesting PID 0C ...
05/09/2021 20:33:48 -  Verbose -  Queuing Command: '010C''
05/09/2021 20:33:48 -  Debug -  Requesting Type VehicleSpeed ...
05/09/2021 20:33:48 -  Debug -  Requesting PID 0D ...
05/09/2021 20:33:48 -  Verbose -  Queuing Command: '010D''
05/09/2021 20:33:49 -  Debug -  Requesting Type EngineRPM ...
05/09/2021 20:33:49 -  Debug -  Requesting PID 0C ...
05/09/2021 20:33:49 -  Verbose -  Queuing Command: '010C''
05/09/2021 20:33:49 -  Debug -  Requesting Type VehicleSpeed ...
05/09/2021 20:33:49 -  Debug -  Requesting PID 0D ...
05/09/2021 20:33:49 -  Verbose -  Queuing Command: '010D''
05/09/2021 20:33:50 -  Debug -  Requesting Type EngineRPM ...
05/09/2021 20:33:50 -  Debug -  Requesting PID 0C ...
05/09/2021 20:33:50 -  Verbose -  Queuing Command: '010C''
05/09/2021 20:33:50 -  Debug -  Requesting Type VehicleSpeed ...
05/09/2021 20:33:50 -  Debug -  Requesting PID 0D ...
05/09/2021 20:33:50 -  Verbose -  Queuing Command: '010D''
05/09/2021 20:33:51 -  Verbose -  Queuing Command: 'ATPC''
05/09/2021 20:33:52 -  Verbose -  Response: 'UNABLE TO CONNECT'
DarthAffe commented 3 years ago

Hey, as stated in the links you provided the tesla model 3 has no obd-port. The adapter seems to be some kind of wrapper around the CAN-data but it doesn't really say what kind of commands are supported. The connection itself seems to be fine (all the initialization is working) but data-request aren't answered. I guess in that case it's better/easier to listen directly to the CAN-bus to get realtime data (it's documented in the google doc -> that's not about OBD!)

Clodo76 commented 3 years ago

Thanks for the reply, so this issue is out-of-scope, can be closed. Thanks again, i will study an alternative.