Tesla Owners Online Forum banner

Diagnostic Port and Data Access

897K views 2.2K replies 243 participants last post by  airxmyth  
#1 · (Edited)
Summary: updated Oct 2, 2019
This thread is our attempt to acquire and decode performance and other data from the serial networks in the Model 3.​
We finally gained access, recorded data, and decoded a lot of powertrain CAN data in early 2019.​
But there's still a lot more unknown! Additional help would be appreciated from any data and software folks.​
Please follow along in the thread to see progress, or skip towards the end to jump into current discussions.​
We also use this thread to detail our hardware and software projects to access, decipher, analyze, and display the data.​
Below are some links to items in this thread:​

Known CAN connector cables​
2018 cars: Geotab - EVTV - GPSTA
2019 cars: e-mobility germany - EVTV - GPSTA
OBDLink MX+ strongly suggested for iOS and Android connection to apps and loggers​
ScanMyTesla app info:​
Latest CAN log, from v10:​
Some older logs that I made:​
First capture​
Dual acceleration and regen​
Drive and Reverse​
Cold batt charge​
Charge and drive​
Cold battery drive, AP, charge​
My CANserver and microDisplay are now available to read and display all the fun can bus data!​
My original dash display:​


Original Post:
I'm hoping some of us nerds can figure out together how to access CAN data in the Model 3. I haven't found much information other than the existence of a diagnostic port hidden somewhere unknown. It also sounds like it will be ethernet with CAN embedded on another layer of data.

I'm hoping to figure all of this out and eventually make something that can grab useful data, maybe even output data to a geek display (dare I say HUD?). It should be possible. Now that my 3 is almost here I will finally have a patient to operate on.

Does anyone have any knowledge of this or come across other useful information that they can share?
 
#44 ·
View attachment 13926
I think that this connector is similar to the model S DLC.
The location of the DLC is the lower left of the driver's seat.
There's no question as to the location of the diagnostic connector, it is exposed in the "ceiling" of the footwell and easily accessed.
The question is the location of CAN data that is useful for us.
 
#45 ·
So, for a newbie like me (I am a geek, and can program, but nothing in the context of working on cars as you guys have done here - kudos!), is there anything I can do to connect to the diagnostic connector and get a sense of the messages / data coming from that? Or is that all off limits by Tesla?
 
#49 ·
I have the diagnostic connector plug and pins...I'll trade you for info on what wires I really need to find raw CAN, I was never able to find it...Of course it's nearly impossible to access the ends of the wires way up in the upper dash, and I don't want to cut into those tiny 28-guage wires. I might need to get a CANgator.
 
#52 ·
We should be able to pull CAN off of the abs pump... not sure what make and model the abs pump is but Bosch and Teves both have CAN signals going to them. That could help for researching but obviously not for a nice final solution. e other place I be you would find CAN
is on the main computer itself, or even the infotainment computer.
I just got my model 3 so I should be able to look this weekend.
There should be CAN going to all of these.
 
#55 ·
Surely not the only location, but the 500 kbps CAN bus is easily accessed behind the panel just below the rear vents (between the front seats). Removing the plastic panel is easiest by sliding both front seats forward first, then slipping the end of an allen key under the panel at the bottom and pulling toward you. Five snap clips to release. Once the panel is removed, you'll see a 20 pin male/female connector junction. CAN_H is pin 18, CAN_L is pin 19. You can also get Ground from pin 20 and Power from pin 4.
 
#59 ·
Thanks for the greeting - been a long time lurker, first time poster.

dbc files would of course be nice, but from what I understand most of the divined CAN frame analysis from S/X should apply.

Also, pins 18 and 19 are the Powertrain CAN bus (aka CAN3 from Model S/X), which is typically the most useful one. The other Model 3 CAN buses are likely on that connector as well. The pinout appears to follow the same hookup as 2015+ model S, when they switched from the 12 pin to the 20 pin diagnostic connector.
 
#60 ·
Hi together - i am new at the forum here - and from Germany. I try to do a lot in reading CAN busses and things on that and I just read this thread about the tries of reverse engineering of the model 3 CAN-Buses.
I am a Software Developer (, too) and I am about to create some more or less professional reading thing(s) on a raspi basis to log and analyze some driving/charging data and would be happy to support you with finding a solution. As I am from Germany I have no Model 3 in my reachability but if there is any way of getting in touch with a model 3 that I can read I will try to get it ;)

