# 2012 Leaf CAN System info



## kennybobby (Aug 10, 2012)

*Re: 2012 Leaf CAN frame fields*

Basic info on the fields, and a CRC calculation found online at
http://productions.8dromeda.net/c55-leaf-inverter-protocol.html



```
Nissan CRC:
	static void nissan_crc(uint8_t *data) {
		data[7] = 0;
		uint8_t crc = 0;
		for (int b=0; b<8; b++) {
			for (int i=7; i>=0; i--) {
				uint8_t bit = ((data[b] &(1 << i)) > 0) ? 1 : 0;
				if(crc >= 0x80) crc = (byte)(((crc << 1) + bit) ^ 0x85);
				else            crc = (byte)((crc << 1) + bit);
			}
		}
		data[7] = crc;
	}
```


----------



## kennybobby (Aug 10, 2012)

*Re: 2012 Leaf CAN Block Diagram*

Overview block diagram. Two CAN busses that connect thru the VCM, a Car Buss and an EV buss.

It appears that both are routed to the Data Link Connector, aka OBDII connector under the knee panel below steering wheel, but it will take a more detailed look to discover the pinout.

Don't know if there is a junction block connector somewhere such that the EV CAN buss could be monitored to get samples. i get the impression that the leaf spy tool mentioned in a post below sends commands and reads the response thru the VCM to get it's data.


----------



## kennybobby (Aug 10, 2012)

*Re: 2012 Leaf CAN Signal Listing*

This needs to be fleshed out to match the signals with the actual CAN PIDs, and a lot of that has been done by folks over on the myleaf forum, but it is so organized that i can follow and understand very little to none of it, haha guess i'm slow...


----------



## kennybobby (Aug 10, 2012)

*Leaf Spy Tool*

There is a phone app that reads CAN data from the OBDII port using a blueteeth or wifi dongle, it is discussed on the myleaf forum and can be found by searching for leafspy, there may be 3 versions. The Lite version will read the voltage of each cell in the pack, which makes it a very useful tool.


----------



## Dala (Jan 10, 2018)

Here are a database files containing everything we know about EV-CAN and CAR-CAN so far


https://github.com/dalathegreat/leaf_can_bus_messages


----------

