Nissan 370Z Forum

Nissan 370Z Forum (http://www.the370z.com/)
-   Tuning (http://www.the370z.com/tuning/)
-   -   370Z CAN Bus Proprietary PID's (http://www.the370z.com/tuning/89695-370z-can-bus-proprietary-pids.html)

radensb 05-06-2014 12:48 AM

370Z CAN Bus Proprietary PID's
 
Im not sure if this is the right place for this...

I wanted to start a thread that could serve as a central location for complete CAN Bus decoding. There is a great deal potential in being able to understand the non-stnadard PID's flying around the Z CAN bus.

I have some CAN hardware on order. My plan is to log the bus information during normal driving. Who's up for some data analysis!? :ugh2:

My thought is to attempt to analyze the logged data to see what PID data changes and when to try to figure out what is going on and create more complete documentation.

Current sources:
[370Z]
https://github.com/Knio/carhack/blob...issan.markdown
Nissan 370Z CAN Hacking | Stray Bytes
https://docs.google.com/spreadsheet/...=sharing#gid=0
http://www.the370z.com/audio-video/6...s-project.html

[Other Nissan]
http://www.mynissanleaf.com/viewtopic.php?f=44&t=4131

If anyone has more information or sources, please contribute!

RonRizz 05-06-2014 02:39 AM

Is there a stereo on this bus? lol

Brad370 05-06-2014 08:47 AM

Straybytes.com is my blog. I haven't worked on that in a while because I've been distracted by other projects. I can help if you have any questions though.

Mitco39 05-06-2014 09:29 AM

I am currently running this app on my phone. Looks like they have mapped out a bunch of the Nissan only PIDs...

https://play.google.com/store/apps/d...eeo.niadvanced

Brad370 05-06-2014 02:19 PM

Quote:

Originally Posted by radensb (Post 2807804)
If anyone has more information or sources, please contribute!

My Nissan Leaf Forum • View topic - LEAF CANbus decoding. (Open discussion)

They are trying to decode the Nissan Leaf CAN bus, but there are many similarities.

radensb 05-06-2014 02:56 PM

Quote:

Originally Posted by Mitco39 (Post 2808046)
I am currently running this app on my phone. Looks like they have mapped out a bunch of the Nissan only PIDs...

https://play.google.com/store/apps/d...eeo.niadvanced

I wonder if its possible to see the CAN data to understand what the bytes for each PID mean??

radensb 05-08-2014 10:12 PM

Sweet usable data ...
 
Just got my CAN bus interface hardware. I wrote a simple program that reads the data on the CAN and prints the PID and data in HEX to a console.

https://dl.dropboxusercontent.com/u/...0Z_CAN_log.PNG

Let the reverse engineering continue!

SouthArk370Z 05-08-2014 10:41 PM

I have an ELM-based CAN-to-USB adapter. Would it be possible to get a copy of your program?

radensb 05-09-2014 11:44 AM

Quote:

Originally Posted by SouthArk370Z (Post 2811599)
I have an ELM-based CAN-to-USB adapter. Would it be possible to get a copy of your program?

I don't believe my code will help you in your case. My code is C++ firmware code that gets loaded to an Arduino and communicates directly to a MCP2515 CAN controller chip via the SPI protocol. That data is then translated to UART to communicate to the PC to see the results.
https://cdn.sparkfun.com//assets/par...0/10039-01.jpg

I just used Hercules to view the COM port.

RS232 terminal, serial port terminal, udp terminal, tcp/ip client server - Hercules

The hardware you have should do this already. If you use Hercules, you can log data just as I have.

The advantage of having such a low level interface is that once I start understanding what the data is, I can program my Arduino to start doing stuff with it!

I am writing a program now that will allow me to view all the data on the CAN simultaneously by PID. That way, I can start messing with stuff in the car and see what data changes and how.

SouthArk370Z 05-09-2014 03:43 PM

Quote:

Originally Posted by radensb (Post 2812389)
I don't believe my code will help you in your case. My code is C++ firmware code that gets loaded to an Arduino and communicates directly to a MCP2515 CAN controller chip via the SPI protocol. That data is then translated to UART to communicate to the PC to see the results.

Ah. OK.

Quote:

Originally Posted by radensb (Post 2812389)
I just used Hercules to view the COM port.
RS232 terminal, serial port terminal, udp terminal, tcp/ip client server - Hercules ...
The hardware you have should do this already. If you use Hercules, you can log data just as I have. ...

The hardware/software I have found work great for monitoring params if you know the PID, but I haven't found a free program that will do bus sniffing.


Please keep us posted on your progress.

radensb 05-13-2014 01:30 AM

Update
 
I wrote a test tool for the incoming CAN data. The program reads in the CAN stream from the arduino and displays unique ID's and their data length. When the ID repeats, the line containing that ID gets updated. This allows me to view a static arrangement of all the PID's and watch how their data changes in real time.

Output format:
XXX: XX XX XX XX XX XX XX XX
PID: D0 D1 D2 D3 D4 D5 D6 D7


https://dl.dropboxusercontent.com/u/...IDs_Python.PNG

RLami 05-13-2014 12:01 PM

Introducing the CANBus Triple! - Mazdaspeed Forums

Back when I had my Mazdaspeed3 This guy was messing around with doing a CANBus interface unit for the car. He seems to have some pretty good posts outlining the process he used to get it working. I know it's not the same car, nor do I have experience with it, but maybe something helpful for you.

DIGItonium 05-13-2014 01:34 PM

Nice! I've been thinking about the same project in which I want to output to a composite video input of my head unit with the Arduino. I want to refresh the entire screen instead of printing it out in log format. The only issue I have is the resolution, so I thought about using a Raspberry Pi and write a Java app to make it look pretty on the screen with a touch friendly UI. Among other features, real-time plotting like an oscilloscope, bar charts, and the ability to view peak and hold.

All I need to do is query the data in real-time (similar to the console output) given the list of PIDs, and then parse the raw data.

This is something I'm already doing at work in the .NET world. Although my other option is to get a hold of Mono for Visual Studio so I can quickly code stuff in C#, but then it'll be an Android app.

BTW... what sort of response do you get if the PID doesn't exist?

Brad370 05-13-2014 02:01 PM

Quote:

Originally Posted by DIGItonium (Post 2817003)
BTW... what sort of response do you get if the PID doesn't exist?

He's just listening in on the CAN bus and printing it to a screen. You don't have to send any commands unless you want to start querying the OBD2 type information. The information he has printed is actually used by the car to function.

Brad370 05-13-2014 02:16 PM

radensb, when you start logging we should decide on a standard format so we can exchange logs and input them into whatever programs we write.

Here's an example I did early on using excel, but my VB.net program is coming together slowly which automates the process of comparing and graphing information to figure out what they mean.

I start by backing out of my driveway and then I drove around my neighborhood a bit (reverse = -1, neutral = 0, first = 1, etc.).

http://www.the370z.com/attachment.ph...4&d=1400014556


All times are GMT -5. The time now is 07:46 AM.

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