And most important thing: Big thanks for your work.
 
#61 ·
I have the panel off... I first went for the top of the three rear panels with the vent/USB, which pulls off very easily. It has the end of a harness to the USB but also a mystery unused port with a few wires.

Anyway bottom fairly simple too with a trim tool, these all pop off by pulling straight back.

Not obvious which pins are witch, but large black wires are in the back corners so I would guess one is those is pin 20. I bet the blue wire is the 12v accessory wire that I have tapped up front.

Probing these stuffed connectors is going to be very difficult with my usual paper clip, but I am afraid to unplug the connector. I assume that would be bad and maybe disconnect the security module. Let me know if you know otherwise @fast_like_electric

I guess it's time for a vacuum...
Image
 
#62 ·
In your photo, the large gauge black wire right behind the thick yellow wire is pin 20 (ground). CAN_L is right next to that black wire (pin 19), then CAN_H (pin 18). All of those three wires are on the bottom row of the connector - obscured by the other wires.

My guess is that the plug side goes off to some sort of gateway module that bridges those CAN buses to the new automotive Ethernet diagnostic connector. I'm theorizing that as I don't see another reason that they'd maintain the exact same connector and pinout as the X/S diagnostic connector for this junction - and at this odd location. But that is only a best guess.

I just carefully cut into the insulation on the ground and CAN lines (pins 18,19,20) - didn't disconnect anything in the process. Don't know what happens if you do temporarily disconnect the lines. You can use pin 4 or pin 1 if you need power. They are power-moded differently - believe pin 4 is something like a low current version of full time 12V, and pin 1 is more like Accessory.
 
#63 ·
AND WE'RE IN!!
Absolutely beautiful!

-Huge- thanks to @fast_like_electric !!!

Yellow and white thin wires. Tip: don't cross them while probing or the contractors right underneath you will make you jump :D

Now to build a harness and dive in with Vector and some other tools. Hopefully by this weekend.

First, if anyone can ID this connector part number or knows where they can be obtained, I would very much like to make a proper in-line plug with a CAN connection.

Also, it would be appreciated if anyone can point me to discussion or files or databases of known CAN IDs from S & X it would save me some time. I will eventually need to drive around and look how numbers respond to controls and displays to associate everything.

Anyway here is what I've been looking forward to seeing for months!


Image
 
#64 ·
Great progress - congrats for confirming. Will also be interesting if ODB2 request messages are accepted and replied to, such that standard accessories will work (enhanced gauges, HUDs, etc). Believe there is also an app called Scan My Tesla for Android that uses the ELM interfaces - curious if that S/X software will work with Model 3 when hooked up to the Powertrain CAN bus.

In addition to the Powertrain CAN bus, there should be the other less useful CAN buses at that connector too. Pinout and function of those may be different than model S/X.

This post has a lot of Tesla diagnostic connector part number info...

https://teslamotorsclub.com/tmc/threads/diagnostic-port-index.98663/

The Model 3 referenced connectors on that page are for the non-useful 5 pin enhanced diagnostic connector which is believed to be an automotive Ethernet flavor. For the 20 pin Model 3 connector in the console, refer to the references that talk about the 2015+ Model S diagnostic connector.

Partial CAN message breakdown for Model S and X are scattered various places, but here are some starting points...

https://skie.net/uploads/TeslaCAN/Tesla Model S CAN Deciphering - v0.1 - by wk057.pdf

(and)

https://www.instructables.com/id/Exploring-the-Tesla-Model-S-CAN-Bus/

If a more comprehensive Tesla CAN message list is known or generated, that would certainly be welcome. From what I understand, Model 3 is supposed to be very similar to S and X - but with some changes and new messaging as well.
 
#65 ·
Great progress - congrats for confirming. Will also be interesting if ODB2 request messages are accepted and replied to, such that standard accessories will work (enhanced gauges, HUDs, etc). Believe there is also an app called Scan My Tesla for Android that uses the ELM interfaces - curious if that S/X software will work with Model 3 when hooked up to the Powertrain CAN bus.

In addition to the Powertrain CAN bus, there should be the other less useful CAN buses at that connector too. Pinout and function of those may be different than model S/X.

This post has a lot of Tesla diagnostic connector part number info...

https://teslamotorsclub.com/tmc/threads/diagnostic-port-index.98663/

