Nissan 370Z Forum

Nissan 370Z Forum (http://www.the370z.com/)
-   Audio & Video (http://www.the370z.com/audio-video/)
-   -   CAN-bus project (http://www.the370z.com/audio-video/61558-can-bus-project.html)

Knio 10-08-2012 02:43 PM

CAN-bus project
 
Hi all,

I've started an open source project to interface a carPC with the CAN-bus in the car. In theory this should allow me to do everything a typical OBDII scanner can do, but also give access to data and sensors that aren't exposed over OBDII, and also the ability to control/automate some parts of the car, and possibly use as an alternative to buying a CONSULT-III.

For example, as a proof of concept, I've gotten my laptop to read the 6MT gear position sensor, headlight knob, and start button, so you could use these as inputs to do whatever you wanted on a carpc.

After searching for a while, I haven't found much information about the Nissan's CANbus. Does anyone know of any documentation/manuals for the data protocols used, or about the consult-III interface, or any similar software? I found nissandatascan.com but that's only for older nissans before canbus.

I will keep reverse engineering it myself if I have do, but if anyone knows more it would speed up the process :)


CAN interface: CANUSB - The Low cost CAN to USB converter

First data log: privatepaste.com :: Paste ID 33001e0679

SouthArk370Z 10-08-2012 03:01 PM

I have been looking for a project like this. I have been trying to find out where the vehicle-specific PIDs are, but without much luck. The info is proprietary and all I have to work with is a ScanGaugeII and a few freebie monitoring apps for my laptop. The freebies are nice for logging data, but, as one would expect from a freebie, aren't much good for exploring (or maybe I just haven't figured it out).
If I can be of any help, please PM me.

I have a private wiki set up on my personal server that has a database I've filled with most of the Mode 1-3 PIDs with description, data format, range, raw data to human readable form formulae (for ScanGaugeII, but should be easy to convert to any other device/app that allows custom entries), &c.
If you would like access to that, just PM me and I'll setup an acct for you. The wiki was setup just for my own use, but if you want to add your data, I will open it up to at least The370Z members, if not the Universe.

Knio 10-09-2012 02:20 PM

Quote:

Originally Posted by SouthArk370Z (Post 1950515)
I have been looking for a project like this. I have been trying to find out where the vehicle-specific PIDs are, but without much luck. The info is proprietary and all I have to work with is a ScanGaugeII and a few freebie monitoring apps for my laptop. The freebies are nice for logging data, but, as one would expect from a freebie, aren't much good for exploring (or maybe I just haven't figured it out).
If I can be of any help, please PM me.

I have a private wiki set up on my personal server that has a database I've filled with most of the Mode 1-3 PIDs with description, data format, range, raw data to human readable form formulae (for ScanGaugeII, but should be easy to convert to any other device/app that allows custom entries), &c.
If you would like access to that, just PM me and I'll setup an acct for you. The wiki was setup just for my own use, but if you want to add your data, I will open it up to at least The370Z members, if not the Universe.

Thanks!! I'll PM you a bit later, I just got started and haven't coded PID scanning yet. It should help a lot.

DIGItonium 10-10-2012 09:09 AM

I recommend creating a database of the PIDs so your program can run an SQL query to pull up the PID definition to decode and display the data. You can probably pull up a bunch of PIDs and not have immediate information, so it's nice to build this database to constantly update the PID definitions.

So column headers can include ID, data size, MSB/LSB resolution, units, etc. It'll be fairly flat, unless you want to make it relational by creating tables listing units, etc.

If you like, you can make the display HTML formatted so one can create all sorts of display styles or use images. Imagine using an image to indicate valve or switch opening and closing, or use color text to indicate warnings.

Knio 03-22-2013 10:23 PM

Update!

I've figured out a lot of the data I'm getting off the CAN-bus, and there's lots of cool stuff in there. I've started making a datalogging app to see what everything is doing, you can check out the prototype at CarHack

I'm looking forward to using it next autocross... and there's still lots more I haven't figured out yet.

cheshirecat 03-23-2013 03:50 PM

The BMW guys do a lot of Canbus stuff. I'm not too familiar with the code myself but it may be a place to look.

sig11 07-29-2013 08:55 PM

This is awesome and I can't believe I just found it now. I just started working on OpenXC and have been dreaming a bit about reverse engineering the 370's can. What do you guys recommend for a cheap interface?

Will be a lot harder to add signals without p-can and the dbc files but I can add some support.

wstar 08-26-2013 02:37 AM

Anyone have technical details about accessing some of these values on the canbus (specific addresses / modes / PIDs / whatever)?

My biggest wishlist stuff to get get from the CAN bus:

1) Brake Pedal Pos (for the datalogger)
2) Oil temp (to feed datalogger, also to display on dash somewhere so I can get rid of the triple-meter).
3) 7AT TCM Temp (also for datalogger + dash).

If I at least had technical details, maybe I could get RaceKeeper to consider adding support for logging them alongside my other data. It would be really cool to get the those two temps onto CAN-driven dash gauges as well, something like this: 2-1/16" Freedom CAN-BUS Oil Temp Gauge 140-300F. Auto No Warning Light From Speedhut. , but those are for late-model GM ECUs only.

I had a hint on oil temps in the past, which I lifted from elsewhere... Mode 45 (that's hex, I think, not decimal?), PID 111F (hex). I never got any results trying to use that in various ways through simple OBD-II tools like Torque, though.

SouthArk370Z 08-26-2013 07:26 AM

Quote:

Originally Posted by wstar (Post 2461322)
Anyone have technical details about accessing some of these values on the canbus (specific addresses / modes / PIDs / whatever)? ...

I did some researching about a year ago but got frustrated by the lack of free data for the non-standard PIDs (most, if not all, modes above $0A are proprietary). Most of the info is available but it is quite expensive - too much for a hobbyist. You can find most of my results at the link in my sig.

If you look through Knio's source code, you can find the Mode/PIDs he is using.

During my research, I got the feeling that some of the CAN-to-computer I/Fs were not made for "exploring" the CAN bus. They massage the data and will sometimes not pass certain messages. Not sure this is actually true. Apparently, the I/F Knio is using works well.


Edit: PS: As far as I can tell, mode and PID addresses are always given in hex.

mfeinst 09-04-2013 10:44 AM

Subbed for future info. Very interested in something like this.

sylpher 09-04-2013 07:21 PM

agreed


All times are GMT -5. The time now is 05:26 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 PL2