The Model 3 referenced connectors on that page are for the non-useful 5 pin enhanced diagnostic connector which is believed to be an automotive Ethernet flavor. For the 20 pin Model 3 connector in the console, refer to the references that talk about the 2015+ Model S diagnostic connector.

Partial CAN message breakdown for Model S and X are scattered various places, but here are some starting points...

https://skie.net/uploads/TeslaCAN/Tesla Model S CAN Deciphering - v0.1 - by wk057.pdf

(and)

https://www.instructables.com/id/Exploring-the-Tesla-Model-S-CAN-Bus/

If a more comprehensive Tesla CAN message list is known or generated, that would certainly be welcome. From what I understand, Model 3 is supposed to be very similar to S and X - but with some changes and new messaging as well.
Awesome. So the connector is the 20-pin Sumitomo and that TMC thread contains all the part numbers etc. (Last I visited that thread it had no Model 3 info, it has a lot more now!)
I think I will just try tapping in for now. I was able to push sewing pins in, I will try to solder something fancier tomorrow.

I doubt standard ODBII devices would work as that should be a slower bus. It might be useful to interface to all the buses there and gather as much data as possible.
 
#70 ·
@JWardell
I see from your profile you are in Boston. I'm not sure you are aware, but Massachusetts has a state law where vehicle info must be made available for service purposes. Have you ever visited https://service.teslamotors.com? As a Mass resident, you can get a service subscription that contains lots of details, supposedly including wiring info that is missing from the general public parts catalog. Prices are kinda steep, but there is a 1 hour subscription for $32, or 1-day for $107. 1 hour might be cutting it close to navigate and download useful info, and the $107 may be worth it if you are going to be doing a lot of work with the vehicle.

I'm sure there is a wealth of knowledge locked up in there, but you do need a MA billing address on your credit card to get access. Just a thought, if you were searching for better info.
 
#71 ·
I'm aware, but I assume it is the same parts database that was recently published, and I very highly doubt they would publish proprietary data communications. At this point I should be able to figure plenty out on my own given a decent amount of free time. Rich Rebuilds is also nearby and regularly deals with the mechanical side of things and will soon be opening a shop with @EVTuning so there's some chance we can all work together toward some useful goal.
Personally my intentions are to decode and document as much as the messaging as possible for the benefit of everyone, then slowly build an Arduino or other board to live display things similar to a ScanGuageII, and finally one day make some pretty dash display meters or even a HUD that everyone was pining for.
 
#72 ·
Correct, there isn't going to be CAN communication details on the service site, but wiring diagrams yes. That is, if you want more conclusive info on the wiring of course. Wiring diagrams are not available in the public parts catalog.

I'm also interested in an aftermarket or custom HUD / aux display. Will be trying an el-cheapo one after the holidays. Supposedly works via standard OBD2 J1979 messaging on Model S/X, unclear if these speed/RPM type ODB2 PIDs are implemented on Model 3.
 
#73 ·
I managed to capture a 2-3 minute trace of data simply turning on, pulling forward, then back again...and the CSV file is a whopping 35 megs! Lots of data here!

I've compared messages to the Model S CAN PDF and sadly, I don't think any data coincides. Only. a few IDs are common, and the data doesn't look the same.

Furthermore there are hundreds of unique IDs, so decoding this is going to be extremely difficult.

Any Excel wizards/data scientists out there feel free to get in touch and I would be happy to send along the CSV.

I'm going to have to separate and export each ID and then see if any data changes over time with simple things like speed and pedal position.
 
#75 ·
I managed to capture a 2-3 minute trace of data simply turning on, pulling forward, then back again...and the CSV file is a whopping 35 megs! Lots of data here!
Egads! That's quite a firehose. We need to get this into a queryable repository pronto!

Happy to help with data and tools for making sense of it.

Do any of the off-the-shelf CAN software packages accept CSV or other file input, or do they require a live connection to the bus?
 
  • Like
Reactions: Deadbattery
#77 · (Edited)
It's a very human-readable sequential order CSV file generated by CANopen Magic and fairly human readable. I didn't want to wait till the Vector hardware was available and that will spit out a proprietary format anyway. Here I'll just post it on Dropbox:
https://www.dropbox.com/s/o803kcogb08rlaf/first3.csv?dl=0

The Model 3 CAN message IDs are indeed different, as well as scaling in several cases. To kick this effort off and help get started, ID 0x405 is the VIN - split into 3 messages.
Yep, that checks out. Perhaps I'll take down the dropbox link in a day then. I just stripped them from the file.